Package com.e1c.g5.v8.snapshot
Interface ISnapshotManager
public interface ISnapshotManager
Snapshot manager. Controls metadata snapshot creation and restoration.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createMetadataSnapshot
(org.eclipse.core.resources.IProject project, Path targetPath, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Creates metadata snapshot for the project.void
restoreMetadataFromSnapshot
(org.eclipse.core.resources.IProject project, Path snapshotPath, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Restores metadata for the projects from snapshot.void
validateMetadataSnapshot
(org.eclipse.core.resources.IProject project, Path snapshotPath) Validates metadata snapshot.
-
Method Details
-
createMetadataSnapshot
void createMetadataSnapshot(org.eclipse.core.resources.IProject project, Path targetPath, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Creates metadata snapshot for the project.Cancellation is supported.
- Parameters:
project
- the project for which metadata snapshot is created, cannot benull
targetPath
- the snapshot file, cannot benull
progressMonitor
- the progress monitor, cannot benull
- Throws:
SnapshotWriteException
- if an IO exception or some other error occurs
-
restoreMetadataFromSnapshot
void restoreMetadataFromSnapshot(org.eclipse.core.resources.IProject project, Path snapshotPath, org.eclipse.core.runtime.IProgressMonitor progressMonitor) Restores metadata for the projects from snapshot.Operation cannot be cancelled.
- Parameters:
project
- the project for which metadata is restored, cannot benull
snapshotPath
- the snapshot file, cannot benull
progressMonitor
- the progress monitor, cannot benull
- Throws:
SnapshotCorruptedException
- if the snapshot is corruptedSnapshotVersionMismatchException
- if the format version of the snapshot is not supported by this applicationSnapshotReadException
- if an IO exception or some other error occurs
-
validateMetadataSnapshot
Validates metadata snapshot. The following checks are performed:- The archive descriptor can be read and parsed.
- The snapshot format version matches the current version.
- The format version of every snapshot participant, which contributed to the snapshot, matches the current version of that participant.
- Parameters:
project
- the project for which the snapshot is validated, cannot benull
snapshotPath
- the snapshot file, cannot benull
- Throws:
SnapshotCorruptedException
- if the snapshot is corruptedSnapshotVersionMismatchException
- if the format version of the snapshot is not supported by this applicationSnapshotReadException
- if an IO exception or some other error occurs
-