Interface ProcessingManagementClient
-
- All Superinterfaces:
java.lang.AutoCloseable
,MockOrRestClient
,VitamAutoCloseable
- All Known Implementing Classes:
ProcessingManagementClientMock
public interface ProcessingManagementClient extends MockOrRestClient
Processing Management Client
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequestResponse<ItemStatus>
cancelOperationProcessExecution(java.lang.String id)
cancelOperationProcessExecution : cancel processing operationRequestResponse<ItemStatus>
executeOperationProcess(java.lang.String operationId, java.lang.String workflowId, java.lang.String actionId)
ExecuteOperationProcess : execute an operation processing Other than INIT process, only operation id and action id are requiredRequestResponse<ProcessPause>
forcePause(ProcessPause info)
Add a forced pause on the tenant and/or the type of processRequestResponse<ItemStatus>
getOperationProcessExecutionDetails(java.lang.String id)
getOperationProcessExecutionDetails : get operation processing execution detailsItemStatus
getOperationProcessStatus(java.lang.String id)
getOperationProcessStatus: get operation process status**RequestResponse<WorkFlow>
getWorkflowDefinitions()
Retrieve all the workflow definitions.java.util.Optional<WorkFlow>
getWorkflowDetails(java.lang.String WorkflowIdentifier)
void
initVitamProcess(ProcessingEntry entry)
initVitamProcess woth processing entryvoid
initVitamProcess(java.lang.String container, java.lang.String workflowId)
initVitamProcessboolean
isNotRunning(java.lang.String operationId)
Check if process workflow is completed of notboolean
isNotRunning(java.lang.String operationId, ProcessState expectedProcessState)
RequestResponse<ProcessDetail>
listOperationsDetails(ProcessQuery query)
Retrieve all the workflow operationsvoid
registerWorker(java.lang.String familyId, java.lang.String workerId, WorkerBean workerDescription)
Register a new worker knowing its family and with a WorkerBean.RequestResponse<ProcessPause>
removeForcePause(ProcessPause info)
Removed the forced pause on the tenant and/or the type of processvoid
unregisterWorker(java.lang.String familyId, java.lang.String workerId)
Unregister a worker knowing its family and its workerId.RequestResponse<ItemStatus>
updateOperationActionProcess(java.lang.String actionId, java.lang.String operationId)
updateOperationActionProcess : update operation processing status-
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
-
-
-
Method Detail
-
isNotRunning
boolean isNotRunning(java.lang.String operationId)
Check if process workflow is completed of not- Parameters:
operationId
-- Returns:
- boolean true/false
-
isNotRunning
boolean isNotRunning(java.lang.String operationId, ProcessState expectedProcessState)
- Parameters:
operationId
-expectedProcessState
-- Returns:
-
registerWorker
void registerWorker(java.lang.String familyId, java.lang.String workerId, WorkerBean workerDescription) throws VitamClientInternalException, ProcessingBadRequestException
Register a new worker knowing its family and with a WorkerBean. If a problem is encountered, an exception is thrown.- Parameters:
familyId
- the id of the family to which the worker has to be registeredworkerId
- the id of the worker to be registeredworkerDescription
- the description of the worker as a workerBean- Throws:
ProcessingBadRequestException
- if a bad request has been sentVitamClientInternalException
-
unregisterWorker
void unregisterWorker(java.lang.String familyId, java.lang.String workerId) throws ProcessingBadRequestException
Unregister a worker knowing its family and its workerId. If the familyId or the workerId is unknown, an exception is thrown.- Parameters:
familyId
- the id of the family to which the worker has to be registeredworkerId
- the id of the worker to be registered- Throws:
ProcessingBadRequestException
- if the worker or the family does not exist
-
getWorkflowDefinitions
RequestResponse<WorkFlow> getWorkflowDefinitions() throws VitamClientException
Retrieve all the workflow definitions.- Returns:
- map of workflow definitions by id
- Throws:
VitamClientException
-
getWorkflowDetails
java.util.Optional<WorkFlow> getWorkflowDetails(java.lang.String WorkflowIdentifier) throws VitamClientException
- Parameters:
WorkflowIdentifier
-- Returns:
- Throws:
VitamClientException
-
removeForcePause
RequestResponse<ProcessPause> removeForcePause(ProcessPause info) throws ProcessingException
Removed the forced pause on the tenant and/or the type of process- Parameters:
info
-- Throws:
ProcessingException
-
forcePause
RequestResponse<ProcessPause> forcePause(ProcessPause info) throws ProcessingException
Add a forced pause on the tenant and/or the type of process- Parameters:
info
-- Throws:
ProcessingException
-
getOperationProcessStatus
ItemStatus getOperationProcessStatus(java.lang.String id) throws VitamClientException, InternalServerException, BadRequestException
getOperationProcessStatus: get operation process status**- Parameters:
id
- : operation identifier*- Returns:
- ItemStatus response containing message and status*
- Throws:
VitamClientException
InternalServerException
BadRequestException
-
getOperationProcessExecutionDetails
RequestResponse<ItemStatus> getOperationProcessExecutionDetails(java.lang.String id) throws VitamClientException, InternalServerException
getOperationProcessExecutionDetails : get operation processing execution details- Parameters:
id
- : operation identifier- Returns:
- Engine response containing message and status
- Throws:
VitamClientException
InternalServerException
-
cancelOperationProcessExecution
RequestResponse<ItemStatus> cancelOperationProcessExecution(java.lang.String id) throws InternalServerException, VitamClientException
cancelOperationProcessExecution : cancel processing operation- Parameters:
id
- : operation identifier- Returns:
- ItemStatus response containing message and status
- Throws:
VitamClientException
InternalServerException
-
updateOperationActionProcess
RequestResponse<ItemStatus> updateOperationActionProcess(java.lang.String actionId, java.lang.String operationId) throws InternalServerException, VitamClientException
updateOperationActionProcess : update operation processing status- Parameters:
actionId
- : identify the action to be executed by the workflow(next , pause,resume)operationId
- : operation identifier- Returns:
- Response containing message and status
- Throws:
InternalServerException
VitamClientException
-
executeOperationProcess
RequestResponse<ItemStatus> executeOperationProcess(java.lang.String operationId, java.lang.String workflowId, java.lang.String actionId) throws InternalServerException, VitamClientException
ExecuteOperationProcess : execute an operation processing Other than INIT process, only operation id and action id are required- Parameters:
operationId
- id of the operation (required)workflowId
- id of the workflow (optional)actionId
- identify the action to be executed by the workflow(next , pause,resume) (required)- Returns:
- RequestResponse
- Throws:
InternalServerException
VitamClientException
-
initVitamProcess
void initVitamProcess(java.lang.String container, java.lang.String workflowId) throws BadRequestException, InternalServerException
initVitamProcess- Parameters:
container
-workflowId
-- Throws:
InternalServerException
BadRequestException
-
initVitamProcess
void initVitamProcess(ProcessingEntry entry) throws InternalServerException, BadRequestException
initVitamProcess woth processing entry- Parameters:
entry
-- Throws:
InternalServerException
BadRequestException
-
listOperationsDetails
RequestResponse<ProcessDetail> listOperationsDetails(ProcessQuery query) throws VitamClientException
Retrieve all the workflow operations- Parameters:
query
- Query model- Returns:
- All details of the operations
- Throws:
VitamClientException
-
-