Interface ContextService
-
- All Superinterfaces:
java.lang.AutoCloseable
,VitamAutoCloseable
- All Known Implementing Classes:
ContextServiceImpl
public interface ContextService extends VitamAutoCloseable
ContextService Interface declaring methods associated to contexts
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequestResponse<ContextModel>
createContexts(java.util.List<ContextModel> contextModelList)
Create a list of contextsRequestResponse<ContextModel>
deleteContext(java.lang.String contextId, boolean forceDelete)
Delete a contextDbRequestResult
findContexts(com.fasterxml.jackson.databind.JsonNode queryDsl)
Search for contextsContextModel
findOneContextById(java.lang.String id)
Find a context by its idRequestResponse<ContextModel>
updateContext(java.lang.String id, com.fasterxml.jackson.databind.JsonNode queryDsl)
Update a context-
Methods inherited from interface fr.gouv.vitam.common.model.VitamAutoCloseable
close
-
-
-
-
Method Detail
-
createContexts
RequestResponse<ContextModel> createContexts(java.util.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(java.lang.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(java.lang.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(java.lang.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
-
-