Package fr.gouv.vitam.processing.common.parameter

# Class DefaultWorkerParameters

java.lang.Object
fr.gouv.vitam.processing.common.parameter.DefaultWorkerParameters

All Implemented Interfaces:
  `VitamParameter<WorkerParameterName>`, `WorkerParameters`

public class DefaultWorkerParameters extends Object
Default parameters for worker

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected WorkFlowExecutionContext`
  `executionContext`
  `protected final Set<WorkerParameterName>`
  `mandatoryParameters`
  `protected final Map<WorkerParameterName,String>`
  `mapParameters`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `DefaultWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext, Map<String,String> map)`
  Builder for REST

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getContainerName()`
  Get container name parameter
  `String`
  `getCurrentStep()`
  Get the current step parameter
  `WorkFlowExecutionContext`
  `getExecutionContext()`
  Get workflow execution context (VITAM or COLLECT)
  `LogbookTypeProcess`
  `getLogbookTypeProcess()`
  Get the logbook Type Process
  `Set<WorkerParameterName>`
  `getMandatoriesParameters()`
  Get the attributes name which not have to be empty or null
  `Map<WorkerParameterName,String>`
  `getMapParameters()`
  Get all the parameters
  `String`
  `getMetadataRequest()`
  Get the metadata request parameter
  `String`
  `getObjectId()`
  Get the object id parameter
  `com.fasterxml.jackson.databind.JsonNode`
  `getObjectMetadata()`
  Get the object metadata parameter
  `List<com.fasterxml.jackson.databind.JsonNode>`
  `getObjectMetadataList()`
  Get the object metadata parameter
  `String`
  `getObjectName()`
  Get the object name parameter
  `List<String>`
  `getObjectNameList()`
  Get the object name parameter
  `String`
  `getParameterValue(WorkerParameterName parameterName)`
  Get the parameter according to the parameterName
  `String`
  `getPreviousStep()`
  Get the previous step parameter
  `String`
  `getProcessId()`
  Get the process id parameter
  `String`
  `getRequestId()`
  `String`
  `getUrlMetadata()`
  Get the url of metadata resource parameter
  `String`
  `getUrlWorkspace()`
  Get the url of workspace resource parameter
  `String`
  `getWorkerGUID()`
  Get the worker GUID parameter
  `String`
  `getWorkflowIdentifier()`
  `String`
  `getWorkflowStatusKo()`
  `DefaultWorkerParameters`
  `newInstance(WorkFlowExecutionContext workFlowExecutionContext)`
  Shallow copy of DefaultWorkerParameter
  `WorkerParameters`
  `putParameterValue(WorkerParameterName parameterName, String parameterValue)`
  Put parameterValue on mapParameters with parameterName key
  If parameterKey already exists, then override it (no check)
  `WorkerParameters`
  `setContainerName(String containerName)`
  Set the container name value
  `WorkerParameters`
  `setCurrentStep(String currentStep)`
  Set the current step value
  `WorkerParameters`
  `setExecutionContext(WorkFlowExecutionContext executionContext)`
  Set the workflow execution context (VITAM or COLLECT)
  `WorkerParameters`
  `setFromParameters(WorkerParameters parameters)`
  Set parameters from another WorkerParameters
  `WorkerParameters`
  `setLogbookTypeProcess(LogbookTypeProcess logbookTypeProcess)`
  Set the logbook Type Process
  `WorkerParameters`
  `setMap(Map<String,String> map)`
  Set from map using String as Key
  `WorkerParameters`
  `setMetadataRequest(String metadataRequest)`
  Set the request metadata request value
  `WorkerParameters`
  `setObjectId(String objectId)`
  Set the object id value
  `WorkerParameters`
  `setObjectMetadata(com.fasterxml.jackson.databind.JsonNode objectMetadata)`
  Set the object metadata value
  `WorkerParameters`
  `setObjectMetadataList(List<com.fasterxml.jackson.databind.JsonNode> objectMetaDataList)`
  Set the object metadata value
  `WorkerParameters`
  `setObjectName(String objectName)`
  Set the object name value
  `WorkerParameters`
  `setObjectNameList(List<String> objectNameList)`
  Set the object name value
  `WorkerParameters`
  `setPreviousStep(String previousStep)`
  Set the previous step value
  `WorkerParameters`
  `setProcessId(String processId)`
  Set the process id value
  `WorkerParameters`
  `setRequestId(String newRequestId)`
  setRequestId.
  `WorkerParameters`
  `setUrlMetadata(String urlMetadata)`
  Set the url of metadata resource value
  `WorkerParameters`
  `setUrlWorkspace(String urlWorkspace)`
  Set the url of workspace resource value
  `WorkerParameters`
  `setWorkerGUID(String workerGUID)`
  Set the worker GUID value
  `WorkerParameters`
  `setWorkflowIdentifier(String workflowIdentifier)`
  Set the logbook Type Process
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### executionContext

    protected WorkFlowExecutionContext executionContext

  - ### mapParameters

    protected final Map<WorkerParameterName,String> mapParameters

  - ### mandatoryParameters

    protected final Set<WorkerParameterName> mandatoryParameters

- ## Constructor Details

  - ### DefaultWorkerParameters

    protected DefaultWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext, Map<String,String> map)
    Builder for REST
    Parameters:
      `workFlowExecutionContext` - the execution context
      `map` - the wanted parameters
    Throws:
      `IllegalArgumentException` - if one key is not allowed

- ## Method Details

  - ### newInstance

    public DefaultWorkerParameters newInstance(WorkFlowExecutionContext workFlowExecutionContext)
    Shallow copy of DefaultWorkerParameter
    Parameters:
      `workFlowExecutionContext` - the execution context
    Returns:
      the shallow copy

  - ### getExecutionContext

    public WorkFlowExecutionContext getExecutionContext()
    Description copied from interface: `WorkerParameters`
    Get workflow execution context (VITAM or COLLECT)
    Specified by:
      `getExecutionContext` in interface `WorkerParameters`
    Returns:
      the current workflow execution context

  - ### setExecutionContext

    public WorkerParameters setExecutionContext(WorkFlowExecutionContext executionContext)
    Description copied from interface: `WorkerParameters`
    Set the workflow execution context (VITAM or COLLECT)
    Specified by:
      `setExecutionContext` in interface `WorkerParameters`
    Parameters:
      `executionContext` - the workflow execution context

  - ### getMandatoriesParameters

    public Set<WorkerParameterName> getMandatoriesParameters()
    Description copied from interface: `VitamParameter`
    Get the attributes name which not have to be empty or null
    Specified by:
      `getMandatoriesParameters` in interface `VitamParameter<WorkerParameterName>`
    Returns:
      a set of attributes name

  - ### getMapParameters

    public Map<WorkerParameterName,String> getMapParameters()
    Description copied from interface: `VitamParameter`
    Get all the parameters
    Specified by:
      `getMapParameters` in interface `VitamParameter<WorkerParameterName>`
    Returns:
      a map with all parameters (key = attribute name, value = attribute value)

  - ### putParameterValue

    public WorkerParameters putParameterValue(WorkerParameterName parameterName, String parameterValue)
    Description copied from interface: `WorkerParameters`
    Put parameterValue on mapParameters with parameterName key
    If parameterKey already exists, then override it (no check)
    Specified by:
      `putParameterValue` in interface `WorkerParameters`
    Parameters:
      `parameterName` - the key of the parameter to put on the parameter map
      `parameterValue` - the value to put on the parameter map
    Returns:
      actual instance of WorkerParameter (fluent like)

  - ### getParameterValue

    public String getParameterValue(WorkerParameterName parameterName)
    Description copied from interface: `WorkerParameters`
    Get the parameter according to the parameterName
    Specified by:
      `getParameterValue` in interface `WorkerParameters`
    Parameters:
      `parameterName` - the wanted parameter
    Returns:
      the value or null if not found

  - ### setMap

    public WorkerParameters setMap(Map<String,String> map)
    Description copied from interface: `WorkerParameters`
    Set from map using String as Key
    Specified by:
      `setMap` in interface `WorkerParameters`
    Parameters:
      `map` - the map parameters to set
    Returns:
      the current instance of WorkerParameters

  - ### getCurrentStep

    public String getCurrentStep()
    Description copied from interface: `WorkerParameters`
    Get the current step parameter
    Specified by:
      `getCurrentStep` in interface `WorkerParameters`
    Returns:
      the current step value

  - ### setCurrentStep

    public WorkerParameters setCurrentStep(String currentStep)
    Description copied from interface: `WorkerParameters`
    Set the current step value
    Specified by:
      `setCurrentStep` in interface `WorkerParameters`
    Parameters:
      `currentStep` - the current step value
    Returns:
      the current instance of WorkerParameters

  - ### getPreviousStep

    public String getPreviousStep()
    Description copied from interface: `WorkerParameters`
    Get the previous step parameter
    Specified by:
      `getPreviousStep` in interface `WorkerParameters`
    Returns:
      the previous step value

  - ### setPreviousStep

    public WorkerParameters setPreviousStep(String previousStep)
    Description copied from interface: `WorkerParameters`
    Set the previous step value
    Specified by:
      `setPreviousStep` in interface `WorkerParameters`
    Parameters:
      `previousStep` - the current step value
    Returns:
      the current instance of WorkerParameters

  - ### getContainerName

    public String getContainerName()
    Description copied from interface: `WorkerParameters`
    Get container name parameter
    Specified by:
      `getContainerName` in interface `WorkerParameters`
    Returns:
      the container name value

  - ### setContainerName

    public WorkerParameters setContainerName(String containerName)
    Description copied from interface: `WorkerParameters`
    Set the container name value
    Specified by:
      `setContainerName` in interface `WorkerParameters`
    Parameters:
      `containerName` - the container name value
    Returns:
      the current instance of WorkerParameter

  - ### getObjectId

    public String getObjectId()
    Description copied from interface: `WorkerParameters`
    Get the object id parameter
    Specified by:
      `getObjectId` in interface `WorkerParameters`
    Returns:
      the object id value

  - ### setObjectId

    public WorkerParameters setObjectId(String objectId)
    Description copied from interface: `WorkerParameters`
    Set the object id value
    Specified by:
      `setObjectId` in interface `WorkerParameters`
    Parameters:
      `objectId` - the object id value
    Returns:
      the current instance of WorkerParameter

  - ### getObjectName

    public String getObjectName()
    Description copied from interface: `WorkerParameters`
    Get the object name parameter
    Specified by:
      `getObjectName` in interface `WorkerParameters`
    Returns:
      the object name value

  - ### setObjectName

    public WorkerParameters setObjectName(String objectName)
    Description copied from interface: `WorkerParameters`
    Set the object name value
    Specified by:
      `setObjectName` in interface `WorkerParameters`
    Parameters:
      `objectName` - the object name value
    Returns:
      the current instance of WorkerParameter

  - ### getObjectMetadata

    public com.fasterxml.jackson.databind.JsonNode getObjectMetadata()
    Description copied from interface: `WorkerParameters`
    Get the object metadata parameter
    Specified by:
      `getObjectMetadata` in interface `WorkerParameters`
    Returns:
      the object metadata value

  - ### setObjectMetadata

    public WorkerParameters setObjectMetadata(com.fasterxml.jackson.databind.JsonNode objectMetadata)
    Description copied from interface: `WorkerParameters`
    Set the object metadata value
    Specified by:
      `setObjectMetadata` in interface `WorkerParameters`
    Parameters:
      `objectMetadata` - the object metadata value
    Returns:
      the current instance of WorkerParameter

  - ### getObjectNameList

    public List<String> getObjectNameList()
    Description copied from interface: `WorkerParameters`
    Get the object name parameter
    Specified by:
      `getObjectNameList` in interface `WorkerParameters`
    Returns:
      the object name value

  - ### setObjectNameList

    public WorkerParameters setObjectNameList(List<String> objectNameList)
    Description copied from interface: `WorkerParameters`
    Set the object name value
    Specified by:
      `setObjectNameList` in interface `WorkerParameters`
    Parameters:
      `objectNameList` - the object name value
    Returns:
      the current instance of WorkerParameter

  - ### getObjectMetadataList

    public List<com.fasterxml.jackson.databind.JsonNode> getObjectMetadataList()
    Description copied from interface: `WorkerParameters`
    Get the object metadata parameter
    Specified by:
      `getObjectMetadataList` in interface `WorkerParameters`
    Returns:
      the object name value

  - ### setObjectMetadataList

    public WorkerParameters setObjectMetadataList(List<com.fasterxml.jackson.databind.JsonNode> objectMetaDataList)
    Description copied from interface: `WorkerParameters`
    Set the object metadata value
    Specified by:
      `setObjectMetadataList` in interface `WorkerParameters`
    Parameters:
      `objectMetaDataList` - the object metadataList value
    Returns:
      the current instance of WorkerParameter

  - ### getMetadataRequest

    public String getMetadataRequest()
    Description copied from interface: `WorkerParameters`
    Get the metadata request parameter
    Specified by:
      `getMetadataRequest` in interface `WorkerParameters`
    Returns:
      the metadata request value

  - ### setMetadataRequest

    public WorkerParameters setMetadataRequest(String metadataRequest)
    Description copied from interface: `WorkerParameters`
    Set the request metadata request value
    Specified by:
      `setMetadataRequest` in interface `WorkerParameters`
    Parameters:
      `metadataRequest` - the metadata request value
    Returns:
      the current instance of WorkerParameter

  - ### getWorkerGUID

    public String getWorkerGUID()
    Description copied from interface: `WorkerParameters`
    Get the worker GUID parameter
    Specified by:
      `getWorkerGUID` in interface `WorkerParameters`
    Returns:
      the worker GUID value

  - ### setWorkerGUID

    public WorkerParameters setWorkerGUID(String workerGUID)
    Description copied from interface: `WorkerParameters`
    Set the worker GUID value
    Specified by:
      `setWorkerGUID` in interface `WorkerParameters`
    Parameters:
      `workerGUID` - the worker GUID value
    Returns:
      the current instance of WorkerParameters

  - ### getProcessId

    public String getProcessId()
    Description copied from interface: `WorkerParameters`
    Get the process id parameter
    Specified by:
      `getProcessId` in interface `WorkerParameters`
    Returns:
      the process id value

  - ### setProcessId

    public WorkerParameters setProcessId(String processId)
    Description copied from interface: `WorkerParameters`
    Set the process id value
    Specified by:
      `setProcessId` in interface `WorkerParameters`
    Parameters:
      `processId` - the process id value
    Returns:
      the current instance of WorkerParameters

  - ### getUrlMetadata

    public String getUrlMetadata()
    Description copied from interface: `WorkerParameters`
    Get the url of metadata resource parameter
    Specified by:
      `getUrlMetadata` in interface `WorkerParameters`
    Returns:
      the url of metadata resource value

  - ### setUrlMetadata

    public WorkerParameters setUrlMetadata(String urlMetadata)
    Description copied from interface: `WorkerParameters`
    Set the url of metadata resource value
    Specified by:
      `setUrlMetadata` in interface `WorkerParameters`
    Parameters:
      `urlMetadata` - the url of metadata resource value
    Returns:
      the current instance of WorkerParameters

  - ### getUrlWorkspace

    public String getUrlWorkspace()
    Description copied from interface: `WorkerParameters`
    Get the url of workspace resource parameter
    Specified by:
      `getUrlWorkspace` in interface `WorkerParameters`
    Returns:
      the url of workspace resource value

  - ### setUrlWorkspace

    public WorkerParameters setUrlWorkspace(String urlWorkspace)
    Description copied from interface: `WorkerParameters`
    Set the url of workspace resource value
    Specified by:
      `setUrlWorkspace` in interface `WorkerParameters`
    Parameters:
      `urlWorkspace` - the url of workspace resource value
    Returns:
      the current instance of WorkerParameters

  - ### getLogbookTypeProcess

    public LogbookTypeProcess getLogbookTypeProcess()
    Description copied from interface: `WorkerParameters`
    Get the logbook Type Process
    Specified by:
      `getLogbookTypeProcess` in interface `WorkerParameters`
    Returns:
      the logbook Type Process

  - ### setLogbookTypeProcess

    public WorkerParameters setLogbookTypeProcess(LogbookTypeProcess logbookTypeProcess)
    Description copied from interface: `WorkerParameters`
    Set the logbook Type Process
    Specified by:
      `setLogbookTypeProcess` in interface `WorkerParameters`
    Parameters:
      `logbookTypeProcess` - the logbook Type Process
    Returns:
      the current instance of WorkerParameters

  - ### getWorkflowIdentifier

    public String getWorkflowIdentifier()
    Specified by:
      `getWorkflowIdentifier` in interface `WorkerParameters`
    Returns:
      workflowIdentifier

  - ### setWorkflowIdentifier

    public WorkerParameters setWorkflowIdentifier(String workflowIdentifier)
    Description copied from interface: `WorkerParameters`
    Set the logbook Type Process
    Specified by:
      `setWorkflowIdentifier` in interface `WorkerParameters`
    Parameters:
      `workflowIdentifier` -
    Returns:
      the current instance of WorkerParameters

  - ### setFromParameters

    public WorkerParameters setFromParameters(WorkerParameters parameters)
    Description copied from interface: `WorkerParameters`
    Set parameters from another WorkerParameters
    Specified by:
      `setFromParameters` in interface `WorkerParameters`
    Parameters:
      `parameters` - the parameters to set
    Returns:
      the current instance of WorkerParameters

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getRequestId

    public String getRequestId()
    Specified by:
      `getRequestId` in interface `WorkerParameters`
    Returns:
      the current X-Request-Id

  - ### setRequestId

    public WorkerParameters setRequestId(String newRequestId)
    Description copied from interface: `WorkerParameters`
    setRequestId.
    Specified by:
      `setRequestId` in interface `WorkerParameters`
    Parameters:
      `newRequestId` -
    Returns:

  - ### getWorkflowStatusKo

    public String getWorkflowStatusKo()
    Specified by:
      `getWorkflowStatusKo` in interface `WorkerParameters`
    Returns:
      workflowStatusKo