Class DefaultWorkerParameters
java.lang.Object
fr.gouv.vitam.processing.common.parameter.DefaultWorkerParameters
- All Implemented Interfaces:
VitamParameter<WorkerParameterName>,WorkerParameters
Default parameters for worker
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected WorkFlowExecutionContextprotected final Set<WorkerParameterName>protected final Map<WorkerParameterName,String> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext, Map<String, String> map) Builder for REST -
Method Summary
Modifier and TypeMethodDescriptionGet container name parameterGet the current step parameterGet workflow execution context (VITAM or COLLECT)Get the logbook Type ProcessGet the attributes name which not have to be empty or nullGet all the parametersGet the metadata request parameterGet the object id parametercom.fasterxml.jackson.databind.JsonNodeGet the object metadata parameterList<com.fasterxml.jackson.databind.JsonNode>Get the object metadata parameterGet the object name parameterGet the object name parametergetParameterValue(WorkerParameterName parameterName) Get the parameter according to the parameterNameGet the previous step parameterGet the process id parameterGet the url of metadata resource parameterGet the url of workspace resource parameterGet the worker GUID parameternewInstance(WorkFlowExecutionContext workFlowExecutionContext) Shallow copy of DefaultWorkerParameterputParameterValue(WorkerParameterName parameterName, String parameterValue) Put parameterValue on mapParameters with parameterName key
If parameterKey already exists, then override it (no check)setContainerName(String containerName) Set the container name valuesetCurrentStep(String currentStep) Set the current step valuesetExecutionContext(WorkFlowExecutionContext executionContext) Set the workflow execution context (VITAM or COLLECT)setFromParameters(WorkerParameters parameters) Set parameters from another WorkerParameterssetLogbookTypeProcess(LogbookTypeProcess logbookTypeProcess) Set the logbook Type ProcessSet from map using String as KeysetMetadataRequest(String metadataRequest) Set the request metadata request valuesetObjectId(String objectId) Set the object id valuesetObjectMetadata(com.fasterxml.jackson.databind.JsonNode objectMetadata) Set the object metadata valuesetObjectMetadataList(List<com.fasterxml.jackson.databind.JsonNode> objectMetaDataList) Set the object metadata valuesetObjectName(String objectName) Set the object name valuesetObjectNameList(List<String> objectNameList) Set the object name valuesetPreviousStep(String previousStep) Set the previous step valuesetProcessId(String processId) Set the process id valuesetRequestId(String newRequestId) setRequestId.setUrlMetadata(String urlMetadata) Set the url of metadata resource valuesetUrlWorkspace(String urlWorkspace) Set the url of workspace resource valuesetWorkerGUID(String workerGUID) Set the worker GUID valuesetWorkflowIdentifier(String workflowIdentifier) Set the logbook Type ProcesstoString()
-
Field Details
-
executionContext
-
mapParameters
-
mandatoryParameters
-
-
Constructor Details
-
DefaultWorkerParameters
protected DefaultWorkerParameters(WorkFlowExecutionContext workFlowExecutionContext, Map<String, String> map) Builder for REST- Parameters:
workFlowExecutionContext- the execution contextmap- the wanted parameters- Throws:
IllegalArgumentException- if one key is not allowed
-
-
Method Details
-
newInstance
Shallow copy of DefaultWorkerParameter- Parameters:
workFlowExecutionContext- the execution context- Returns:
- the shallow copy
-
getExecutionContext
Description copied from interface:WorkerParametersGet workflow execution context (VITAM or COLLECT)- Specified by:
getExecutionContextin interfaceWorkerParameters- Returns:
- the current workflow execution context
-
setExecutionContext
Description copied from interface:WorkerParametersSet the workflow execution context (VITAM or COLLECT)- Specified by:
setExecutionContextin interfaceWorkerParameters- Parameters:
executionContext- the workflow execution context
-
getMandatoriesParameters
Description copied from interface:VitamParameterGet the attributes name which not have to be empty or null- Specified by:
getMandatoriesParametersin interfaceVitamParameter<WorkerParameterName>- Returns:
- a set of attributes name
-
getMapParameters
Description copied from interface:VitamParameterGet all the parameters- Specified by:
getMapParametersin interfaceVitamParameter<WorkerParameterName>- Returns:
- a map with all parameters (key = attribute name, value = attribute value)
-
putParameterValue
Description copied from interface:WorkerParametersPut parameterValue on mapParameters with parameterName key
If parameterKey already exists, then override it (no check)- Specified by:
putParameterValuein interfaceWorkerParameters- Parameters:
parameterName- the key of the parameter to put on the parameter mapparameterValue- the value to put on the parameter map- Returns:
- actual instance of WorkerParameter (fluent like)
-
getParameterValue
Description copied from interface:WorkerParametersGet the parameter according to the parameterName- Specified by:
getParameterValuein interfaceWorkerParameters- Parameters:
parameterName- the wanted parameter- Returns:
- the value or null if not found
-
setMap
Description copied from interface:WorkerParametersSet from map using String as Key- Specified by:
setMapin interfaceWorkerParameters- Parameters:
map- the map parameters to set- Returns:
- the current instance of WorkerParameters
-
getCurrentStep
Description copied from interface:WorkerParametersGet the current step parameter- Specified by:
getCurrentStepin interfaceWorkerParameters- Returns:
- the current step value
-
setCurrentStep
Description copied from interface:WorkerParametersSet the current step value- Specified by:
setCurrentStepin interfaceWorkerParameters- Parameters:
currentStep- the current step value- Returns:
- the current instance of WorkerParameters
-
getPreviousStep
Description copied from interface:WorkerParametersGet the previous step parameter- Specified by:
getPreviousStepin interfaceWorkerParameters- Returns:
- the previous step value
-
setPreviousStep
Description copied from interface:WorkerParametersSet the previous step value- Specified by:
setPreviousStepin interfaceWorkerParameters- Parameters:
previousStep- the current step value- Returns:
- the current instance of WorkerParameters
-
getContainerName
Description copied from interface:WorkerParametersGet container name parameter- Specified by:
getContainerNamein interfaceWorkerParameters- Returns:
- the container name value
-
setContainerName
Description copied from interface:WorkerParametersSet the container name value- Specified by:
setContainerNamein interfaceWorkerParameters- Parameters:
containerName- the container name value- Returns:
- the current instance of WorkerParameter
-
getObjectId
Description copied from interface:WorkerParametersGet the object id parameter- Specified by:
getObjectIdin interfaceWorkerParameters- Returns:
- the object id value
-
setObjectId
Description copied from interface:WorkerParametersSet the object id value- Specified by:
setObjectIdin interfaceWorkerParameters- Parameters:
objectId- the object id value- Returns:
- the current instance of WorkerParameter
-
getObjectName
Description copied from interface:WorkerParametersGet the object name parameter- Specified by:
getObjectNamein interfaceWorkerParameters- Returns:
- the object name value
-
setObjectName
Description copied from interface:WorkerParametersSet the object name value- Specified by:
setObjectNamein interfaceWorkerParameters- Parameters:
objectName- the object name value- Returns:
- the current instance of WorkerParameter
-
getObjectMetadata
public com.fasterxml.jackson.databind.JsonNode getObjectMetadata()Description copied from interface:WorkerParametersGet the object metadata parameter- Specified by:
getObjectMetadatain interfaceWorkerParameters- Returns:
- the object metadata value
-
setObjectMetadata
Description copied from interface:WorkerParametersSet the object metadata value- Specified by:
setObjectMetadatain interfaceWorkerParameters- Parameters:
objectMetadata- the object metadata value- Returns:
- the current instance of WorkerParameter
-
getObjectNameList
Description copied from interface:WorkerParametersGet the object name parameter- Specified by:
getObjectNameListin interfaceWorkerParameters- Returns:
- the object name value
-
setObjectNameList
Description copied from interface:WorkerParametersSet the object name value- Specified by:
setObjectNameListin interfaceWorkerParameters- Parameters:
objectNameList- the object name value- Returns:
- the current instance of WorkerParameter
-
getObjectMetadataList
Description copied from interface:WorkerParametersGet the object metadata parameter- Specified by:
getObjectMetadataListin interfaceWorkerParameters- Returns:
- the object name value
-
setObjectMetadataList
public WorkerParameters setObjectMetadataList(List<com.fasterxml.jackson.databind.JsonNode> objectMetaDataList) Description copied from interface:WorkerParametersSet the object metadata value- Specified by:
setObjectMetadataListin interfaceWorkerParameters- Parameters:
objectMetaDataList- the object metadataList value- Returns:
- the current instance of WorkerParameter
-
getMetadataRequest
Description copied from interface:WorkerParametersGet the metadata request parameter- Specified by:
getMetadataRequestin interfaceWorkerParameters- Returns:
- the metadata request value
-
setMetadataRequest
Description copied from interface:WorkerParametersSet the request metadata request value- Specified by:
setMetadataRequestin interfaceWorkerParameters- Parameters:
metadataRequest- the metadata request value- Returns:
- the current instance of WorkerParameter
-
getWorkerGUID
Description copied from interface:WorkerParametersGet the worker GUID parameter- Specified by:
getWorkerGUIDin interfaceWorkerParameters- Returns:
- the worker GUID value
-
setWorkerGUID
Description copied from interface:WorkerParametersSet the worker GUID value- Specified by:
setWorkerGUIDin interfaceWorkerParameters- Parameters:
workerGUID- the worker GUID value- Returns:
- the current instance of WorkerParameters
-
getProcessId
Description copied from interface:WorkerParametersGet the process id parameter- Specified by:
getProcessIdin interfaceWorkerParameters- Returns:
- the process id value
-
setProcessId
Description copied from interface:WorkerParametersSet the process id value- Specified by:
setProcessIdin interfaceWorkerParameters- Parameters:
processId- the process id value- Returns:
- the current instance of WorkerParameters
-
getUrlMetadata
Description copied from interface:WorkerParametersGet the url of metadata resource parameter- Specified by:
getUrlMetadatain interfaceWorkerParameters- Returns:
- the url of metadata resource value
-
setUrlMetadata
Description copied from interface:WorkerParametersSet the url of metadata resource value- Specified by:
setUrlMetadatain interfaceWorkerParameters- Parameters:
urlMetadata- the url of metadata resource value- Returns:
- the current instance of WorkerParameters
-
getUrlWorkspace
Description copied from interface:WorkerParametersGet the url of workspace resource parameter- Specified by:
getUrlWorkspacein interfaceWorkerParameters- Returns:
- the url of workspace resource value
-
setUrlWorkspace
Description copied from interface:WorkerParametersSet the url of workspace resource value- Specified by:
setUrlWorkspacein interfaceWorkerParameters- Parameters:
urlWorkspace- the url of workspace resource value- Returns:
- the current instance of WorkerParameters
-
getLogbookTypeProcess
Description copied from interface:WorkerParametersGet the logbook Type Process- Specified by:
getLogbookTypeProcessin interfaceWorkerParameters- Returns:
- the logbook Type Process
-
setLogbookTypeProcess
Description copied from interface:WorkerParametersSet the logbook Type Process- Specified by:
setLogbookTypeProcessin interfaceWorkerParameters- Parameters:
logbookTypeProcess- the logbook Type Process- Returns:
- the current instance of WorkerParameters
-
getWorkflowIdentifier
- Specified by:
getWorkflowIdentifierin interfaceWorkerParameters- Returns:
- workflowIdentifier
-
setWorkflowIdentifier
Description copied from interface:WorkerParametersSet the logbook Type Process- Specified by:
setWorkflowIdentifierin interfaceWorkerParameters- Returns:
- the current instance of WorkerParameters
-
setFromParameters
Description copied from interface:WorkerParametersSet parameters from another WorkerParameters- Specified by:
setFromParametersin interfaceWorkerParameters- Parameters:
parameters- the parameters to set- Returns:
- the current instance of WorkerParameters
-
toString
-
getRequestId
- Specified by:
getRequestIdin interfaceWorkerParameters- Returns:
- the current X-Request-Id
-
setRequestId
Description copied from interface:WorkerParameterssetRequestId.- Specified by:
setRequestIdin interfaceWorkerParameters- Returns:
-
getWorkflowStatusKo
- Specified by:
getWorkflowStatusKoin interfaceWorkerParameters- Returns:
- workflowStatusKo
-