Class LogbookLifeCycleUnitParameters
- java.lang.Object
-
- fr.gouv.vitam.logbook.common.parameters.LogbookLifeCycleParameters
-
- fr.gouv.vitam.logbook.common.parameters.LogbookLifeCycleUnitParameters
-
- All Implemented Interfaces:
VitamParameter<LogbookParameterName>,LogbookParameters
public class LogbookLifeCycleUnitParameters extends LogbookLifeCycleParameters
Parameters for the logbook operation
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<LogbookParameterName>mandatoryParameters
-
Constructor Summary
Constructors Modifier Constructor Description protectedLogbookLifeCycleUnitParameters(java.util.Map<java.lang.String,java.lang.String> map)Builder for REST interface
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.LocalDateTimegetEventDateTime()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.StringgetParameterValue(LogbookParameterName parameterName)Get the parameter according to the parameterNameStatusCodegetStatus()Get the outcome statusLogbookTypeProcessgetTypeProcess()Get the process typeLogbookParametersputParameterValue(LogbookParameterName parameterName, java.lang.String parameterValue)Put parameterValue on mapParamaters with parameterName key
If parameterKey already exists, the override it (no check)LogbookParameterssetBeginningLog(java.lang.String handlerId, java.lang.String subTaskId, java.lang.String additionnalMessage, java.lang.String... params)Update the current LogbookParameters with status and messageLogbookParameterssetFinalStatus(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 messageLogbookParameterssetFromParameters(LogbookParameters parameters)Set from another LogbookParametersLogbookParameterssetMap(java.util.Map<java.lang.String,java.lang.String> map)Set from map using String as KeyLogbookParameterssetStatus(StatusCode outcome)Set the outcome statusLogbookParameterssetTypeProcess(LogbookTypeProcess process)Set the process typejava.lang.StringtoString()
-
-
-
Field Detail
-
mandatoryParameters
protected java.util.Set<LogbookParameterName> mandatoryParameters
-
-
Method Detail
-
getMandatoriesParameters
public java.util.Set<LogbookParameterName> getMandatoriesParameters()
Description copied from interface:VitamParameterGet the attributes name which not have to be empty or null- Specified by:
getMandatoriesParametersin interfaceVitamParameter<LogbookParameterName>- Returns:
- a set of attributes name
-
getEventDateTime
public java.time.LocalDateTime getEventDateTime()
Description copied from interface:LogbookParametersThe EventDateTime is set by the Logbook methods during creation or append- Specified by:
getEventDateTimein interfaceLogbookParameters- Returns:
- the associated EventDateTime if set (or null if not set yet)
-
setStatus
public LogbookParameters setStatus(StatusCode outcome)
Description copied from interface:LogbookParametersSet the outcome status- Specified by:
setStatusin interfaceLogbookParameters- Returns:
- this
-
getStatus
public StatusCode getStatus()
Description copied from interface:LogbookParametersGet the outcome status- Specified by:
getStatusin 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:LogbookParametersUpdate the current LogbookParameters with status and message- Specified by:
setFinalStatusin 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:LogbookParametersUpdate the current LogbookParameters with status and message- Specified by:
setBeginningLogin 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:LogbookParametersSet the process type- Specified by:
setTypeProcessin interfaceLogbookParameters- Parameters:
process- process type- Returns:
- this
-
getTypeProcess
public LogbookTypeProcess getTypeProcess()
Description copied from interface:LogbookParametersGet the process type- Specified by:
getTypeProcessin 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:LogbookParametersPut parameterValue on mapParamaters with parameterName key
If parameterKey already exists, the override it (no check)- Specified by:
putParameterValuein 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:LogbookParametersGet the parameter according to the parameterName- Specified by:
getParameterValuein 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:LogbookParametersSet from map using String as Key- Specified by:
setMapin interfaceLogbookParameters- Returns:
- this
-
setFromParameters
public LogbookParameters setFromParameters(LogbookParameters parameters)
Description copied from interface:LogbookParametersSet from another LogbookParameters- Specified by:
setFromParametersin interfaceLogbookParameters- Returns:
- this
-
getMapParameters
public java.util.Map<LogbookParameterName,java.lang.String> getMapParameters()
Description copied from interface:VitamParameterGet all the parameters- Specified by:
getMapParametersin interfaceVitamParameter<LogbookParameterName>- Returns:
- a map with all parameters (key = attribute name, value = attribute value)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-