Interface ContextService
- All Superinterfaces:
AutoCloseable
,VitamAutoCloseable
- All Known Implementing Classes:
ContextServiceImpl
ContextService Interface declaring methods associated to contexts
-
Method Summary
Modifier and TypeMethodDescriptioncreateContexts
(List<ContextModel> contextModelList) Create a list of contextsdeleteContext
(String contextId, boolean forceDelete) Delete a contextfindContexts
(com.fasterxml.jackson.databind.JsonNode queryDsl) Search for contextsFind a context by its idboolean
securityProfileIsUsedInContexts
(String securityProfileId) void
setSecurityProfileService
(SecurityProfileService securityProfileService) updateContext
(String id, com.fasterxml.jackson.databind.JsonNode queryDsl) Update a contextMethods inherited from interface fr.gouv.vitam.common.model.VitamAutoCloseable
close
-
Method Details
-
createContexts
RequestResponse<ContextModel> createContexts(List<ContextModel> contextModelList) throws VitamException Create a list of contexts- Parameters:
contextModelList
- the context list to be created- Returns:
- a response as a RequestResponse
Object - Throws:
VitamException
- thrown if operation could not be done
-
findContexts
DbRequestResult findContexts(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException Search for contexts- Parameters:
queryDsl
- the query to be used for the search- Returns:
- the list of contexts as a DbRequestResult
- Throws:
ReferentialException
- thrown if the query could not be executedInvalidParseOperationException
- thrown if query is incorrect
-
updateContext
RequestResponse<ContextModel> updateContext(String id, com.fasterxml.jackson.databind.JsonNode queryDsl) throws VitamException Update a context- Parameters:
id
- the id of the contextqueryDsl
- the update command as a query- Returns:
- a response as a RequestResponse
object - Throws:
VitamException
- thrown if operation could not be done
-
findOneContextById
ContextModel findOneContextById(String id) throws ReferentialException, InvalidParseOperationException Find a context by its id- Parameters:
id
- the id of the context- Returns:
- the context as a ContextModel
- Throws:
ReferentialException
- thrown if the context could not be foundInvalidParseOperationException
- thrown if the query is incorrect
-
deleteContext
RequestResponse<ContextModel> deleteContext(String contextId, boolean forceDelete) throws VitamException Delete a context- Parameters:
contextId
- the id of the contextforceDelete
-- Returns:
- a response as a RequestResponse
object - Throws:
VitamException
- thrown if operation could not be done
-
securityProfileIsUsedInContexts
boolean securityProfileIsUsedInContexts(String securityProfileId) throws InvalidCreateOperationException, ReferentialException, InvalidParseOperationException -
setSecurityProfileService
-