public class ContextServiceImpl extends Object implements ContextService
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXTS_BACKUP_EVENT |
| Constructor and Description |
|---|
ContextServiceImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService,
ContractService<IngestContractModel> ingestContract,
ContractService<AccessContractModel> accessContract,
SecurityProfileService securityProfileService,
FunctionalBackupService functionalBackupService)
Constructor
|
ContextServiceImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService,
SecurityProfileService securityProfileService)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
RequestResponse<ContextModel> |
createContexts(List<ContextModel> contextModelList)
Create a list of contexts
|
DbRequestResult |
findContexts(com.fasterxml.jackson.databind.JsonNode queryDsl)
Search for contexts
|
ContextModel |
findOneContextById(String id)
Find a context by its id
|
RequestResponse<ContextModel> |
updateContext(String id,
com.fasterxml.jackson.databind.JsonNode queryDsl)
Update a context
|
public static final String CONTEXTS_BACKUP_EVENT
public ContextServiceImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, SecurityProfileService securityProfileService)
mongoAccess - MongoDB clientpublic ContextServiceImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, ContractService<IngestContractModel> ingestContract, ContractService<AccessContractModel> accessContract, SecurityProfileService securityProfileService, FunctionalBackupService functionalBackupService)
mongoAccess - MongoDB clientpublic RequestResponse<ContextModel> createContexts(List<ContextModel> contextModelList) throws VitamException
ContextServicecreateContexts in interface ContextServicecontextModelList - the context list to be createdVitamException - thrown if operation could not be donepublic DbRequestResult findContexts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException
ContextServicefindContexts in interface ContextServicequeryDsl - the query to be used for the searchReferentialException - thrown if the query could not be executedpublic ContextModel findOneContextById(String id) throws ReferentialException, InvalidParseOperationException
ContextServicefindOneContextById in interface ContextServiceid - the id of the contextReferentialException - thrown if the context could not be foundInvalidParseOperationException - thrown if the query is incorrectpublic RequestResponse<ContextModel> updateContext(String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamException
ContextServiceupdateContext in interface ContextServiceid - the id of the contextqueryDsl - the update command as a queryVitamException - thrown if operation could not be donepublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseableCopyright © 2018 Vitam. All rights reserved.