Class RestoreBackupService
java.lang.Object
fr.gouv.vitam.metadata.core.reconstruction.service.RestoreBackupService
Service used to recover a Backup copy of the given metadata Vitam collection.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorRestoreBackupService
(StorageClientFactory storageClientFactory) Constructor for tests -
Method Summary
Modifier and TypeMethodDescriptiongetListing
(String strategy, String offerId, DataCategory category, Long offset, Integer limit, Order order, int batchSize) Retrieve list of offer log defining objects to reconstruct from offer logloadData
(String strategy, String referentOffer, MetadataCollections collection, String filename, long offset) Load data from storageloadData
(String strategy, String referentOffer, DataCategory category, String filename)
-
Constructor Details
-
RestoreBackupService
public RestoreBackupService()Constructor -
RestoreBackupService
Constructor for tests- Parameters:
storageClientFactory
- storage client factory
-
-
Method Details
-
getListing
public Iterator<OfferLog> getListing(String strategy, String offerId, DataCategory category, Long offset, Integer limit, Order order, int batchSize) throws StorageServerClientException, StorageNotFoundClientException Retrieve list of offer log defining objects to reconstruct from offer log- Parameters:
strategy
- storage strategycategory
- collectionoffset
- offsetlimit
- limitbatchSize
-- Returns:
- list of offer log by bulk
- Throws:
VitamRuntimeException
- storage errorIllegalArgumentException
- input errorStorageServerClientException
StorageNotFoundClientException
-
loadData
public MetadataBackupModel loadData(String strategy, String referentOffer, MetadataCollections collection, String filename, long offset) throws StorageNotFoundException Load data from storage- Parameters:
strategy
- storage strategycollection
- collectionfilename
- name of file to loadoffset
- offset- Returns:
- data
- Throws:
VitamRuntimeException
- storage errorIllegalArgumentException
- input errorStorageNotFoundException
-
loadData
public InputStream loadData(String strategy, String referentOffer, DataCategory category, String filename) throws StorageNotFoundException - Throws:
StorageNotFoundException
-