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,
                                                                    DataCategory type,
                                                                    FunctionalAdminCollections collection)
        get the latest file name according to the name suffix.
        Parameters:
        strategy - the storage strategy to be applied
        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,
                                                                      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.
      • getListing

        java.util.Iterator<java.util.List<OfferLog>> getListing​(java.lang.String strategy,
                                                                DataCategory category,
                                                                java.lang.Long offset,
                                                                int limit,
                                                                Order order)
        Retrieve list of offer log defining objects to reconstruct from offer log
        Parameters:
        strategy - storage strategy
        category - collection
        offset - offset
        limit - limit
        Returns:
        list of offer log by bulk
        Throws:
        VitamRuntimeException - storage error
        java.lang.IllegalArgumentException - input error
      • 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