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 TypeMethodDescriptionvoid
activate()
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.void
void
endManagedCheckout
(Object handle) Completes managed checkout with snapshot operation support.void
Changes active snapshot integration strategy.void
Informs 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 benull
dtSnapshotManager
- the DT snapshot manager, cannot benull
snapshotManager
- 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 benull
v8ProjectManager
- the V8 project manager, cannot benull
locationProvider
- the snapshot location provider, cannot benull
garbageCollectionService
- the snapshot garbage collection service, cannot benull
trace
- the tracing utility, cannot benull
infobaseSynchronizationManager
- 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:
activate
in interfaceIManagedService
-
deactivate
public void deactivate()- Specified by:
deactivate
in interfaceIManagedService
-
setIntegrationStrategy
Description copied from interface:IGitIntegrationManager
Changes active snapshot integration strategy.- Specified by:
setIntegrationStrategy
in interfaceIGitIntegrationManager
- Parameters:
strategy
- the new integration strategy, cannot benull
-
strategySettingsChanged
public void strategySettingsChanged()Description copied from interface:IGitIntegrationManager
Informs the manager, that settings of active integration strategy have changed.- Specified by:
strategySettingsChanged
in 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:IGitIntegrationManager
Starts checkout with snapshot operation support.- Specified by:
beginManagedCheckout
in interfaceIGitIntegrationManager
- Parameters:
repo
- the repository, which is going to be checked out, cannot benull
targetRef
- the target ref, cannot benull
progressMonitor
- the progress monitor, may benull
- Returns:
- the checkout handle, which must eventually be passed to
IGitIntegrationManager.endManagedCheckout(Object)
, ornull
if no action needed
-
endManagedCheckout
Description copied from interface:IGitIntegrationManager
Completes managed checkout with snapshot operation support.- Specified by:
endManagedCheckout
in interfaceIGitIntegrationManager
- Parameters:
handle
- the checkout handle, obtained fromIGitIntegrationManager.beginManagedCheckout(Repository, Ref, IProgressMonitor)
, cannot benull
-