public class AccessContractImpl extends Object implements ContractService<AccessContractModel>
Modifier and Type | Class and Description |
---|---|
protected static class |
AccessContractImpl.AccessContractManager
Contract validator and logBook manager
|
Modifier and Type | Field and Description |
---|---|
static String |
CONTRACT_BACKUP_EVENT |
Constructor and Description |
---|
AccessContractImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService)
Constructor
|
AccessContractImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService,
MetaDataClient metaDataClient,
FunctionalBackupService functionalBackupService)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
RequestResponse<AccessContractModel> |
createContracts(List<AccessContractModel> contractModelList)
Create a collections of contracts After passing the validation steps.
|
AccessContractModel |
findByIdentifier(String identifier)
Find contract by identifier
|
RequestResponseOK<AccessContractModel> |
findContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
find contract by QueryDsl
|
RequestResponse<AccessContractModel> |
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 AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService)
mongoAccess
- MongoDB clientvitamCounterService
- public AccessContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, MetaDataClient metaDataClient, FunctionalBackupService functionalBackupService)
mongoAccess
- vitamCounterService
- metaDataClient
- functionalBackupService
- public RequestResponse<AccessContractModel> createContracts(List<AccessContractModel> contractModelList) throws VitamException
ContractService
createContracts
in interface ContractService<AccessContractModel>
contractModelList
- the list of contracts to be createdVitamException
- if in error occurs while validating contractspublic AccessContractModel findByIdentifier(String identifier) throws ReferentialException, InvalidParseOperationException
ContractService
findByIdentifier
in interface ContractService<AccessContractModel>
identifier
- the identifier of the contractReferentialException
- thrown if the query could not be executedInvalidParseOperationException
- thrown if the query could not be createdpublic RequestResponseOK<AccessContractModel> findContracts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
ContractService
findContracts
in interface ContractService<AccessContractModel>
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 VitamAutoCloseable
close
in interface AutoCloseable
public RequestResponse<AccessContractModel> updateContract(String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamException
ContractService
updateContract
in interface ContractService<AccessContractModel>
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.