Class FunctionalBackupService
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.common.FunctionalBackupService
-
public class FunctionalBackupService extends java.lang.Object
Functional backupService
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_EXTENSION
static java.lang.String
FIELD_BACKUP_SEQUENCE
static java.lang.String
FIELD_COLLECTION
static java.lang.String
FIELD_SEQUENCE
-
Constructor Summary
Constructors Constructor Description FunctionalBackupService(BackupService backupService, VitamCounterService vitamCounterService, BackupLogbookManager backupLogbookManager)
FunctionalBackupService(VitamCounterService vitamCounterService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getBackupFileName(FunctionalAdminCollections functionalAdminCollections, int tenant, java.lang.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, java.lang.String eventCode, FunctionalAdminCollections collection, java.lang.String objectIdentifier)
void
saveDocument(FunctionalAdminCollections collection, org.bson.Document document)
void
saveFile(java.io.InputStream inputStream, GUID eipMaster, java.lang.String eventCode, DataCategory dataCategory, java.lang.String fileName)
save file and log in logbook
-
-
-
Field Detail
-
FIELD_COLLECTION
public static final java.lang.String FIELD_COLLECTION
- See Also:
- Constant Field Values
-
FIELD_SEQUENCE
public static final java.lang.String FIELD_SEQUENCE
- See Also:
- Constant Field Values
-
FIELD_BACKUP_SEQUENCE
public static final java.lang.String FIELD_BACKUP_SEQUENCE
- See Also:
- Constant Field Values
-
DEFAULT_EXTENSION
public static final java.lang.String DEFAULT_EXTENSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FunctionalBackupService
public FunctionalBackupService(VitamCounterService vitamCounterService)
-
FunctionalBackupService
public FunctionalBackupService(BackupService backupService, VitamCounterService vitamCounterService, BackupLogbookManager backupLogbookManager)
-
-
Method Detail
-
saveCollectionAndSequence
public void saveCollectionAndSequence(GUID eipMaster, java.lang.String eventCode, FunctionalAdminCollections collection, java.lang.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 java.lang.String getBackupFileName(FunctionalAdminCollections functionalAdminCollections, int tenant, java.lang.Integer sequence)
-
saveFile
public void saveFile(java.io.InputStream inputStream, GUID eipMaster, java.lang.String eventCode, DataCategory dataCategory, java.lang.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
-
-