Class DefaultWorkerParameters
- java.lang.Object
-
- fr.gouv.vitam.processing.common.parameter.DefaultWorkerParameters
-
- All Implemented Interfaces:
VitamParameter<WorkerParameterName>,WorkerParameters
public class DefaultWorkerParameters extends java.lang.ObjectDefault parameters for worker
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<WorkerParameterName>mandatoryParametersprotected java.util.Map<WorkerParameterName,java.lang.String>mapParameters
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultWorkerParameters(java.util.Map<java.lang.String,java.lang.String> map)Builder for REST
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContainerName()Get container name parameterjava.lang.StringgetCurrentStep()Get the current step parameterLogbookTypeProcessgetLogbookTypeProcess()Get the logbook Type Processjava.util.Set<WorkerParameterName>getMandatoriesParameters()Get the attributes name which not have to be empty or nulljava.util.Map<WorkerParameterName,java.lang.String>getMapParameters()Get all the parametersjava.lang.StringgetMetadataRequest()Get the metadata request parameterjava.lang.StringgetObjectId()Get the object id parametercom.fasterxml.jackson.databind.JsonNodegetObjectMetadata()Get the object metadata parameterjava.util.List<com.fasterxml.jackson.databind.JsonNode>getObjectMetadataList()Get the object metadata parameterjava.lang.StringgetObjectName()Get the object name parameterjava.util.List<java.lang.String>getObjectNameList()Get the object name parameterjava.lang.StringgetParameterValue(WorkerParameterName parameterName)Get the parameter according to the parameterNamejava.lang.StringgetPreviousStep()Get the previous step parameterjava.lang.StringgetProcessId()Get the process id parameterjava.lang.StringgetRequestId()java.lang.StringgetUrlMetadata()Get the url of metadata resource parameterjava.lang.StringgetUrlWorkspace()Get the url of workspace resource parameterjava.lang.StringgetWorkerGUID()Get the worker GUID parameterjava.lang.StringgetWorkflowIdentifier()java.lang.StringgetWorkflowStatusKo()DefaultWorkerParametersnewInstance()Shallow copy of DefaultWorkerParameterWorkerParametersputParameterValue(WorkerParameterName parameterName, java.lang.String parameterValue)Put parameterValue on mapParameters with parameterName key
If parameterKey already exists, then override it (no check)WorkerParameterssetContainerName(java.lang.String containerName)Set the container name valueWorkerParameterssetCurrentStep(java.lang.String currentStep)Set the current step valueWorkerParameterssetFromParameters(WorkerParameters parameters)Set parameters from another WorkerParametersWorkerParameterssetLogbookTypeProcess(LogbookTypeProcess logbookTypeProcess)Set the logbook Type ProcessWorkerParameterssetMap(java.util.Map<java.lang.String,java.lang.String> map)Set from map using String as KeyWorkerParameterssetMetadataRequest(java.lang.String metadataRequest)Set the request metadata request valueWorkerParameterssetObjectId(java.lang.String objectId)Set the object id valueWorkerParameterssetObjectMetadata(com.fasterxml.jackson.databind.JsonNode objectMetadata)Set the object metadata valueWorkerParameterssetObjectMetadataList(java.util.List<com.fasterxml.jackson.databind.JsonNode> objectMetaDataList)Set the object metadata valueWorkerParameterssetObjectName(java.lang.String objectName)Set the object name valueWorkerParameterssetObjectNameList(java.util.List<java.lang.String> objectNameList)Set the object name valueWorkerParameterssetPreviousStep(java.lang.String previousStep)Set the previous step valueWorkerParameterssetProcessId(java.lang.String processId)Set the process id valueWorkerParameterssetRequestId(java.lang.String newRequestId)setRequestId.WorkerParameterssetUrlMetadata(java.lang.String urlMetadata)Set the url of metadata resource valueWorkerParameterssetUrlWorkspace(java.lang.String urlWorkspace)Set the url of workspace resource valueWorkerParameterssetWorkerGUID(java.lang.String workerGUID)Set the worker GUID valueWorkerParameterssetWorkflowIdentifier(java.lang.String workflowIdentifier)Set the logbook Type Processjava.lang.StringtoString()
-
-
-
Field Detail
-
mapParameters
protected final java.util.Map<WorkerParameterName,java.lang.String> mapParameters
-
mandatoryParameters
protected final java.util.Set<WorkerParameterName> mandatoryParameters
-
-
Method Detail
-
newInstance
public DefaultWorkerParameters newInstance()
Shallow copy of DefaultWorkerParameter- Returns:
- the shallow copy
-
getMandatoriesParameters
public java.util.Set<WorkerParameterName> 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
public java.util.Map<WorkerParameterName,java.lang.String> 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
public WorkerParameters putParameterValue(WorkerParameterName parameterName, java.lang.String parameterValue)
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
public java.lang.String getParameterValue(WorkerParameterName parameterName)
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
public WorkerParameters setMap(java.util.Map<java.lang.String,java.lang.String> map)
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
public java.lang.String getCurrentStep()
Description copied from interface:WorkerParametersGet the current step parameter- Specified by:
getCurrentStepin interfaceWorkerParameters- Returns:
- the current step value
-
setCurrentStep
public WorkerParameters setCurrentStep(java.lang.String currentStep)
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
public java.lang.String getPreviousStep()
Description copied from interface:WorkerParametersGet the previous step parameter- Specified by:
getPreviousStepin interfaceWorkerParameters- Returns:
- the previous step value
-
setPreviousStep
public WorkerParameters setPreviousStep(java.lang.String previousStep)
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
public java.lang.String getContainerName()
Description copied from interface:WorkerParametersGet container name parameter- Specified by:
getContainerNamein interfaceWorkerParameters- Returns:
- the container name value
-
setContainerName
public WorkerParameters setContainerName(java.lang.String containerName)
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
public java.lang.String getObjectId()
Description copied from interface:WorkerParametersGet the object id parameter- Specified by:
getObjectIdin interfaceWorkerParameters- Returns:
- the object id value
-
setObjectId
public WorkerParameters setObjectId(java.lang.String objectId)
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
public java.lang.String getObjectName()
Description copied from interface:WorkerParametersGet the object name parameter- Specified by:
getObjectNamein interfaceWorkerParameters- Returns:
- the object name value
-
setObjectName
public WorkerParameters setObjectName(java.lang.String objectName)
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
public WorkerParameters setObjectMetadata(com.fasterxml.jackson.databind.JsonNode objectMetadata)
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
public java.util.List<java.lang.String> getObjectNameList()
Description copied from interface:WorkerParametersGet the object name parameter- Specified by:
getObjectNameListin interfaceWorkerParameters- Returns:
- the object name value
-
setObjectNameList
public WorkerParameters setObjectNameList(java.util.List<java.lang.String> objectNameList)
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
public java.util.List<com.fasterxml.jackson.databind.JsonNode> getObjectMetadataList()
Description copied from interface:WorkerParametersGet the object metadata parameter- Specified by:
getObjectMetadataListin interfaceWorkerParameters- Returns:
- the object name value
-
setObjectMetadataList
public WorkerParameters setObjectMetadataList(java.util.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
public java.lang.String getMetadataRequest()
Description copied from interface:WorkerParametersGet the metadata request parameter- Specified by:
getMetadataRequestin interfaceWorkerParameters- Returns:
- the metadata request value
-
setMetadataRequest
public WorkerParameters setMetadataRequest(java.lang.String metadataRequest)
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
public java.lang.String getWorkerGUID()
Description copied from interface:WorkerParametersGet the worker GUID parameter- Specified by:
getWorkerGUIDin interfaceWorkerParameters- Returns:
- the worker GUID value
-
setWorkerGUID
public WorkerParameters setWorkerGUID(java.lang.String workerGUID)
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
public java.lang.String getProcessId()
Description copied from interface:WorkerParametersGet the process id parameter- Specified by:
getProcessIdin interfaceWorkerParameters- Returns:
- the process id value
-
setProcessId
public WorkerParameters setProcessId(java.lang.String processId)
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
public java.lang.String getUrlMetadata()
Description copied from interface:WorkerParametersGet the url of metadata resource parameter- Specified by:
getUrlMetadatain interfaceWorkerParameters- Returns:
- the url of metadata resource value
-
setUrlMetadata
public WorkerParameters setUrlMetadata(java.lang.String urlMetadata)
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
public java.lang.String getUrlWorkspace()
Description copied from interface:WorkerParametersGet the url of workspace resource parameter- Specified by:
getUrlWorkspacein interfaceWorkerParameters- Returns:
- the url of workspace resource value
-
setUrlWorkspace
public WorkerParameters setUrlWorkspace(java.lang.String urlWorkspace)
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
public LogbookTypeProcess getLogbookTypeProcess()
Description copied from interface:WorkerParametersGet the logbook Type Process- Specified by:
getLogbookTypeProcessin interfaceWorkerParameters- Returns:
- the logbook Type Process
-
setLogbookTypeProcess
public WorkerParameters setLogbookTypeProcess(LogbookTypeProcess logbookTypeProcess)
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
public java.lang.String getWorkflowIdentifier()
- Specified by:
getWorkflowIdentifierin interfaceWorkerParameters- Returns:
- workflowIdentifier
-
setWorkflowIdentifier
public WorkerParameters setWorkflowIdentifier(java.lang.String workflowIdentifier)
Description copied from interface:WorkerParametersSet the logbook Type Process- Specified by:
setWorkflowIdentifierin interfaceWorkerParameters- Returns:
- the current instance of WorkerParameters
-
setFromParameters
public WorkerParameters setFromParameters(WorkerParameters parameters)
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getRequestId
public java.lang.String getRequestId()
- Specified by:
getRequestIdin interfaceWorkerParameters- Returns:
- the current X-Request-Id
-
setRequestId
public WorkerParameters setRequestId(java.lang.String newRequestId)
Description copied from interface:WorkerParameterssetRequestId.- Specified by:
setRequestIdin interfaceWorkerParameters- Returns:
-
getWorkflowStatusKo
public java.lang.String getWorkflowStatusKo()
- Specified by:
getWorkflowStatusKoin interfaceWorkerParameters- Returns:
- workflowStatusKo
-
-