java.lang.Object
com.e1c.g5.v8.dt.internal.snapshot.integration.git.LocationManager
All Implemented Interfaces:
ISnapshotLocationProvider

public class LocationManager extends Object implements ISnapshotLocationProvider
Manages snapshot files.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs the manager.
  • Method Summary

    Modifier and Type
    Method
    Description
    getLocationFor(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.ObjectId revision)
    Determines location for existing or non-existing snapshot for the given project and commit.
    boolean
    hasSnapshotFor(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.ObjectId revision)
    Checks whether a snapshot for the given project and commit exists.
    org.eclipse.jgit.lib.ObjectId[]
    listAvailableSnapshots(org.eclipse.core.resources.IProject project)
    Gets all commits such that a snapshot for the given project and the commit exists.
    void
    removeSnapshotFor(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.ObjectId revison)
    Removes the snapshot, referred to by the given project and commit.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocationManager

      public LocationManager()
      Constructs the manager.
  • Method Details

    • hasSnapshotFor

      public boolean hasSnapshotFor(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.ObjectId revision)
      Description copied from interface: ISnapshotLocationProvider
      Checks whether a snapshot for the given project and commit exists.
      Specified by:
      hasSnapshotFor in interface ISnapshotLocationProvider
      Parameters:
      project - the project, cannot be null
      revision - SHA-1 of the commit, cannot be null
      Returns:
      true if the snapshot exists
    • getLocationFor

      public Path getLocationFor(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.ObjectId revision)
      Description copied from interface: ISnapshotLocationProvider
      Determines location for existing or non-existing snapshot for the given project and commit.
      Specified by:
      getLocationFor in interface ISnapshotLocationProvider
      Parameters:
      project - the project, cannot be null
      revision - SHA-1 of the commit, cannot be null
      Returns:
      the snapshot location, never null
    • listAvailableSnapshots

      public org.eclipse.jgit.lib.ObjectId[] listAvailableSnapshots(org.eclipse.core.resources.IProject project)
      Description copied from interface: ISnapshotLocationProvider
      Gets all commits such that a snapshot for the given project and the commit exists.
      Specified by:
      listAvailableSnapshots in interface ISnapshotLocationProvider
      Parameters:
      project - the project, cannot be null
      Returns:
      array of SHA-1 of the commits, never null
    • removeSnapshotFor

      public void removeSnapshotFor(org.eclipse.core.resources.IProject project, org.eclipse.jgit.lib.ObjectId revison)
      Removes the snapshot, referred to by the given project and commit.
      Parameters:
      project - the project, cannot be null
      revison - SHA-1 of the commit, cannot be null
      Throws:
      SnapshotIntegrationException - if the removal failed