Class IngestInternalClientMock
- java.lang.Object
-
- fr.gouv.vitam.common.client.AbstractMockClient
-
- fr.gouv.vitam.ingest.internal.client.IngestInternalClientMock
-
- All Implemented Interfaces:
MockOrRestClient
,VitamAutoCloseable
,IngestInternalClient
,java.lang.AutoCloseable
public class IngestInternalClientMock extends AbstractMockClient implements IngestInternalClient
Mock client implementation for Ingest Internal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fr.gouv.vitam.common.client.AbstractMockClient
AbstractMockClient.FakeInboundResponse
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ID
identifier of execution
-
Constructor Summary
Constructors Constructor Description IngestInternalClientMock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestResponse<ItemStatus>
cancelOperationProcessExecution(java.lang.String id)
cancelOperationProcessExecution : cancel processing operationjavax.ws.rs.core.Response
downloadObjectAsync(java.lang.String objectId, IngestCollection type)
Download object stored by ingest operationRequestResponse<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
initWorkflow(WorkFlow contextId)
initWorkflow : init workFlow ProcessRequestResponse<ProcessDetail>
listOperationsDetails(ProcessQuery query)
Retrieve all the workflow operationsvoid
saveObjectToWorkspace(java.lang.String id, java.lang.String objectName, java.io.InputStream inputStream)
RequestResponse<ItemStatus>
updateOperationActionProcess(java.lang.String actionId, java.lang.String operationId)
updateOperationActionProcess : update operation processing statusvoid
upload(java.io.InputStream inputStream, javax.ws.rs.core.MediaType archiveType, WorkFlow workflowIdentifier, java.lang.String action)
Upload compressed SIP as streamvoid
uploadFinalLogbook(java.lang.Iterable<LogbookOperationParameters> logbookParametersList)
Finalize the ingest operation by sending back the final Logbook Operation entries from Ingest externalvoid
uploadInitialLogbook(java.lang.Iterable<LogbookOperationParameters> logbookParametersList)
Create only Logbook-
Methods inherited from class fr.gouv.vitam.common.client.AbstractMockClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.gouv.vitam.common.client.MockOrRestClient
checkStatus, checkStatus, close, consumeAnyEntityAndClose, getResourcePath, getServiceUrl
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
identifier of execution- See Also:
- Constant Field Values
-
-
Method Detail
-
upload
public void upload(java.io.InputStream inputStream, javax.ws.rs.core.MediaType archiveType, WorkFlow workflowIdentifier, java.lang.String action)
Description copied from interface:IngestInternalClient
Upload compressed SIP as stream- Specified by:
upload
in interfaceIngestInternalClient
- Parameters:
inputStream
- SIParchiveType
- is a format (mime type) of SIP (should be zip ,tar, tar.gz or tar.bz2)workflowIdentifier
- workflow informationaction
- Identifier
-
uploadInitialLogbook
public void uploadInitialLogbook(java.lang.Iterable<LogbookOperationParameters> logbookParametersList)
Description copied from interface:IngestInternalClient
Create only Logbook- Specified by:
uploadInitialLogbook
in interfaceIngestInternalClient
-
uploadFinalLogbook
public void uploadFinalLogbook(java.lang.Iterable<LogbookOperationParameters> logbookParametersList)
Description copied from interface:IngestInternalClient
Finalize the ingest operation by sending back the final Logbook Operation entries from Ingest external- Specified by:
uploadFinalLogbook
in interfaceIngestInternalClient
-
downloadObjectAsync
public javax.ws.rs.core.Response downloadObjectAsync(java.lang.String objectId, IngestCollection type)
Description copied from interface:IngestInternalClient
Download object stored by ingest operation- Specified by:
downloadObjectAsync
in interfaceIngestInternalClient
- Returns:
- object as stream
-
getOperationProcessStatus
public ItemStatus getOperationProcessStatus(java.lang.String id)
Description copied from interface:IngestInternalClient
getOperationProcessStatus: get operation process status**- Specified by:
getOperationProcessStatus
in interfaceIngestInternalClient
- Parameters:
id
- : operation identifier*- Returns:
- ItemStatus response containing message and status*
-
getOperationProcessExecutionDetails
public RequestResponse<ItemStatus> getOperationProcessExecutionDetails(java.lang.String id)
Description copied from interface:IngestInternalClient
getOperationProcessExecutionDetails : get operation processing execution details- Specified by:
getOperationProcessExecutionDetails
in interfaceIngestInternalClient
- Parameters:
id
- : operation identifier- Returns:
- Engine response containing message and status
-
cancelOperationProcessExecution
public RequestResponse<ItemStatus> cancelOperationProcessExecution(java.lang.String id)
Description copied from interface:IngestInternalClient
cancelOperationProcessExecution : cancel processing operation- Specified by:
cancelOperationProcessExecution
in interfaceIngestInternalClient
- Parameters:
id
- : operation identifier- Returns:
- ItemStatus response containing message and status
-
updateOperationActionProcess
public RequestResponse<ItemStatus> updateOperationActionProcess(java.lang.String actionId, java.lang.String operationId)
Description copied from interface:IngestInternalClient
updateOperationActionProcess : update operation processing status- Specified by:
updateOperationActionProcess
in interfaceIngestInternalClient
- Parameters:
actionId
- : identify the action to be executed by the workflow(next , pause,resume)operationId
- : operation identifier- Returns:
- Response containing message and status
-
initWorkflow
public void initWorkflow(WorkFlow contextId)
Description copied from interface:IngestInternalClient
initWorkflow : init workFlow Process- Specified by:
initWorkflow
in interfaceIngestInternalClient
- Parameters:
contextId
- information
-
listOperationsDetails
public RequestResponse<ProcessDetail> listOperationsDetails(ProcessQuery query)
Description copied from interface:IngestInternalClient
Retrieve all the workflow operations- Specified by:
listOperationsDetails
in interfaceIngestInternalClient
- Parameters:
query
- Query model- Returns:
- All details of the operations
-
getWorkflowDefinitions
public RequestResponse<WorkFlow> getWorkflowDefinitions()
Description copied from interface:IngestInternalClient
Retrieve all the workflow definitions.- Specified by:
getWorkflowDefinitions
in interfaceIngestInternalClient
- Returns:
- workflow definitions
-
getWorkflowDetails
public java.util.Optional<WorkFlow> getWorkflowDetails(java.lang.String WorkflowIdentifier)
- Specified by:
getWorkflowDetails
in interfaceIngestInternalClient
- Returns:
-
saveObjectToWorkspace
public void saveObjectToWorkspace(java.lang.String id, java.lang.String objectName, java.io.InputStream inputStream) throws VitamClientException
- Specified by:
saveObjectToWorkspace
in interfaceIngestInternalClient
- Throws:
VitamClientException
-
-