Class RestoreBackupServiceImpl
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.common.impl.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 Summary
Constructors Constructor Description RestoreBackupServiceImpl()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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 logAccessionRegisterBackupModelloadData(java.lang.String strategy, FunctionalAdminCollections collection, java.lang.String filename, long offset)Load data from storagejava.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
-
-
-
Method Detail
-
getLatestSavedFileName
public java.util.Optional<java.lang.String> getLatestSavedFileName(java.lang.String strategy, DataCategory type, FunctionalAdminCollections collection)Description copied from interface:RestoreBackupServiceget the latest file name according to the name suffix.- Specified by:
getLatestSavedFileNamein interfaceRestoreBackupService- Parameters:
strategy- the storage strategy to be appliedtype- 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:RestoreBackupServiceRead the latest file using the name requested by getLatestSavedFileName.
Be careful, this method use tenant that is requested from the VitamSession- Specified by:
readLatestSavedFilein interfaceRestoreBackupService- Parameters:
strategy- the storage strategy to be appliedcollection- 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:
getListingin interfaceRestoreBackupService- Parameters:
strategy- storage strategydataCategory- collectionoffset- offsetlimit- limit- Returns:
- list of offer log by bulk
- Throws:
VitamRuntimeException- storage errorjava.lang.IllegalArgumentException- input error
-
loadData
public AccessionRegisterBackupModel loadData(java.lang.String strategy, FunctionalAdminCollections collection, java.lang.String filename, long offset)
Load data from storage- Specified by:
loadDatain interfaceRestoreBackupService- Parameters:
strategy- storage strategycollection- collectionfilename- name of file to loadoffset- offset- Returns:
- data
- Throws:
VitamRuntimeException- storage errorjava.lang.IllegalArgumentException- input error
-
-