Interface SnapshotTaskClient

  • All Known Implementing Classes:
    SnapshotTaskClientImpl

    public interface SnapshotTaskClient
    Provides 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 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 resides
        description - of the snapshot
        userEmail - address to inform when the snapshot is complete
        Returns:
        results
        Throws:
        ContentStoreException - on error
      • 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
      • 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 retrieve
        pageNumber - the page number of result set pages
        pageSize - the maximum number of content items to include in the result set
        prefix - 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 retrieve
        pageNumber - the page number of result set pages
        pageSize - 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 restore
        userEmail - address to inform when restoration is complete
        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 restored
        daysToExpire - length of time before restored content expires (in days)
        Returns:
        results
        Throws:
        ContentStoreException - on error