Class FunctionalBackupService
java.lang.Object
fr.gouv.vitam.functional.administration.core.backup.FunctionalBackupService
Functional backupService
-
Field Summary
-
Constructor Summary
ConstructorDescriptionFunctionalBackupService
(VitamCounterService vitamCounterService) FunctionalBackupService
(BackupService backupService, VitamCounterService vitamCounterService, BackupLogbookManager backupLogbookManager) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getBackupFileName
(FunctionalAdminCollections functionalAdminCollections, int tenant, Integer sequence) com.fasterxml.jackson.databind.node.ArrayNode
getCollectionInJson
(com.mongodb.client.MongoCursor<org.bson.Document> mongoCursor) transfer the collection to jsoncom.fasterxml.jackson.databind.node.ArrayNode
getCollectionInJson
(FunctionalAdminCollections collections, int tenant) void
saveCollectionAndSequence
(GUID eipMaster, String eventCode, FunctionalAdminCollections collection, String objectIdentifier) void
saveDocument
(FunctionalAdminCollections collection, org.bson.Document document) void
saveFile
(InputStream inputStream, GUID eipMaster, String eventCode, DataCategory dataCategory, String fileName) save file and log in logbook
-
Field Details
-
FIELD_COLLECTION
- See Also:
-
FIELD_SEQUENCE
- See Also:
-
FIELD_BACKUP_SEQUENCE
- See Also:
-
DEFAULT_EXTENSION
- See Also:
-
-
Constructor Details
-
FunctionalBackupService
-
FunctionalBackupService
public FunctionalBackupService(BackupService backupService, VitamCounterService vitamCounterService, BackupLogbookManager backupLogbookManager)
-
-
Method Details
-
saveCollectionAndSequence
public void saveCollectionAndSequence(GUID eipMaster, String eventCode, FunctionalAdminCollections collection, String objectIdentifier) throws VitamException - Parameters:
objectIdentifier
-eipMaster
- logbookMastereventCode
- logbook evTypecollection
- collection- Throws:
VitamException
- vitamException
-
saveDocument
public void saveDocument(FunctionalAdminCollections collection, org.bson.Document document) throws FunctionalBackupServiceException - Throws:
FunctionalBackupServiceException
-
getBackupFileName
public static String getBackupFileName(FunctionalAdminCollections functionalAdminCollections, int tenant, Integer sequence) -
saveFile
public void saveFile(InputStream inputStream, GUID eipMaster, String eventCode, DataCategory dataCategory, String fileName) throws VitamException save file and log in logbook- Parameters:
inputStream
-eipMaster
-eventCode
-dataCategory
-fileName
-- Throws:
VitamException
-
getCollectionInJson
public com.fasterxml.jackson.databind.node.ArrayNode getCollectionInJson(com.mongodb.client.MongoCursor<org.bson.Document> mongoCursor) throws InvalidParseOperationException transfer the collection to json- Parameters:
mongoCursor
-- Returns:
- ArrayNode
- Throws:
InvalidParseOperationException
-
getCollectionInJson
public com.fasterxml.jackson.databind.node.ArrayNode getCollectionInJson(FunctionalAdminCollections collections, int tenant) throws InvalidParseOperationException - Throws:
InvalidParseOperationException
-