Class DefaultWorkerParameters
- java.lang.Object
-
- fr.gouv.vitam.processing.common.parameter.DefaultWorkerParameters
-
- All Implemented Interfaces:
VitamParameter<WorkerParameterName>
,WorkerParameters
public class DefaultWorkerParameters extends java.lang.Object
Default parameters for worker
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<WorkerParameterName>
mandatoryParameters
protected java.util.Map<WorkerParameterName,java.lang.String>
mapParameters
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultWorkerParameters(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.String
getContainerName()
Get container name parameterjava.lang.String
getCurrentStep()
Get the current step parameterLogbookTypeProcess
getLogbookTypeProcess()
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.String
getMetadataRequest()
Get the metadata request parameterjava.lang.String
getObjectId()
Get the object id parametercom.fasterxml.jackson.databind.JsonNode
getObjectMetadata()
Get the object metadata parameterjava.util.List<com.fasterxml.jackson.databind.JsonNode>
getObjectMetadataList()
Get the object metadata parameterjava.lang.String
getObjectName()
Get the object name parameterjava.util.List<java.lang.String>
getObjectNameList()
Get the object name parameterjava.lang.String
getParameterValue(WorkerParameterName parameterName)
Get the parameter according to the parameterNamejava.lang.String
getPreviousStep()
Get the previous step parameterjava.lang.String
getProcessId()
Get the process id parameterjava.lang.String
getRequestId()
java.lang.String
getUrlMetadata()
Get the url of metadata resource parameterjava.lang.String
getUrlWorkspace()
Get the url of workspace resource parameterjava.lang.String
getWorkerGUID()
Get the worker GUID parameterjava.lang.String
getWorkflowIdentifier()
java.lang.String
getWorkflowStatusKo()
DefaultWorkerParameters
newInstance()
Shallow copy of DefaultWorkerParameterWorkerParameters
putParameterValue(WorkerParameterName parameterName, java.lang.String parameterValue)
Put parameterValue on mapParameters with parameterName key
If parameterKey already exists, then override it (no check)WorkerParameters
setContainerName(java.lang.String containerName)
Set the container name valueWorkerParameters
setCurrentStep(java.lang.String currentStep)
Set the current step valueWorkerParameters
setFromParameters(WorkerParameters parameters)
Set parameters from another WorkerParametersWorkerParameters
setLogbookTypeProcess(LogbookTypeProcess logbookTypeProcess)
Set the logbook Type ProcessWorkerParameters
setMap(java.util.Map<java.lang.String,java.lang.String> map)
Set from map using String as KeyWorkerParameters
setMetadataRequest(java.lang.String metadataRequest)
Set the request metadata request valueWorkerParameters
setObjectId(java.lang.String objectId)
Set the object id valueWorkerParameters
setObjectMetadata(com.fasterxml.jackson.databind.JsonNode objectMetadata)
Set the object metadata valueWorkerParameters
setObjectMetadataList(java.util.List<com.fasterxml.jackson.databind.JsonNode> objectMetaDataList)
Set the object metadata valueWorkerParameters
setObjectName(java.lang.String objectName)
Set the object name valueWorkerParameters
setObjectNameList(java.util.List<java.lang.String> objectNameList)
Set the object name valueWorkerParameters
setPreviousStep(java.lang.String previousStep)
Set the previous step valueWorkerParameters
setProcessId(java.lang.String processId)
Set the process id valueWorkerParameters
setRequestId(java.lang.String newRequestId)
setRequestId.WorkerParameters
setUrlMetadata(java.lang.String urlMetadata)
Set the url of metadata resource valueWorkerParameters
setUrlWorkspace(java.lang.String urlWorkspace)
Set the url of workspace resource valueWorkerParameters
setWorkerGUID(java.lang.String workerGUID)
Set the worker GUID valueWorkerParameters
setWorkflowIdentifier(java.lang.String workflowIdentifier)
Set the logbook Type Processjava.lang.String
toString()
-
-
-
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: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
public java.util.Map<WorkerParameterName,java.lang.String> 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
public WorkerParameters putParameterValue(WorkerParameterName parameterName, java.lang.String parameterValue)
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
public java.lang.String getParameterValue(WorkerParameterName parameterName)
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
public WorkerParameters setMap(java.util.Map<java.lang.String,java.lang.String> map)
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
public java.lang.String getCurrentStep()
Description copied from interface:WorkerParameters
Get the current step parameter- Specified by:
getCurrentStep
in interfaceWorkerParameters
- Returns:
- the current step value
-
setCurrentStep
public WorkerParameters setCurrentStep(java.lang.String currentStep)
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
public java.lang.String getPreviousStep()
Description copied from interface:WorkerParameters
Get the previous step parameter- Specified by:
getPreviousStep
in interfaceWorkerParameters
- Returns:
- the previous step value
-
setPreviousStep
public WorkerParameters setPreviousStep(java.lang.String previousStep)
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
public java.lang.String getContainerName()
Description copied from interface:WorkerParameters
Get container name parameter- Specified by:
getContainerName
in interfaceWorkerParameters
- Returns:
- the container name value
-
setContainerName
public WorkerParameters setContainerName(java.lang.String containerName)
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
public java.lang.String getObjectId()
Description copied from interface:WorkerParameters
Get the object id parameter- Specified by:
getObjectId
in interfaceWorkerParameters
- Returns:
- the object id value
-
setObjectId
public WorkerParameters setObjectId(java.lang.String objectId)
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
public java.lang.String getObjectName()
Description copied from interface:WorkerParameters
Get the object name parameter- Specified by:
getObjectName
in interfaceWorkerParameters
- Returns:
- the object name value
-
setObjectName
public WorkerParameters setObjectName(java.lang.String objectName)
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
public WorkerParameters setObjectMetadata(com.fasterxml.jackson.databind.JsonNode objectMetadata)
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
public java.util.List<java.lang.String> getObjectNameList()
Description copied from interface:WorkerParameters
Get the object name parameter- Specified by:
getObjectNameList
in interfaceWorkerParameters
- Returns:
- the object name value
-
setObjectNameList
public WorkerParameters setObjectNameList(java.util.List<java.lang.String> objectNameList)
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
public java.util.List<com.fasterxml.jackson.databind.JsonNode> 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(java.util.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
public java.lang.String getMetadataRequest()
Description copied from interface:WorkerParameters
Get the metadata request parameter- Specified by:
getMetadataRequest
in interfaceWorkerParameters
- Returns:
- the metadata request value
-
setMetadataRequest
public WorkerParameters setMetadataRequest(java.lang.String metadataRequest)
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
public java.lang.String getWorkerGUID()
Description copied from interface:WorkerParameters
Get the worker GUID parameter- Specified by:
getWorkerGUID
in interfaceWorkerParameters
- Returns:
- the worker GUID value
-
setWorkerGUID
public WorkerParameters setWorkerGUID(java.lang.String workerGUID)
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
public java.lang.String getProcessId()
Description copied from interface:WorkerParameters
Get the process id parameter- Specified by:
getProcessId
in interfaceWorkerParameters
- Returns:
- the process id value
-
setProcessId
public WorkerParameters setProcessId(java.lang.String processId)
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
public java.lang.String 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
public WorkerParameters setUrlMetadata(java.lang.String urlMetadata)
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
public java.lang.String 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
public WorkerParameters setUrlWorkspace(java.lang.String urlWorkspace)
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
public LogbookTypeProcess getLogbookTypeProcess()
Description copied from interface:WorkerParameters
Get the logbook Type Process- Specified by:
getLogbookTypeProcess
in interfaceWorkerParameters
- Returns:
- the logbook Type Process
-
setLogbookTypeProcess
public WorkerParameters setLogbookTypeProcess(LogbookTypeProcess logbookTypeProcess)
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
public java.lang.String getWorkflowIdentifier()
- Specified by:
getWorkflowIdentifier
in interfaceWorkerParameters
- Returns:
- workflowIdentifier
-
setWorkflowIdentifier
public WorkerParameters setWorkflowIdentifier(java.lang.String workflowIdentifier)
Description copied from interface:WorkerParameters
Set the logbook Type Process- Specified by:
setWorkflowIdentifier
in interfaceWorkerParameters
- Returns:
- the current instance of WorkerParameters
-
setFromParameters
public WorkerParameters setFromParameters(WorkerParameters parameters)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getRequestId
public java.lang.String getRequestId()
- Specified by:
getRequestId
in interfaceWorkerParameters
- Returns:
- the current X-Request-Id
-
setRequestId
public WorkerParameters setRequestId(java.lang.String newRequestId)
Description copied from interface:WorkerParameters
setRequestId.- Specified by:
setRequestId
in interfaceWorkerParameters
- Returns:
-
getWorkflowStatusKo
public java.lang.String getWorkflowStatusKo()
- Specified by:
getWorkflowStatusKo
in interfaceWorkerParameters
- Returns:
- workflowStatusKo
-
-