Interface RestoreBackupService

  • All Known Implementing Classes:
    RestoreBackupServiceImpl

    public interface RestoreBackupService
    Service used to recover a Backup copy of the given Vitam collection.
    • Method Detail

      • getLatestSavedFileName

        java.util.Optional<java.lang.String> getLatestSavedFileName​(java.lang.String strategy,
                                                                    java.lang.String offerId,
                                                                    DataCategory type,
                                                                    FunctionalAdminCollections collection)
        get the latest file name according to the name suffix.
        Parameters:
        strategy - the storage strategy to be applied
        offerId - offer from the object should be readed
        collection - the collection to be restored
        type - the storage collection type.
        Returns:
        the last version.
      • readLatestSavedFile

        java.util.Optional<CollectionBackupModel> readLatestSavedFile​(java.lang.String strategy,
                                                                      java.lang.String offerId,
                                                                      FunctionalAdminCollections collection)
        Read the latest file using the name requested by getLatestSavedFileName.
        Be careful, this method use tenant that is requested from the VitamSession
        Parameters:
        strategy - the storage strategy to be applied
        collection - the collection to be restored
        Returns:
        the backup copy.
      • loadData

        AccessionRegisterBackupModel loadData​(java.lang.String strategy,
                                              FunctionalAdminCollections collection,
                                              java.lang.String filename,
                                              long offset)
        Load data from storage
        Parameters:
        strategy - storage strategy
        collection - collection
        filename - name of file to load
        offset - offset
        Returns:
        data
        Throws:
        VitamRuntimeException - storage error
        java.lang.IllegalArgumentException - input error