Package fr.gouv.vitam.functional.administration.core.accession.register

# Class ReferentialAccessionRegisterImpl

java.lang.Object
fr.gouv.vitam.functional.administration.core.accession.register.ReferentialAccessionRegisterImpl

All Implemented Interfaces:
  `VitamAutoCloseable`, `AutoCloseable`

public class ReferentialAccessionRegisterImpl extends Object implements VitamAutoCloseable
Referential Accession Register Implement

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService, MetaDataClientFactory metaDataClientFactory, AdminManagementConfiguration configuration)`
  Constructor
  `ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, FunctionalBackupService functionalBackupService, MetaDataClientFactory metaDataClientFactory, int accessionRegisterSymbolicThreadPoolSize)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `void`
  `createAccessionRegisterSymbolic(List<Integer> tenants)`
  `void`
  `createOrUpdateAccessionRegister(AccessionRegisterDetailModel registerDetail)`
  `RequestResponseOK<AccessionRegisterSymbolicModel>`
  `findAccessionRegisterSymbolic(com.fasterxml.jackson.databind.JsonNode queryDsl)`
  Find the accession register symbolic filtered by the query dsl, if an empty query dsl is provided, the last 20 accession register symbolics will be returned.
  `RequestResponseOK<AccessionRegisterDetail>`
  `findDetail(com.fasterxml.jackson.databind.JsonNode select)`
  search for an accession register's operation detail
  `RequestResponseOK<AccessionRegisterSummary>`
  `findDocuments(com.fasterxml.jackson.databind.JsonNode select)`
  search for an accession register's summary
  `void`
  `migrateAccessionRegister(AccessionRegisterDetailModel accessionRegister, List<String> fieldsToUpdate)`

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

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

- ## Constructor Details

  - ### ReferentialAccessionRegisterImpl

    public ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService, MetaDataClientFactory metaDataClientFactory, AdminManagementConfiguration configuration)
    Constructor
    Parameters:
      `dbConfiguration` - the mongo access configuration
      `metaDataClientFactory` -
      `configuration` -

  - ### ReferentialAccessionRegisterImpl

    public ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, FunctionalBackupService functionalBackupService, MetaDataClientFactory metaDataClientFactory, int accessionRegisterSymbolicThreadPoolSize)
    Constructor
    Parameters:
      `dbConfiguration` - the mongo access configuration
      `metaDataClientFactory` -
      `accessionRegisterSymbolicThreadPoolSize` -

- ## Method Details

  - ### createAccessionRegisterSymbolic

    public void createAccessionRegisterSymbolic(List<Integer> tenants) throws ReferentialException
    Throws:
      `ReferentialException`

  - ### findAccessionRegisterSymbolic

    public RequestResponseOK<AccessionRegisterSymbolicModel> findAccessionRegisterSymbolic(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
    Find the accession register symbolic filtered by the query dsl, if an empty query dsl is provided, the last 20 accession register symbolics will be returned.
    Parameters:
      `queryDsl` - that filter the accession register to find
    Returns:
      the list of accession register symbolic or an empty list
    Throws:
      `ReferentialException`
      `InvalidParseOperationException`

  - ### createOrUpdateAccessionRegister

    public void createOrUpdateAccessionRegister(AccessionRegisterDetailModel registerDetail) throws BadRequestException, ReferentialException
    Parameters:
      `registerDetail` - to create in Mongodb
    Throws:
      `ReferentialException` - throws when insert mongodb error
      `BadRequestException`

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `VitamAutoCloseable`

  - ### findDocuments

    public RequestResponseOK<AccessionRegisterSummary> findDocuments(com.fasterxml.jackson.databind.JsonNode select) throws ReferentialException
    search for an accession register's summary
    Parameters:
      `select` - the search criteria for the select operation
    Returns:
      A list of AccressionRegisterSummaries matching the 'select' criteria.
    Throws:
      `ReferentialException` - If the search's result is null or empty, or if the mongo search throw error

  - ### findDetail

    public RequestResponseOK<AccessionRegisterDetail> findDetail(com.fasterxml.jackson.databind.JsonNode select) throws ReferentialException
    search for an accession register's operation detail
    Parameters:
      `select` - the search criteria for the select operation
    Returns:
      A list of AccressionRegisterDetails matching the 'select' criteria.
    Throws:
      `ReferentialException` - If the search's result is null or empty, or if the mongo search throw error

  - ### migrateAccessionRegister

    public void migrateAccessionRegister(AccessionRegisterDetailModel accessionRegister, List<String> fieldsToUpdate) throws ReferentialException, BadRequestException
    Throws:
      `ReferentialException`
      `BadRequestException`