Class WorkerParametersFactory
- java.lang.Object
-
- fr.gouv.vitam.processing.common.parameter.WorkerParametersFactory
-
public class WorkerParametersFactory extends java.lang.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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DefaultWorkerParameters
newWorkerParameters()
Get a new empty WorkerParameters objectstatic DefaultWorkerParameters
newWorkerParameters(java.lang.String processId, java.lang.String stepUniqId, java.lang.String containerName, java.lang.String currentStep, java.util.List<java.lang.String> objectNameList, java.lang.String urlMetadata, java.lang.String urlWorkspace)
Get a new WorkerParameters object
-
-
-
Method Detail
-
newWorkerParameters
public static DefaultWorkerParameters newWorkerParameters()
Get a new empty WorkerParameters object- Returns:
- the new instance of WorkerParameters
-
newWorkerParameters
public static DefaultWorkerParameters newWorkerParameters(java.lang.String processId, java.lang.String stepUniqId, java.lang.String containerName, java.lang.String currentStep, java.util.List<java.lang.String> objectNameList, java.lang.String urlMetadata, java.lang.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 uploadedcurrentStep
- current name of the step to be processedobjectNameList
- List name/path of the object to be processedurlMetadata
- url of metadata resourcesurlWorkspace
- url of workspace resources- Returns:
- the new instance of WorkerParameters
- Throws:
java.lang.IllegalArgumentException
- if any parameter is null or empty
-
-