Class WorkerParametersFactory
java.lang.Object
fr.gouv.vitam.processing.common.parameter.WorkerParametersFactory
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 TypeMethodDescriptionstatic DefaultWorkerParameters
Get a new empty WorkerParameters objectstatic DefaultWorkerParameters
newWorkerParameters
(String processId, String stepUniqId, String containerName, String currentStep, List<String> objectNameList, String urlMetadata, String urlWorkspace) Get a new WorkerParameters object
-
Method Details
-
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 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:
IllegalArgumentException
- if any parameter is null or empty
-