Class ProcessingManagementClientMock
- java.lang.Object
- 
- fr.gouv.vitam.common.client.AbstractMockClient
- 
- fr.gouv.vitam.processing.management.client.ProcessingManagementClientMock
 
 
- 
- All Implemented Interfaces:
- MockOrRestClient,- VitamAutoCloseable,- ProcessingManagementClient,- java.lang.AutoCloseable
 
 public class ProcessingManagementClientMock extends AbstractMockClient implements ProcessingManagementClient 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class fr.gouv.vitam.common.client.AbstractMockClientAbstractMockClient.FakeInboundResponse
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete 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 workflow, 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 detailsItemStatusgetOperationProcessStatus(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)voidinitVitamProcess(ProcessingEntry entry)initVitamProcess woth processing entryvoidinitVitamProcess(java.lang.String container, java.lang.String workflowId)initVitamProcessbooleanisNotRunning(java.lang.String operationId)Check if process workflow is completed of notbooleanisNotRunning(java.lang.String operationId, ProcessState expectedProcessState)RequestResponse<ProcessDetail>listOperationsDetails(ProcessQuery query)Retrieve all the workflow operationsvoidregisterWorker(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 processvoidunregisterWorker(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 class fr.gouv.vitam.common.client.AbstractMockClientcheckStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClientcheckStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
 
- 
 
- 
- 
- 
Method Detail- 
getOperationProcessStatuspublic ItemStatus getOperationProcessStatus(java.lang.String id) Description copied from interface:ProcessingManagementClientgetOperationProcessStatus: get operation process status**- Specified by:
- getOperationProcessStatusin interface- ProcessingManagementClient
- Parameters:
- id- : operation identifier*
- Returns:
- ItemStatus response containing message and status*
 
 - 
getOperationProcessExecutionDetailspublic RequestResponse<ItemStatus> getOperationProcessExecutionDetails(java.lang.String id) Description copied from interface:ProcessingManagementClientgetOperationProcessExecutionDetails : get operation processing execution details- Specified by:
- getOperationProcessExecutionDetailsin interface- ProcessingManagementClient
- Parameters:
- id- : operation identifier
- Returns:
- Engine response containing message and status
 
 - 
cancelOperationProcessExecutionpublic RequestResponse<ItemStatus> cancelOperationProcessExecution(java.lang.String id) Description copied from interface:ProcessingManagementClientcancelOperationProcessExecution : cancel processing operation- Specified by:
- cancelOperationProcessExecutionin interface- ProcessingManagementClient
- Parameters:
- id- : operation identifier
- Returns:
- ItemStatus response containing message and status
 
 - 
updateOperationActionProcesspublic RequestResponse<ItemStatus> updateOperationActionProcess(java.lang.String actionId, java.lang.String operationId) Description copied from interface:ProcessingManagementClientupdateOperationActionProcess : update operation processing status- Specified by:
- updateOperationActionProcessin interface- ProcessingManagementClient
- Parameters:
- actionId- : identify the action to be executed by the workflow(next , pause,resume)
- operationId- : operation identifier
- Returns:
- Response containing message and status
 
 - 
executeOperationProcesspublic RequestResponse<ItemStatus> executeOperationProcess(java.lang.String operationId, java.lang.String workflow, java.lang.String actionId) Description copied from interface:ProcessingManagementClientExecuteOperationProcess : execute an operation processing Other than INIT process, only operation id and action id are required- Specified by:
- executeOperationProcessin interface- ProcessingManagementClient
- Parameters:
- operationId- id of the operation (required)
- workflow- id of the workflow (optional)
- actionId- identify the action to be executed by the workflow(next , pause,resume) (required)
- Returns:
- RequestResponse
 
 - 
isNotRunningpublic boolean isNotRunning(java.lang.String operationId) Description copied from interface:ProcessingManagementClientCheck if process workflow is completed of not- Specified by:
- isNotRunningin interface- ProcessingManagementClient
- Returns:
- boolean true/false
 
 - 
isNotRunningpublic boolean isNotRunning(java.lang.String operationId, ProcessState expectedProcessState)- Specified by:
- isNotRunningin interface- ProcessingManagementClient
- Returns:
 
 - 
registerWorkerpublic void registerWorker(java.lang.String familyId, java.lang.String workerId, WorkerBean workerDescription)Description copied from interface:ProcessingManagementClientRegister a new worker knowing its family and with a WorkerBean. If a problem is encountered, an exception is thrown.- Specified by:
- registerWorkerin interface- ProcessingManagementClient
- Parameters:
- familyId- the id of the family to which the worker has to be registered
- workerId- the id of the worker to be registered
- workerDescription- the description of the worker as a workerBean
 
 - 
unregisterWorkerpublic void unregisterWorker(java.lang.String familyId, java.lang.String workerId)Description copied from interface:ProcessingManagementClientUnregister a worker knowing its family and its workerId. If the familyId or the workerId is unknown, an exception is thrown.- Specified by:
- unregisterWorkerin interface- ProcessingManagementClient
- Parameters:
- familyId- the id of the family to which the worker has to be registered
- workerId- the id of the worker to be registered
 
 - 
initVitamProcesspublic void initVitamProcess(java.lang.String container, java.lang.String workflowId)Description copied from interface:ProcessingManagementClientinitVitamProcess- Specified by:
- initVitamProcessin interface- ProcessingManagementClient
 
 - 
listOperationsDetailspublic RequestResponse<ProcessDetail> listOperationsDetails(ProcessQuery query) Description copied from interface:ProcessingManagementClientRetrieve all the workflow operations- Specified by:
- listOperationsDetailsin interface- ProcessingManagementClient
- Parameters:
- query- Query model
- Returns:
- All details of the operations
 
 - 
getWorkflowDefinitionspublic RequestResponse<WorkFlow> getWorkflowDefinitions() Description copied from interface:ProcessingManagementClientRetrieve all the workflow definitions.- Specified by:
- getWorkflowDefinitionsin interface- ProcessingManagementClient
- Returns:
- map of workflow definitions by id
 
 - 
getWorkflowDetailspublic java.util.Optional<WorkFlow> getWorkflowDetails(java.lang.String WorkflowIdentifier) - Specified by:
- getWorkflowDetailsin interface- ProcessingManagementClient
- Returns:
 
 - 
initVitamProcesspublic void initVitamProcess(ProcessingEntry entry) Description copied from interface:ProcessingManagementClientinitVitamProcess woth processing entry- Specified by:
- initVitamProcessin interface- ProcessingManagementClient
 
 - 
forcePausepublic RequestResponse<ProcessPause> forcePause(ProcessPause info) Description copied from interface:ProcessingManagementClientAdd a forced pause on the tenant and/or the type of process- Specified by:
- forcePausein interface- ProcessingManagementClient
 
 - 
removeForcePausepublic RequestResponse<ProcessPause> removeForcePause(ProcessPause info) Description copied from interface:ProcessingManagementClientRemoved the forced pause on the tenant and/or the type of process- Specified by:
- removeForcePausein interface- ProcessingManagementClient
 
 
- 
 
-