Class LogbookLifeCycleParameters
java.lang.Object
fr.gouv.vitam.logbook.common.parameters.LogbookLifeCycleParameters
- All Implemented Interfaces:
VitamParameter<LogbookParameterName>
,LogbookParameters
- Direct Known Subclasses:
LogbookLifeCycleObjectGroupParameters
,LogbookLifeCycleUnitParameters
Common abstract class for LogbookLifeCycle Units and ObjectGroups Parameters
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe EventDateTime is set by the Logbook methods during creation or appendGet the attributes name which not have to be empty or nullGet all the parametersgetParameterValue
(LogbookParameterName parameterName) Get the parameter according to the parameterNameGet the outcome statusGet the process typeputParameterValue
(LogbookParameterName parameterName, String parameterValue) Put parameterValue on mapParamaters with parameterName key
If parameterKey already exists, the override it (no check)setBeginningLog
(String handlerId, String subTaskId, String additionnalMessage, String... params) Update the current LogbookParameters with status and messagesetFinalStatus
(String handlerId, String subTaskId, StatusCode code, String additionalMessage, String... params) Update the current LogbookParameters with status and messagesetFromParameters
(LogbookParameters parameters) Set from another LogbookParametersSet from map using String as KeysetStatus
(StatusCode outcome) Set the outcome statussetTypeProcess
(LogbookTypeProcess process) Set the process typetoString()
-
Field Details
-
mandatoryParameters
-
-
Constructor Details
-
LogbookLifeCycleParameters
- Parameters:
mandatory
- set of logbook parameter
-
LogbookLifeCycleParameters
- Parameters:
map
- of parameter
-
-
Method Details
-
getMandatoriesParameters
Description copied from interface:VitamParameter
Get the attributes name which not have to be empty or null- Specified by:
getMandatoriesParameters
in interfaceVitamParameter<LogbookParameterName>
- Returns:
- a set of attributes name
-
getEventDateTime
Description copied from interface:LogbookParameters
The EventDateTime is set by the Logbook methods during creation or append- Specified by:
getEventDateTime
in interfaceLogbookParameters
- Returns:
- the associated EventDateTime if set (or null if not set yet)
-
setStatus
Description copied from interface:LogbookParameters
Set the outcome status- Specified by:
setStatus
in interfaceLogbookParameters
- Returns:
- this
-
getStatus
Description copied from interface:LogbookParameters
Get the outcome status- Specified by:
getStatus
in interfaceLogbookParameters
- Returns:
- the status (or null if not set yet)
-
setFinalStatus
public LogbookParameters setFinalStatus(String handlerId, String subTaskId, StatusCode code, String additionalMessage, String... params) Description copied from interface:LogbookParameters
Update the current LogbookParameters with status and message- Specified by:
setFinalStatus
in interfaceLogbookParameters
- Parameters:
handlerId
- the Handler IdsubTaskId
- the subTask Id if any (may be null)code
- the Status CodeAdminManagementClientRestTestadditionalMessage
- the additional message (as " Details= ...") if any (may be null)params
- the additional parameters for the message if any (may be null)- Returns:
- this
-
setBeginningLog
public LogbookParameters setBeginningLog(String handlerId, String subTaskId, String additionnalMessage, String... params) Description copied from interface:LogbookParameters
Update the current LogbookParameters with status and message- Specified by:
setBeginningLog
in interfaceLogbookParameters
- Parameters:
handlerId
- the Handler IdsubTaskId
- the subTask Id if any (may be null)additionnalMessage
- the additional message (as " Details= ...") if any (may be null)params
- the additional parameters for the message if any (may be null)- Returns:
- this
-
setTypeProcess
Description copied from interface:LogbookParameters
Set the process type- Specified by:
setTypeProcess
in interfaceLogbookParameters
- Parameters:
process
- process type- Returns:
- this
-
getTypeProcess
Description copied from interface:LogbookParameters
Get the process type- Specified by:
getTypeProcess
in interfaceLogbookParameters
- Returns:
- the process type (or null if not set yet)
-
putParameterValue
public LogbookParameters putParameterValue(LogbookParameterName parameterName, String parameterValue) Description copied from interface:LogbookParameters
Put parameterValue on mapParamaters with parameterName key
If parameterKey already exists, the override it (no check)- Specified by:
putParameterValue
in interfaceLogbookParameters
- 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 LogbookParameters (fluent like)
-
getParameterValue
Description copied from interface:LogbookParameters
Get the parameter according to the parameterName- Specified by:
getParameterValue
in interfaceLogbookParameters
- Returns:
- the value or null if not found
-
setMap
Description copied from interface:LogbookParameters
Set from map using String as Key- Specified by:
setMap
in interfaceLogbookParameters
- Returns:
- this
-
setFromParameters
Description copied from interface:LogbookParameters
Set from another LogbookParameters- Specified by:
setFromParameters
in interfaceLogbookParameters
- Returns:
- this
-
getMapParameters
Description copied from interface:VitamParameter
Get all the parameters- Specified by:
getMapParameters
in interfaceVitamParameter<LogbookParameterName>
- Returns:
- a map with all parameters (key = attribute name, value = attribute value)
-
toString
-