Package org.duracloud.client.task
Interface SnapshotTaskClient
-
- All Known Implementing Classes:
SnapshotTaskClientImpl
public interface SnapshotTaskClientProvides a client interface for the SnapshotStorageProvider's set of tasks. These tasks are used to interact with snapshots and snapshot restorations.- Author:
- Bill Branan Date: 8/8/14
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CleanupSnapshotTaskResultcleanupSnapshot(String spaceId)Cleans up content that is no longer needed now that the snapshot has been transferred successfully.CompleteRestoreTaskResultcompleteRestore(String spaceId, int daysToExpire)Performs setup necessary to expire content which has been restored.CompleteSnapshotTaskResultcompleteSnapshot(String spaceId)Completes the snapshot.CreateSnapshotTaskResultcreateSnapshot(String spaceId, String description, String userEmail)Begins the process of creating a snapshot by collecting the necessary information and passing it down to the snapshot bridge application.GetRestoreTaskResultgetRestore(String restoreId)Gets the status and details of a snapshot restore action based on the ID of the restore.GetRestoreTaskResultgetRestoreBySnapshot(String snapshotId)Gets the status and details of a snapshot restore action based on the ID of the original snapshot.GetSnapshotTaskResultgetSnapshot(String snapshotId)Gets the status and details of a snapshot action.GetSnapshotContentsTaskResultgetSnapshotContents(String snapshotId, int pageNumber, int pageSize, String prefix)Gets the list of content items that are contained in the snapshot.GetSnapshotHistoryTaskResultgetSnapshotHistory(String snapshotId, int pageNumber, int pageSize)Gets the list of history items that are contained in the snapshot.GetSnapshotListTaskResultgetSnapshots()Gets a listing of snapshots which are accessible to this accountGetSnapshotsTotalsTaskResultgetSnapshotsTotals(String status)Gets the total count, size (in bytes) and files of snapshots which are accessible to this accountRequestRestoreSnapshotTaskResultrequestRestoreSnapshot(String snapshotId, String userEmail)Sends a snapshot restore request to the DuraCloud Admin.RestoreSnapshotTaskResultrestoreSnapshot(String snapshotId, String userEmail)Begins the process of restoring a snapshot by creating a landing space and informing the snapshot bridge application that a restore action needs to be performed.
-
-
-
Method Detail
-
createSnapshot
CreateSnapshotTaskResult createSnapshot(String spaceId, String description, String userEmail) throws ContentStoreException
Begins the process of creating a snapshot by collecting the necessary information and passing it down to the snapshot bridge application. Along the way, the space provided is also set to read-only so that changes cannot be made to the content.- Parameters:
spaceId- the ID of the space where the content to snapshot residesdescription- of the snapshotuserEmail- address to inform when the snapshot is complete- Returns:
- results
- Throws:
ContentStoreException- on error
-
getSnapshot
GetSnapshotTaskResult getSnapshot(String snapshotId) throws ContentStoreException
Gets the status and details of a snapshot action.- Parameters:
snapshotId- the ID of the snapshot to retrieve- Returns:
- results
- Throws:
ContentStoreException- on error
-
cleanupSnapshot
CleanupSnapshotTaskResult cleanupSnapshot(String spaceId) throws ContentStoreException
Cleans up content that is no longer needed now that the snapshot has been transferred successfully. This call should be made before the completeSnapshot call.- Parameters:
spaceId-- Returns:
- Throws:
ContentStoreException
-
completeSnapshot
CompleteSnapshotTaskResult completeSnapshot(String spaceId) throws ContentStoreException
Completes the snapshot. The cleanupSnapshot call should be made and all content should have been removed from the snapshot space prior to this call being made.- Parameters:
spaceId- the ID of the space that hosted the snapshot content- Returns:
- results
- Throws:
ContentStoreException- on error
-
getSnapshots
GetSnapshotListTaskResult getSnapshots() throws ContentStoreException
Gets a listing of snapshots which are accessible to this account- Returns:
- results
- Throws:
ContentStoreException- on error
-
getSnapshotsTotals
GetSnapshotsTotalsTaskResult getSnapshotsTotals(String status) throws ContentStoreException
Gets the total count, size (in bytes) and files of snapshots which are accessible to this account- Parameters:
status-- Returns:
- results
- Throws:
ContentStoreException- on error
-
getSnapshotContents
GetSnapshotContentsTaskResult getSnapshotContents(String snapshotId, int pageNumber, int pageSize, String prefix) throws ContentStoreException
Gets the list of content items that are contained in the snapshot. This is the same as the list of content that existed in the original space at the moment the snapshot was initiated.- Parameters:
snapshotId- the ID of the snapshot to retrievepageNumber- the page number of result set pagespageSize- the maximum number of content items to include in the result setprefix- an optional prefix used to find content items- Returns:
- list of content items
- Throws:
ContentStoreException- on error
-
getSnapshotHistory
GetSnapshotHistoryTaskResult getSnapshotHistory(String snapshotId, int pageNumber, int pageSize) throws ContentStoreException
Gets the list of history items that are contained in the snapshot.- Parameters:
snapshotId- the ID of the snapshot to retrievepageNumber- the page number of result set pagespageSize- the maximum number of content items to include in the result set- Returns:
- list of history items
- Throws:
ContentStoreException- on error
-
restoreSnapshot
RestoreSnapshotTaskResult restoreSnapshot(String snapshotId, String userEmail) throws ContentStoreException
Begins the process of restoring a snapshot by creating a landing space and informing the snapshot bridge application that a restore action needs to be performed.- Parameters:
snapshotId- the ID of the snapshot to restoreuserEmail- address to inform when restoration is complete- Returns:
- results
- Throws:
ContentStoreException- on error
-
requestRestoreSnapshot
RequestRestoreSnapshotTaskResult requestRestoreSnapshot(String snapshotId, String userEmail) throws ContentStoreException
Sends a snapshot restore request to the DuraCloud Admin.- Parameters:
snapshotId- the ID of the snapshot to restoreuserEmail- address to inform when restore starts and completes.- Returns:
- results
- Throws:
ContentStoreException- on error
-
completeRestore
CompleteRestoreTaskResult completeRestore(String spaceId, int daysToExpire) throws ContentStoreException
Performs setup necessary to expire content which has been restored.- Parameters:
spaceId- the ID of the space to which content was restoreddaysToExpire- length of time before restored content expires (in days)- Returns:
- results
- Throws:
ContentStoreException- on error
-
getRestore
GetRestoreTaskResult getRestore(String restoreId) throws ContentStoreException
Gets the status and details of a snapshot restore action based on the ID of the restore.- Parameters:
restoreId-- Returns:
- results
- Throws:
ContentStoreException- on error
-
getRestoreBySnapshot
GetRestoreTaskResult getRestoreBySnapshot(String snapshotId) throws ContentStoreException
Gets the status and details of a snapshot restore action based on the ID of the original snapshot.- Parameters:
snapshotId-- Returns:
- results
- Throws:
ContentStoreException- on error
-
-