public class IngestContractImpl extends Object implements ContractService<IngestContractModel>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
IngestContractImpl.IngestContractManager
Contract validator and logBook manager
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTRACT_BACKUP_EVENT |
| Constructor and Description |
|---|
IngestContractImpl(MongoDbAccessAdminImpl dbConfiguration,
VitamCounterService vitamCounterService)
Constructor
|
IngestContractImpl(MongoDbAccessAdminImpl dbConfiguration,
VitamCounterService vitamCounterService,
MetaDataClient metaDataClient,
FunctionalBackupService functionalBackupService)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
RequestResponse<IngestContractModel> |
createContracts(List<IngestContractModel> contractModelList)
Create a collections of contracts After passing the validation steps.
|
IngestContractModel |
findByIdentifier(String identifier)
Find contract by identifier
|
RequestResponseOK<IngestContractModel> |
findContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
find contract by QueryDsl
|
RequestResponse<IngestContractModel> |
updateContract(String identifier,
com.fasterxml.jackson.databind.JsonNode queryDsl)
Update contracts status after passing validation steps :
Field modified :
- ActivationDate
- DesactivationDate
- LastUpdate
- Status
|
public static final String CONTRACT_BACKUP_EVENT
public IngestContractImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService)
dbConfiguration - the Database configurationvitamCounterService - the vitam counter servicepublic IngestContractImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService, MetaDataClient metaDataClient, FunctionalBackupService functionalBackupService)
dbConfiguration - the Database configurationvitamCounterService - the vitam counter servicemetaDataClient - the metadata clientfunctionalBackupService - public RequestResponse<IngestContractModel> createContracts(List<IngestContractModel> contractModelList) throws VitamException
ContractServicecreateContracts in interface ContractService<IngestContractModel>contractModelList - the list of contracts to be createdVitamException - if in error occurs while validating contractspublic IngestContractModel findByIdentifier(String identifier) throws ReferentialException, InvalidParseOperationException
ContractServicefindByIdentifier in interface ContractService<IngestContractModel>identifier - the identifier of the contractReferentialException - thrown if the query could not be executedInvalidParseOperationException - thrown if the query could not be createdpublic RequestResponseOK<IngestContractModel> findContracts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
ContractServicefindContracts in interface ContractService<IngestContractModel>queryDsl - the query to be executedReferentialException - thrown if the query could not be executedInvalidParseOperationException - thrown is the query is incorrectpublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseablepublic RequestResponse<IngestContractModel> updateContract(String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamException
ContractServiceupdateContract in interface ContractService<IngestContractModel>identifier - the id of the contract to be updatedqueryDsl - the given queryDsl for updateVitamException - if in error occurs while validating contractsCopyright © 2018 Vitam. All rights reserved.