public class LogbookOperationParameters extends Object
Modifier and Type | Field and Description |
---|---|
protected Set<LogbookParameterName> |
mandatoryParameters |
Modifier | Constructor and Description |
---|---|
protected |
LogbookOperationParameters(Map<String,String> map)
Builder for REST interface
|
Modifier and Type | Method and Description |
---|---|
LocalDateTime |
getEventDateTime()
The EventDateTime is set by the Logbook methods during creation or append
|
Set<LogbookParameterName> |
getMandatoriesParameters()
Get the attributes name which not have to be empty or null
|
Map<LogbookParameterName,String> |
getMapParameters()
Get all the parameters
|
String |
getParameterValue(LogbookParameterName parameterName)
Get the parameter according to the parameterName
|
StatusCode |
getStatus()
Get the outcome status
|
LogbookTypeProcess |
getTypeProcess()
Get the process type
|
LogbookParameters |
putParameterValue(LogbookParameterName parameterName,
String parameterValue)
Put parameterValue on mapParamaters with parameterName key
If parameterKey already exists, the override it (no check) |
LogbookParameters |
setBeginningLog(String handlerId,
String subTaskId,
String additionnalMessage,
String... params)
Update the current LogbookParameters with status and message
|
LogbookParameters |
setFinalStatus(String handlerId,
String subTaskId,
StatusCode code,
String additionalMessage,
String... params)
Update the current LogbookParameters with status and message
|
LogbookParameters |
setFromParameters(LogbookParameters parameters)
Set from another LogbookParameters
|
LogbookParameters |
setMap(Map<String,String> map)
Set from map using String as Key
|
LogbookParameters |
setStatus(StatusCode outcome)
Set the outcome status
|
LogbookParameters |
setTypeProcess(LogbookTypeProcess process)
Set the process type
|
String |
toString() |
protected Set<LogbookParameterName> mandatoryParameters
protected LogbookOperationParameters(Map<String,String> map)
map
- IllegalArgumentException
- if one key is not allowedpublic Set<LogbookParameterName> getMandatoriesParameters()
VitamParameter
getMandatoriesParameters
in interface VitamParameter<LogbookParameterName>
public LocalDateTime getEventDateTime()
LogbookParameters
getEventDateTime
in interface LogbookParameters
public LogbookParameters setStatus(StatusCode outcome)
LogbookParameters
setStatus
in interface LogbookParameters
public StatusCode getStatus()
LogbookParameters
getStatus
in interface LogbookParameters
public LogbookParameters setFinalStatus(String handlerId, String subTaskId, StatusCode code, String additionalMessage, String... params)
LogbookParameters
setFinalStatus
in interface LogbookParameters
handlerId
- the Handler IdsubTaskId
- the subTask Id if any (may be null)code
- the Status CodeadditionalMessage
- the additional message (as " Details= ...") if any (may be null)params
- the additional parameters for the message if any (may be null)public LogbookParameters setBeginningLog(String handlerId, String subTaskId, String additionnalMessage, String... params)
LogbookParameters
setBeginningLog
in interface LogbookParameters
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)public LogbookParameters setTypeProcess(LogbookTypeProcess process)
LogbookParameters
setTypeProcess
in interface LogbookParameters
process
- process typepublic LogbookTypeProcess getTypeProcess()
LogbookParameters
getTypeProcess
in interface LogbookParameters
public LogbookParameters putParameterValue(LogbookParameterName parameterName, String parameterValue)
LogbookParameters
putParameterValue
in interface LogbookParameters
parameterName
- the key of the parameter to put on the parameter mapparameterValue
- the value to put on the parameter mappublic String getParameterValue(LogbookParameterName parameterName)
LogbookParameters
getParameterValue
in interface LogbookParameters
public LogbookParameters setMap(Map<String,String> map)
LogbookParameters
setMap
in interface LogbookParameters
public LogbookParameters setFromParameters(LogbookParameters parameters)
LogbookParameters
setFromParameters
in interface LogbookParameters
public Map<LogbookParameterName,String> getMapParameters()
VitamParameter
getMapParameters
in interface VitamParameter<LogbookParameterName>
Copyright © 2018 Vitam. All rights reserved.