Class LogbookLifeCycleParameters
- java.lang.Object
-
- fr.gouv.vitam.logbook.common.parameters.LogbookLifeCycleParameters
-
- All Implemented Interfaces:
VitamParameter<LogbookParameterName>
,LogbookParameters
- Direct Known Subclasses:
LogbookLifeCycleObjectGroupParameters
,LogbookLifeCycleUnitParameters
public class LogbookLifeCycleParameters extends java.lang.Object
Common abstract class for LogbookLifeCycle Units and ObjectGroups Parameters
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<LogbookParameterName>
mandatoryParameters
-
Constructor Summary
Constructors Constructor Description LogbookLifeCycleParameters(java.util.Map<java.lang.String,java.lang.String> map)
LogbookLifeCycleParameters(java.util.Set<LogbookParameterName> mandatory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.LocalDateTime
getEventDateTime()
The EventDateTime is set by the Logbook methods during creation or appendjava.util.Set<LogbookParameterName>
getMandatoriesParameters()
Get the attributes name which not have to be empty or nulljava.util.Map<LogbookParameterName,java.lang.String>
getMapParameters()
Get all the parametersjava.lang.String
getParameterValue(LogbookParameterName parameterName)
Get the parameter according to the parameterNameStatusCode
getStatus()
Get the outcome statusLogbookTypeProcess
getTypeProcess()
Get the process typeLogbookParameters
putParameterValue(LogbookParameterName parameterName, java.lang.String parameterValue)
Put parameterValue on mapParamaters with parameterName key
If parameterKey already exists, the override it (no check)LogbookParameters
setBeginningLog(java.lang.String handlerId, java.lang.String subTaskId, java.lang.String additionnalMessage, java.lang.String... params)
Update the current LogbookParameters with status and messageLogbookParameters
setFinalStatus(java.lang.String handlerId, java.lang.String subTaskId, StatusCode code, java.lang.String additionalMessage, java.lang.String... params)
Update the current LogbookParameters with status and messageLogbookParameters
setFromParameters(LogbookParameters parameters)
Set from another LogbookParametersLogbookParameters
setMap(java.util.Map<java.lang.String,java.lang.String> map)
Set from map using String as KeyLogbookParameters
setStatus(StatusCode outcome)
Set the outcome statusLogbookParameters
setTypeProcess(LogbookTypeProcess process)
Set the process typejava.lang.String
toString()
-
-
-
Field Detail
-
mandatoryParameters
protected java.util.Set<LogbookParameterName> mandatoryParameters
-
-
Constructor Detail
-
LogbookLifeCycleParameters
public LogbookLifeCycleParameters(java.util.Set<LogbookParameterName> mandatory)
- Parameters:
mandatory
- set of logbook parameter
-
LogbookLifeCycleParameters
public LogbookLifeCycleParameters(java.util.Map<java.lang.String,java.lang.String> map)
- Parameters:
map
- of parameter
-
-
Method Detail
-
getMandatoriesParameters
public java.util.Set<LogbookParameterName> 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
public java.time.LocalDateTime 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
public LogbookParameters setStatus(StatusCode outcome)
Description copied from interface:LogbookParameters
Set the outcome status- Specified by:
setStatus
in interfaceLogbookParameters
- Returns:
- this
-
getStatus
public StatusCode 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(java.lang.String handlerId, java.lang.String subTaskId, StatusCode code, java.lang.String additionalMessage, java.lang.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(java.lang.String handlerId, java.lang.String subTaskId, java.lang.String additionnalMessage, java.lang.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
public LogbookParameters setTypeProcess(LogbookTypeProcess process)
Description copied from interface:LogbookParameters
Set the process type- Specified by:
setTypeProcess
in interfaceLogbookParameters
- Parameters:
process
- process type- Returns:
- this
-
getTypeProcess
public LogbookTypeProcess 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, java.lang.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
public java.lang.String getParameterValue(LogbookParameterName parameterName)
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
public LogbookParameters setMap(java.util.Map<java.lang.String,java.lang.String> map)
Description copied from interface:LogbookParameters
Set from map using String as Key- Specified by:
setMap
in interfaceLogbookParameters
- Returns:
- this
-
setFromParameters
public LogbookParameters setFromParameters(LogbookParameters parameters)
Description copied from interface:LogbookParameters
Set from another LogbookParameters- Specified by:
setFromParameters
in interfaceLogbookParameters
- Returns:
- this
-
getMapParameters
public java.util.Map<LogbookParameterName,java.lang.String> 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-