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
ContextService
createContexts
in interface ContextService
contextModelList
- the context list to be createdVitamException
- thrown if operation could not be donepublic DbRequestResult findContexts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException
ContextService
findContexts
in interface ContextService
queryDsl
- the query to be used for the searchReferentialException
- thrown if the query could not be executedpublic ContextModel findOneContextById(String id) throws ReferentialException, InvalidParseOperationException
ContextService
findOneContextById
in interface ContextService
id
- 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
ContextService
updateContext
in interface ContextService
id
- the id of the contextqueryDsl
- the update command as a queryVitamException
- thrown if operation could not be donepublic void close()
close
in interface VitamAutoCloseable
close
in interface AutoCloseable
Copyright © 2018 Vitam. All rights reserved.