Class ReferentialAccessionRegisterImpl
- java.lang.Object
-
- fr.gouv.vitam.functional.administration.accession.register.core.ReferentialAccessionRegisterImpl
-
- All Implemented Interfaces:
VitamAutoCloseable
,java.lang.AutoCloseable
public class ReferentialAccessionRegisterImpl extends java.lang.Object implements VitamAutoCloseable
Referential Accession Register Implement
-
-
Constructor Summary
Constructors Constructor Description ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService, MetaDataClientFactory metaDataClientFactory, AdminManagementConfiguration configuration)
ConstructorReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, FunctionalBackupService functionalBackupService, MetaDataClientFactory metaDataClientFactory, int accessionRegisterSymbolicThreadPoolSize)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
createAccessionRegisterSymbolic(java.util.List<java.lang.Integer> tenants)
void
createOrUpdateAccessionRegister(AccessionRegisterDetailModel registerDetail)
java.util.List<AccessionRegisterSymbolic>
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 detailRequestResponseOK<AccessionRegisterSummary>
findDocuments(com.fasterxml.jackson.databind.JsonNode select)
search for an accession register's summary
-
-
-
Constructor Detail
-
ReferentialAccessionRegisterImpl
public ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService, MetaDataClientFactory metaDataClientFactory, AdminManagementConfiguration configuration)
Constructor- Parameters:
dbConfiguration
- the mongo access configurationmetaDataClientFactory
-configuration
-
-
ReferentialAccessionRegisterImpl
public ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, FunctionalBackupService functionalBackupService, MetaDataClientFactory metaDataClientFactory, int accessionRegisterSymbolicThreadPoolSize)
Constructor- Parameters:
dbConfiguration
- the mongo access configurationmetaDataClientFactory
-accessionRegisterSymbolicThreadPoolSize
-
-
-
Method Detail
-
createAccessionRegisterSymbolic
public void createAccessionRegisterSymbolic(java.util.List<java.lang.Integer> tenants) throws ReferentialException
- Throws:
ReferentialException
-
findAccessionRegisterSymbolic
public java.util.List<AccessionRegisterSymbolic> findAccessionRegisterSymbolic(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException
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
-
createOrUpdateAccessionRegister
public void createOrUpdateAccessionRegister(AccessionRegisterDetailModel registerDetail) throws BadRequestException, ReferentialException
- Parameters:
registerDetail
- to create in Mongodb- Throws:
ReferentialException
- throws when insert mongodb errorBadRequestException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceVitamAutoCloseable
-
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
-
-