Interface IGitIntegrationStrategy
-
- All Known Implementing Classes:
BranchFilteredIntegrationStrategy
,TransitionFilteredIntegrationStrategy
public interface IGitIntegrationStrategy
Snapshot Git integration strategy. Determines when snapshots shall be created or restored.- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
requestUserApproval(SnapshotGitRequest[] requests)
Requests user approval of a snapshot operation consisting of the given requests.boolean
shallKeepSnapshot(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.ObjectId revision)
Tests whether a snapshot may be required in future.boolean
wantCreateSnapshot(IGitBoundProjectStateDelta delta, ISnapshotLocationProvider locationProvider)
Tests whether it is desired to create a snapshot on the given Git-associated project state transition.boolean
wantRestoreSnapshot(IGitBoundProjectStateDelta delta, ISnapshotLocationProvider locationProvider)
Tests whether it is desired to restore a snapshot on the given Git-associated project state transition.
-
-
-
Method Detail
-
wantCreateSnapshot
boolean wantCreateSnapshot(IGitBoundProjectStateDelta delta, ISnapshotLocationProvider locationProvider)
Tests whether it is desired to create a snapshot on the given Git-associated project state transition.- Parameters:
delta
- the Git-associated project state delta, nevernull
locationProvider
- , the snapshot location provider, nevernull
- Returns:
true
if the snapshot creation is desired
-
wantRestoreSnapshot
boolean wantRestoreSnapshot(IGitBoundProjectStateDelta delta, ISnapshotLocationProvider locationProvider)
Tests whether it is desired to restore a snapshot on the given Git-associated project state transition.- Parameters:
delta
- the Git-associated project state delta, nevernull
locationProvider
- , the snapshot location provider, nevernull
- Returns:
true
if the snapshot restoration is desired
-
shallKeepSnapshot
boolean shallKeepSnapshot(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.ObjectId revision)
Tests whether a snapshot may be required in future. The snapshot is referred to by a project and commit.This method is used for garbage collection purposes and does not affect snapshot creation or restoration.
- Parameters:
project
- the project, nevernull
repo
- the repository, associated with the project, nevernull
revision
- SHA-1 of the commit, nevernull
- Returns:
true
if the snapshot shall be kept,false
otherwise
-
requestUserApproval
boolean requestUserApproval(SnapshotGitRequest[] requests)
Requests user approval of a snapshot operation consisting of the given requests.- Parameters:
requests
- the requests, nevernull
- Returns:
true
if a user approved the operation,false
otherwise
-
-