Package fr.gouv.vitam.ingest.internal.client

# Class IngestInternalClientMock

java.lang.Object
fr.gouv.vitam.common.client.AbstractMockClient
fr.gouv.vitam.ingest.internal.client.IngestInternalClientMock

All Implemented Interfaces:
  `MockOrRestClient`, `VitamAutoCloseable`, `IngestInternalClient`, `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 final String`
  `ID`
  identifier of execution

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IngestInternalClientMock()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `RequestResponse<ItemStatus>`
  `cancelOperationProcessExecution(String id, boolean force)`
  cancelOperationProcessExecution : cancel processing operation
  `jakarta.ws.rs.core.Response`
  `downloadObjectAsync(String objectId, IngestCollection type)`
  Download object stored by ingest operation
  `RequestResponse<ItemStatus>`
  `getOperationProcessExecutionDetails(String id)`
  getOperationProcessExecutionDetails : get operation processing execution details
  `ItemStatus`
  `getOperationProcessStatus(String id)`
  getOperationProcessStatus: get operation process status**
  `RequestResponse<WorkFlow>`
  `getWorkflowDefinitions()`
  Retrieve all the workflow definitions.
  `Optional<WorkFlow>`
  `getWorkflowDetails(String WorkflowIdentifier)`
  `void`
  `initWorkflow(WorkFlow contextId)`
  initWorkflow : init workFlow Process
  `RequestResponse<ProcessDetail>`
  `listOperationsDetails(ProcessQuery query)`
  Retrieve all the workflow operations
  `void`
  `saveObjectToWorkspace(String id, String objectName, InputStream inputStream)`
  `RequestResponse<ItemStatus>`
  `updateOperationActionProcess(String actionId, String operationId)`
  updateOperationActionProcess : update operation processing status
  `void`
  `upload(InputStream inputStream, jakarta.ws.rs.core.MediaType archiveType, WorkFlow workflowIdentifier, String action)`
  Upload compressed SIP as stream
  `void`
  `uploadInitialLogbook(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 Details

  - ### ID

    public static final String ID
    identifier of execution
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### IngestInternalClientMock

    public IngestInternalClientMock()

- ## Method Details

  - ### upload

    public void upload(InputStream inputStream, jakarta.ws.rs.core.MediaType archiveType, WorkFlow workflowIdentifier, String action)
    Description copied from interface: `IngestInternalClient`
    Upload compressed SIP as stream
    Specified by:
      `upload` in interface `IngestInternalClient`
    Parameters:
      `inputStream` - SIP
      `archiveType` - is a format (mime type) of SIP (should be zip ,tar, tar.gz or tar.bz2)
      `workflowIdentifier` - workflow information
      `action` - Identifier

  - ### uploadInitialLogbook

    public void uploadInitialLogbook(Iterable<LogbookOperationParameters> logbookParametersList)
    Description copied from interface: `IngestInternalClient`
    Create only Logbook
    Specified by:
      `uploadInitialLogbook` in interface `IngestInternalClient`
    Parameters:
      `logbookParametersList` -

  - ### downloadObjectAsync

    public jakarta.ws.rs.core.Response downloadObjectAsync(String objectId, IngestCollection type)
    Description copied from interface: `IngestInternalClient`
    Download object stored by ingest operation
    Specified by:
      `downloadObjectAsync` in interface `IngestInternalClient`
    Parameters:
      `objectId` -
      `type` -
    Returns:
      object as stream

  - ### getOperationProcessStatus

    public ItemStatus getOperationProcessStatus(String id)
    Description copied from interface: `IngestInternalClient`
    getOperationProcessStatus: get operation process status**
    Specified by:
      `getOperationProcessStatus` in interface `IngestInternalClient`
    Parameters:
      `id` - : operation identifier*
    Returns:
      ItemStatus response containing message and status*

  - ### getOperationProcessExecutionDetails

    public RequestResponse<ItemStatus> getOperationProcessExecutionDetails(String id)
    Description copied from interface: `IngestInternalClient`
    getOperationProcessExecutionDetails : get operation processing execution details
    Specified by:
      `getOperationProcessExecutionDetails` in interface `IngestInternalClient`
    Parameters:
      `id` - : operation identifier
    Returns:
      Engine response containing message and status

  - ### cancelOperationProcessExecution

    public RequestResponse<ItemStatus> cancelOperationProcessExecution(String id, boolean force)
    Description copied from interface: `IngestInternalClient`
    cancelOperationProcessExecution : cancel processing operation
    Specified by:
      `cancelOperationProcessExecution` in interface `IngestInternalClient`
    Parameters:
      `id` - operation identifier
      `force` - force operation if step is not cancellable
    Returns:
      ItemStatus response containing message and status

  - ### updateOperationActionProcess

    public RequestResponse<ItemStatus> updateOperationActionProcess(String actionId, String operationId)
    Description copied from interface: `IngestInternalClient`
    updateOperationActionProcess : update operation processing status
    Specified by:
      `updateOperationActionProcess` in interface `IngestInternalClient`
    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 interface `IngestInternalClient`
    Parameters:
      `contextId` - information

  - ### listOperationsDetails

    public RequestResponse<ProcessDetail> listOperationsDetails(ProcessQuery query)
    Description copied from interface: `IngestInternalClient`
    Retrieve all the workflow operations
    Specified by:
      `listOperationsDetails` in interface `IngestInternalClient`
    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 interface `IngestInternalClient`
    Returns:
      workflow definitions

  - ### getWorkflowDetails

    public Optional<WorkFlow> getWorkflowDetails(String WorkflowIdentifier)
    Specified by:
      `getWorkflowDetails` in interface `IngestInternalClient`
    Parameters:
      `WorkflowIdentifier` -
    Returns:

  - ### saveObjectToWorkspace

    public void saveObjectToWorkspace(String id, String objectName, InputStream inputStream) throws VitamClientException
    Specified by:
      `saveObjectToWorkspace` in interface `IngestInternalClient`
    Throws:
      `VitamClientException`