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

# Class WorkerParametersFactory

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

public class WorkerParametersFactory extends Object
Worker parameters factory Factory to get WorkerParameters object Example:

          // Retrieve worker parameters with standard required fields
          WorkerParameters parameters = WorkerParametersFactory.newWorkerParameters();

          // Retrieve worker parameters with standard required fields and specifics required fields
          Set<WorkerParameterName> specificMandatoryFields = new HashSet<>()
          // add specific fields
          specificMandatoryFields.add(WorkerParameterName.objectId);
          specificMandatoryFields.add(WorkerParameterName.objectName);

          // Retrieve parameter object
          parameters = WorkerParametersFactory.newWorkerParameters(specificMandatoryFields);

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DefaultWorkerParameters`
  `newWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext)`
  Get a new empty WorkerParameters object
  `static DefaultWorkerParameters`
  `newWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext, String processId, String stepUniqId, String containerName, String currentStep, List<String> objectNameList, String urlMetadata, String urlWorkspace)`
  Get a new WorkerParameters object

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

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

- ## Method Details

  - ### newWorkerParameters

    public static DefaultWorkerParameters newWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext)
    Get a new empty WorkerParameters object
    Parameters:
      `workFlowExecutionContext` - the execution context
    Returns:
      the new instance of WorkerParameters

  - ### newWorkerParameters

    public static DefaultWorkerParameters newWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext, String processId, String stepUniqId, String containerName, String currentStep, List<String> objectNameList, String urlMetadata, String urlWorkspace)
    Get a new WorkerParameters object
    Parameters:
      `workFlowExecutionContext` - the execution context
      `processId` - unique id (GUID) of the workflow to be executed (can be null)
      `stepUniqId` - unique id of a step. The pattern of the id is : {CONTAINER_NAME}_{WORKFLOW_ID}_{STEP_RANK_IN_THE_WORKFLOW}_{STEP_NAME}
      `containerName` - name of the container to be uploaded
      `currentStep` - current name of the step to be processed
      `objectNameList` - List name/path of the object to be processed
      `urlMetadata` - url of metadata resources
      `urlWorkspace` - url of workspace resources
    Returns:
      the new instance of WorkerParameters
    Throws:
      `IllegalArgumentException` - if any parameter is null or empty