Class RestoreBackupServiceImpl

  • All Implemented Interfaces:
    RestoreBackupService

    public class RestoreBackupServiceImpl
    extends java.lang.Object
    implements RestoreBackupService
    Service used to recover a Backup copy of the given Vitam collection.
    • Constructor Detail

      • RestoreBackupServiceImpl

        public RestoreBackupServiceImpl()
        Constructor
    • Method Detail

      • getLatestSavedFileName

        public java.util.Optional<java.lang.String> getLatestSavedFileName​(java.lang.String strategy,
                                                                           DataCategory type,
                                                                           FunctionalAdminCollections collection)
        Description copied from interface: RestoreBackupService
        get the latest file name according to the name suffix.
        Specified by:
        getLatestSavedFileName in interface RestoreBackupService
        Parameters:
        strategy - the storage strategy to be applied
        type - the storage collection type.
        collection - the collection to be restored
        Returns:
        the last version.
      • readLatestSavedFile

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

        public java.util.Iterator<java.util.List<OfferLog>> getListing​(java.lang.String strategy,
                                                                       DataCategory dataCategory,
                                                                       java.lang.Long offset,
                                                                       int limit,
                                                                       Order order)
        Retrieve list of offer log defining objects to reconstruct from offer log
        Specified by:
        getListing in interface RestoreBackupService
        Parameters:
        strategy - storage strategy
        dataCategory - collection
        offset - offset
        limit - limit
        Returns:
        list of offer log by bulk
        Throws:
        VitamRuntimeException - storage error
        java.lang.IllegalArgumentException - input error