Package fr.gouv.vitam.functional.administration.core.backup

# Class FunctionalBackupService

java.lang.Object
fr.gouv.vitam.functional.administration.core.backup.FunctionalBackupService

public class FunctionalBackupService extends Object
Functional backupService

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_EXTENSION`
  `static final String`
  `FIELD_BACKUP_SEQUENCE`
  `static final String`
  `FIELD_COLLECTION`
  `static final String`
  `FIELD_SEQUENCE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FunctionalBackupService(VitamCounterService vitamCounterService)`
  `FunctionalBackupService(BackupService backupService, VitamCounterService vitamCounterService, BackupLogbookManager backupLogbookManager)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static 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 json
  `com.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

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### FIELD_COLLECTION

    public static final String FIELD_COLLECTION
    See Also:
      - Constant Field Values

  - ### FIELD_SEQUENCE

    public static final String FIELD_SEQUENCE
    See Also:
      - Constant Field Values

  - ### FIELD_BACKUP_SEQUENCE

    public static final String FIELD_BACKUP_SEQUENCE
    See Also:
      - Constant Field Values

  - ### DEFAULT_EXTENSION

    public static final String DEFAULT_EXTENSION
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### FunctionalBackupService

    public FunctionalBackupService(VitamCounterService vitamCounterService)

  - ### 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:
      `eipMaster` - logbookMaster
      `eventCode` - logbook evType
      `collection` - collection
      `objectIdentifier` -
    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`