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 Details

    • newWorkerParameters

      public static DefaultWorkerParameters newWorkerParameters()
      Get a new empty WorkerParameters object
      Returns:
      the new instance of WorkerParameters
    • newWorkerParameters

      public static DefaultWorkerParameters newWorkerParameters(String processId, String stepUniqId, String containerName, String currentStep, List<String> objectNameList, String urlMetadata, String urlWorkspace)
      Get a new WorkerParameters object
      Parameters:
      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