Class DefaultWorkerParameters
java.lang.Object
fr.gouv.vitam.processing.common.parameter.DefaultWorkerParameters
- All Implemented Interfaces:
VitamParameter<WorkerParameterName>
,WorkerParameters
Default parameters for worker
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Set<WorkerParameterName>
protected final Map<WorkerParameterName,
String> -
Constructor Summary
ModifierConstructorDescriptionprotected
Builder for REST -
Method Summary
Modifier and TypeMethodDescriptionGet container name parameterGet the current step parameterGet 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.JsonNode
Get 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 parameterShallow 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 valuesetFromParameters
(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
-
mapParameters
-
mandatoryParameters
-
-
Constructor Details
-
DefaultWorkerParameters
Builder for REST- Parameters:
map
- the wanted parameters- Throws:
IllegalArgumentException
- if one key is not allowed
-
-
Method Details
-
newInstance
Shallow copy of DefaultWorkerParameter- Returns:
- the shallow copy
-
getMandatoriesParameters
Description copied from interface:VitamParameter
Get the attributes name which not have to be empty or null- Specified by:
getMandatoriesParameters
in interfaceVitamParameter<WorkerParameterName>
- Returns:
- a set of attributes name
-
getMapParameters
Description copied from interface:VitamParameter
Get all the parameters- Specified by:
getMapParameters
in interfaceVitamParameter<WorkerParameterName>
- Returns:
- a map with all parameters (key = attribute name, value = attribute value)
-
putParameterValue
Description copied from interface:WorkerParameters
Put parameterValue on mapParameters with parameterName key
If parameterKey already exists, then override it (no check)- Specified by:
putParameterValue
in 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:WorkerParameters
Get the parameter according to the parameterName- Specified by:
getParameterValue
in interfaceWorkerParameters
- Parameters:
parameterName
- the wanted parameter- Returns:
- the value or null if not found
-
setMap
Description copied from interface:WorkerParameters
Set from map using String as Key- Specified by:
setMap
in interfaceWorkerParameters
- Parameters:
map
- the map parameters to set- Returns:
- the current instance of WorkerParameters
-
getCurrentStep
Description copied from interface:WorkerParameters
Get the current step parameter- Specified by:
getCurrentStep
in interfaceWorkerParameters
- Returns:
- the current step value
-
setCurrentStep
Description copied from interface:WorkerParameters
Set the current step value- Specified by:
setCurrentStep
in interfaceWorkerParameters
- Parameters:
currentStep
- the current step value- Returns:
- the current instance of WorkerParameters
-
getPreviousStep
Description copied from interface:WorkerParameters
Get the previous step parameter- Specified by:
getPreviousStep
in interfaceWorkerParameters
- Returns:
- the previous step value
-
setPreviousStep
Description copied from interface:WorkerParameters
Set the previous step value- Specified by:
setPreviousStep
in interfaceWorkerParameters
- Parameters:
previousStep
- the current step value- Returns:
- the current instance of WorkerParameters
-
getContainerName
Description copied from interface:WorkerParameters
Get container name parameter- Specified by:
getContainerName
in interfaceWorkerParameters
- Returns:
- the container name value
-
setContainerName
Description copied from interface:WorkerParameters
Set the container name value- Specified by:
setContainerName
in interfaceWorkerParameters
- Parameters:
containerName
- the container name value- Returns:
- the current instance of WorkerParameter
-
getObjectId
Description copied from interface:WorkerParameters
Get the object id parameter- Specified by:
getObjectId
in interfaceWorkerParameters
- Returns:
- the object id value
-
setObjectId
Description copied from interface:WorkerParameters
Set the object id value- Specified by:
setObjectId
in interfaceWorkerParameters
- Parameters:
objectId
- the object id value- Returns:
- the current instance of WorkerParameter
-
getObjectName
Description copied from interface:WorkerParameters
Get the object name parameter- Specified by:
getObjectName
in interfaceWorkerParameters
- Returns:
- the object name value
-
setObjectName
Description copied from interface:WorkerParameters
Set the object name value- Specified by:
setObjectName
in 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:WorkerParameters
Get the object metadata parameter- Specified by:
getObjectMetadata
in interfaceWorkerParameters
- Returns:
- the object metadata value
-
setObjectMetadata
Description copied from interface:WorkerParameters
Set the object metadata value- Specified by:
setObjectMetadata
in interfaceWorkerParameters
- Parameters:
objectMetadata
- the object metadata value- Returns:
- the current instance of WorkerParameter
-
getObjectNameList
Description copied from interface:WorkerParameters
Get the object name parameter- Specified by:
getObjectNameList
in interfaceWorkerParameters
- Returns:
- the object name value
-
setObjectNameList
Description copied from interface:WorkerParameters
Set the object name value- Specified by:
setObjectNameList
in interfaceWorkerParameters
- Parameters:
objectNameList
- the object name value- Returns:
- the current instance of WorkerParameter
-
getObjectMetadataList
Description copied from interface:WorkerParameters
Get the object metadata parameter- Specified by:
getObjectMetadataList
in interfaceWorkerParameters
- Returns:
- the object name value
-
setObjectMetadataList
public WorkerParameters setObjectMetadataList(List<com.fasterxml.jackson.databind.JsonNode> objectMetaDataList) Description copied from interface:WorkerParameters
Set the object metadata value- Specified by:
setObjectMetadataList
in interfaceWorkerParameters
- Parameters:
objectMetaDataList
- the object metadataList value- Returns:
- the current instance of WorkerParameter
-
getMetadataRequest
Description copied from interface:WorkerParameters
Get the metadata request parameter- Specified by:
getMetadataRequest
in interfaceWorkerParameters
- Returns:
- the metadata request value
-
setMetadataRequest
Description copied from interface:WorkerParameters
Set the request metadata request value- Specified by:
setMetadataRequest
in interfaceWorkerParameters
- Parameters:
metadataRequest
- the metadata request value- Returns:
- the current instance of WorkerParameter
-
getWorkerGUID
Description copied from interface:WorkerParameters
Get the worker GUID parameter- Specified by:
getWorkerGUID
in interfaceWorkerParameters
- Returns:
- the worker GUID value
-
setWorkerGUID
Description copied from interface:WorkerParameters
Set the worker GUID value- Specified by:
setWorkerGUID
in interfaceWorkerParameters
- Parameters:
workerGUID
- the worker GUID value- Returns:
- the current instance of WorkerParameters
-
getProcessId
Description copied from interface:WorkerParameters
Get the process id parameter- Specified by:
getProcessId
in interfaceWorkerParameters
- Returns:
- the process id value
-
setProcessId
Description copied from interface:WorkerParameters
Set the process id value- Specified by:
setProcessId
in interfaceWorkerParameters
- Parameters:
processId
- the process id value- Returns:
- the current instance of WorkerParameters
-
getUrlMetadata
Description copied from interface:WorkerParameters
Get the url of metadata resource parameter- Specified by:
getUrlMetadata
in interfaceWorkerParameters
- Returns:
- the url of metadata resource value
-
setUrlMetadata
Description copied from interface:WorkerParameters
Set the url of metadata resource value- Specified by:
setUrlMetadata
in interfaceWorkerParameters
- Parameters:
urlMetadata
- the url of metadata resource value- Returns:
- the current instance of WorkerParameters
-
getUrlWorkspace
Description copied from interface:WorkerParameters
Get the url of workspace resource parameter- Specified by:
getUrlWorkspace
in interfaceWorkerParameters
- Returns:
- the url of workspace resource value
-
setUrlWorkspace
Description copied from interface:WorkerParameters
Set the url of workspace resource value- Specified by:
setUrlWorkspace
in interfaceWorkerParameters
- Parameters:
urlWorkspace
- the url of workspace resource value- Returns:
- the current instance of WorkerParameters
-
getLogbookTypeProcess
Description copied from interface:WorkerParameters
Get the logbook Type Process- Specified by:
getLogbookTypeProcess
in interfaceWorkerParameters
- Returns:
- the logbook Type Process
-
setLogbookTypeProcess
Description copied from interface:WorkerParameters
Set the logbook Type Process- Specified by:
setLogbookTypeProcess
in interfaceWorkerParameters
- Parameters:
logbookTypeProcess
- the logbook Type Process- Returns:
- the current instance of WorkerParameters
-
getWorkflowIdentifier
- Specified by:
getWorkflowIdentifier
in interfaceWorkerParameters
- Returns:
- workflowIdentifier
-
setWorkflowIdentifier
Description copied from interface:WorkerParameters
Set the logbook Type Process- Specified by:
setWorkflowIdentifier
in interfaceWorkerParameters
- Returns:
- the current instance of WorkerParameters
-
setFromParameters
Description copied from interface:WorkerParameters
Set parameters from another WorkerParameters- Specified by:
setFromParameters
in interfaceWorkerParameters
- Parameters:
parameters
- the parameters to set- Returns:
- the current instance of WorkerParameters
-
toString
-
getRequestId
- Specified by:
getRequestId
in interfaceWorkerParameters
- Returns:
- the current X-Request-Id
-
setRequestId
Description copied from interface:WorkerParameters
setRequestId.- Specified by:
setRequestId
in interfaceWorkerParameters
- Returns:
-
getWorkflowStatusKo
- Specified by:
getWorkflowStatusKo
in interfaceWorkerParameters
- Returns:
- workflowStatusKo
-