public class ManagementContractImpl extends Object implements ContractService<ManagementContractModel>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ManagementContractImpl.ManagementContractValidationService
Contract validator
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTRACT_BACKUP_EVENT |
| Constructor and Description |
|---|
ManagementContractImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService) |
ManagementContractImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService,
StorageClient storageClient,
LogbookOperationsClient logbookOperationsClient,
FunctionalBackupService functionalBackupService) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
RequestResponse<ManagementContractModel> |
createContracts(List<ManagementContractModel> contractModelList)
Create a collections of contracts After passing the validation steps.
|
ManagementContractModel |
findByIdentifier(String identifier)
Find contract by identifier
|
RequestResponseOK<ManagementContractModel> |
findContracts(com.fasterxml.jackson.databind.JsonNode queryDsl)
find contract by QueryDsl
|
RequestResponse<ManagementContractModel> |
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 ManagementContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService)
public ManagementContractImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, StorageClient storageClient, LogbookOperationsClient logbookOperationsClient, FunctionalBackupService functionalBackupService)
public RequestResponse<ManagementContractModel> createContracts(List<ManagementContractModel> contractModelList) throws VitamException
ContractServicecreateContracts in interface ContractService<ManagementContractModel>contractModelList - the list of contracts to be createdVitamException - if in error occurs while validating contractspublic RequestResponse<ManagementContractModel> updateContract(String identifier, com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamException
ContractServiceupdateContract in interface ContractService<ManagementContractModel>identifier - the id of the contract to be updatedqueryDsl - the given queryDsl for updateVitamException - if in error occurs while validating contractspublic ManagementContractModel findByIdentifier(String identifier) throws ReferentialException, InvalidParseOperationException
ContractServicefindByIdentifier in interface ContractService<ManagementContractModel>identifier - the identifier of the contractReferentialException - thrown if the query could not be executedInvalidParseOperationException - thrown if the query could not be createdpublic RequestResponseOK<ManagementContractModel> findContracts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
ContractServicefindContracts in interface ContractService<ManagementContractModel>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 AutoCloseableCopyright © 2019 Vitam. All rights reserved.