Interface WorkerParameters
- All Superinterfaces:
VitamParameter<WorkerParameterName>
- All Known Implementing Classes:
DefaultWorkerParameters
Class use to manage parameters for and on worker
-
Method Summary
Modifier and TypeMethodDescriptionGet container name parameterGet the current step parameterGet the logbook Type ProcessGet 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 parameterputParameterValue
(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 objectName) 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 ProcessMethods inherited from interface fr.gouv.vitam.common.parameter.VitamParameter
getMandatoriesParameters, getMapParameters
-
Method Details
-
putParameterValue
Put parameterValue on mapParameters with parameterName key
If parameterKey already exists, then override it (no check)- 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)
- Throws:
IllegalArgumentException
- if the parameterName is null or if parameterValue is null or empty
-
getParameterValue
Get the parameter according to the parameterName- Parameters:
parameterName
- the wanted parameter- Returns:
- the value or null if not found
- Throws:
IllegalArgumentException
- throws if parameterName is null
-
setMap
Set from map using String as Key- Parameters:
map
- the map parameters to set- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if parameter key is unknown or if the map is null
-
getCurrentStep
String getCurrentStep()Get the current step parameter- Returns:
- the current step value
-
setCurrentStep
Set the current step value- Parameters:
currentStep
- the current step value- Returns:
- the current instance of WorkerParameters
-
getPreviousStep
String getPreviousStep()Get the previous step parameter- Returns:
- the previous step value
-
setPreviousStep
Set the previous step value- Parameters:
previousStep
- the current step value- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if the previousStep is null or empty
-
getContainerName
String getContainerName()Get container name parameter- Returns:
- the container name value
-
setContainerName
Set the container name value- Parameters:
containerName
- the container name value- Returns:
- the current instance of WorkerParameter
- Throws:
IllegalArgumentException
- if the containerName is null or empty
-
getObjectId
String getObjectId()Get the object id parameter- Returns:
- the object id value
-
setObjectId
Set the object id value- Parameters:
objectId
- the object id value- Returns:
- the current instance of WorkerParameter
- Throws:
IllegalArgumentException
- if the objectId is null or empty
-
getObjectName
String getObjectName()Get the object name parameter- Returns:
- the object name value
-
setObjectName
Set the object name value- Parameters:
objectName
- the object name value- Returns:
- the current instance of WorkerParameter
- Throws:
IllegalArgumentException
- if the objectName is null or empty
-
getObjectMetadata
com.fasterxml.jackson.databind.JsonNode getObjectMetadata()Get the object metadata parameter- Returns:
- the object metadata value
-
setObjectMetadata
Set the object metadata value- Parameters:
objectName
- the object metadata value- Returns:
- the current instance of WorkerParameter
- Throws:
IllegalArgumentException
- if the objectName is null or empty
-
getObjectNameList
Get the object name parameter- Returns:
- the object name value
-
setObjectNameList
Set the object name value- Parameters:
objectNameList
- the object name value- Returns:
- the current instance of WorkerParameter
- Throws:
IllegalArgumentException
- if the objectName is null or empty
-
getObjectMetadataList
List<com.fasterxml.jackson.databind.JsonNode> getObjectMetadataList()Get the object metadata parameter- Returns:
- the object name value
-
setObjectMetadataList
WorkerParameters setObjectMetadataList(List<com.fasterxml.jackson.databind.JsonNode> objectMetadataList) Set the object metadata value- Parameters:
objectMetadataList
- the object metadataList value- Returns:
- the current instance of WorkerParameter
- Throws:
IllegalStateException
- if the metadataList is null or empty
-
getMetadataRequest
String getMetadataRequest()Get the metadata request parameter- Returns:
- the metadata request value
-
setMetadataRequest
Set the request metadata request value- Parameters:
metadataRequest
- the metadata request value- Returns:
- the current instance of WorkerParameter
- Throws:
IllegalArgumentException
- if metadataRequest is null or empty
-
getWorkerGUID
String getWorkerGUID()Get the worker GUID parameter- Returns:
- the worker GUID value
-
setWorkerGUID
Set the worker GUID value- Parameters:
workerGUID
- the worker GUID value- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if workerGUID is null or empty
-
getProcessId
String getProcessId()Get the process id parameter- Returns:
- the process id value
-
setProcessId
Set the process id value- Parameters:
processId
- the process id value- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if processId is null or empty
-
getUrlMetadata
String getUrlMetadata()Get the url of metadata resource parameter- Returns:
- the url of metadata resource value
-
setUrlMetadata
Set the url of metadata resource value- Parameters:
urlMetadata
- the url of metadata resource value- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if urlMetadata is null or empty
-
getUrlWorkspace
String getUrlWorkspace()Get the url of workspace resource parameter- Returns:
- the url of workspace resource value
-
setUrlWorkspace
Set the url of workspace resource value- Parameters:
urlWorkspace
- the url of workspace resource value- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if urlWorspace is null or empty
-
getLogbookTypeProcess
LogbookTypeProcess getLogbookTypeProcess()Get the logbook Type Process- Returns:
- the logbook Type Process
-
setLogbookTypeProcess
Set the logbook Type Process- Parameters:
logbookTypeProcess
- the logbook Type Process- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if urlWorspace is null or empty
-
getWorkflowIdentifier
String getWorkflowIdentifier()- Returns:
- workflowIdentifier
-
setWorkflowIdentifier
Set the logbook Type Process- Parameters:
workflowIdentifier
-- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if urlWorspace is null or empty
-
setFromParameters
Set parameters from another WorkerParameters- Parameters:
parameters
- the parameters to set- Returns:
- the current instance of WorkerParameters
- Throws:
IllegalArgumentException
- if parameters is null
-
getRequestId
String getRequestId()- Returns:
- the current X-Request-Id
-
setRequestId
setRequestId.- Parameters:
newRequestId
-- Returns:
-
getWorkflowStatusKo
String getWorkflowStatusKo()- Returns:
- workflowStatusKo
-