Class 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 object
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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:
        java.lang.IllegalArgumentException - if any parameter is null or empty