Class SnapshotGitIntegrationManager
java.lang.Object
com.e1c.g5.v8.dt.internal.snapshot.integration.git.SnapshotGitIntegrationManager
- All Implemented Interfaces:
IManagedService,IGitIntegrationManager
public class SnapshotGitIntegrationManager
extends Object
implements IGitIntegrationManager, IManagedService
Default implementation of
IGitIntegrationManager.
During activation removes
all invalid metadata snapshots.
Temporarily suspends infobase synchronization status tracking
while performing git branch checkout which involves restoring
derived data snapshot.-
Constructor Summary
ConstructorsConstructorDescriptionSnapshotGitIntegrationManager(GitBoundProjectStateService projectStateService, IDtSnapshotManager dtSnapshotManager, ISnapshotManager snapshotManager, IDtProjectManager dtProjectManager, IV8ProjectManager v8ProjectManager, ISnapshotLocationProvider locationProvider, SnapshotGarbageCollectionService garbageCollectionService, SnapshotIntegrationTrace trace, IInfobaseSynchronizationManager infobaseSynchronizationManager) Constructs the manager. -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()beginManagedCheckout(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.Ref targetRef, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Starts checkout with snapshot operation support.voidvoidendManagedCheckout(Object handle) Completes managed checkout with snapshot operation support.voidChanges active snapshot integration strategy.voidInforms the manager, that settings of active integration strategy have changed.
-
Constructor Details
-
SnapshotGitIntegrationManager
@Inject public SnapshotGitIntegrationManager(GitBoundProjectStateService projectStateService, IDtSnapshotManager dtSnapshotManager, ISnapshotManager snapshotManager, IDtProjectManager dtProjectManager, IV8ProjectManager v8ProjectManager, ISnapshotLocationProvider locationProvider, SnapshotGarbageCollectionService garbageCollectionService, SnapshotIntegrationTrace trace, IInfobaseSynchronizationManager infobaseSynchronizationManager) Constructs the manager.- Parameters:
projectStateService- the Git-bound project state service, cannot benulldtSnapshotManager- the DT snapshot manager, cannot benullsnapshotManager- Snapshot manager that is to be used to check which metadata snapshots are invalid and so should be removed during activation. Must not benull.dtProjectManager- the DT project manager, cannot benullv8ProjectManager- the V8 project manager, cannot benulllocationProvider- the snapshot location provider, cannot benullgarbageCollectionService- the snapshot garbage collection service, cannot benulltrace- the tracing utility, cannot benullinfobaseSynchronizationManager- Infobase synchronization manager to be used to suspend/resume infobase synchronization status tracking during managed branch checkout. Must not benull.
-
-
Method Details
-
activate
public void activate()- Specified by:
activatein interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceIManagedService
-
setIntegrationStrategy
Description copied from interface:IGitIntegrationManagerChanges active snapshot integration strategy.- Specified by:
setIntegrationStrategyin interfaceIGitIntegrationManager- Parameters:
strategy- the new integration strategy, cannot benull
-
strategySettingsChanged
public void strategySettingsChanged()Description copied from interface:IGitIntegrationManagerInforms the manager, that settings of active integration strategy have changed.- Specified by:
strategySettingsChangedin interfaceIGitIntegrationManager
-
beginManagedCheckout
public Object beginManagedCheckout(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.Ref targetRef, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Description copied from interface:IGitIntegrationManagerStarts checkout with snapshot operation support.- Specified by:
beginManagedCheckoutin interfaceIGitIntegrationManager- Parameters:
repo- the repository, which is going to be checked out, cannot benulltargetRef- the target ref, cannot benullprogressMonitor- the progress monitor, may benull- Returns:
- the checkout handle, which must eventually be passed to
IGitIntegrationManager.endManagedCheckout(Object), ornullif no action needed
-
endManagedCheckout
Description copied from interface:IGitIntegrationManagerCompletes managed checkout with snapshot operation support.- Specified by:
endManagedCheckoutin interfaceIGitIntegrationManager- Parameters:
handle- the checkout handle, obtained fromIGitIntegrationManager.beginManagedCheckout(Repository, Ref, IProgressMonitor), cannot benull
-