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)ConstructorReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, FunctionalBackupService functionalBackupService)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcreateOrUpdateAccessionRegister(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 summaryvoidinsertAccessionRegisterSymbolic(java.util.List<AccessionRegisterSymbolic> accessionRegisterSymbolics)Insert a list of accession register symbolic.
-
-
-
Constructor Detail
-
ReferentialAccessionRegisterImpl
public ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService)
Constructor- Parameters:
dbConfiguration- the mongo access configuration
-
ReferentialAccessionRegisterImpl
public ReferentialAccessionRegisterImpl(MongoDbAccessAdminImpl dbConfiguration, FunctionalBackupService functionalBackupService)
Constructor- Parameters:
dbConfiguration- the mongo access configuration
-
-
Method Detail
-
insertAccessionRegisterSymbolic
public void insertAccessionRegisterSymbolic(java.util.List<AccessionRegisterSymbolic> accessionRegisterSymbolics) throws ReferentialException, SchemaValidationException, InvalidParseOperationException, DocumentAlreadyExistsException
Insert a list of accession register symbolic.- Parameters:
accessionRegisterSymbolics- to insert- Throws:
ReferentialExceptionSchemaValidationExceptionInvalidParseOperationExceptionDocumentAlreadyExistsException
-
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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein 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
-
-