Package fr.gouv.vitam.common.model
Class ItemStatus
- java.lang.Object
-
- fr.gouv.vitam.common.model.ItemStatus
-
public class ItemStatus extends java.lang.Object
Composite Item Status
-
-
Constructor Summary
Constructors Constructor Description ItemStatus()
ItemStatus(java.lang.String itemId)
ConstructorItemStatus(java.lang.String itemId, java.lang.String message, StatusCode globalStatus, java.util.List<java.lang.Integer> statusMeter, java.util.Map<java.lang.String,java.lang.Object> data, java.util.LinkedHashMap<java.lang.String,ItemStatus> itemsStatus, ProcessState globalState)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clearStatusMeterFatal()
java.lang.String
computeStatusMeterMessage()
ItemStatus
disableLfc()
java.util.Map<java.lang.String,java.lang.Object>
getData()
Deprecated.java.lang.Object
getData(java.lang.String key)
java.lang.String
getEvDetailData()
java.lang.String
getGlobalOutcomeDetailSubcode()
ProcessState
getGlobalState()
Get the global stateStatusCode
getGlobalStatus()
java.lang.String
getItemId()
java.util.Map<java.lang.String,ItemStatus>
getItemsStatus()
java.lang.String
getLogbookTypeProcess()
java.util.Map<java.lang.String,java.lang.Object>
getMasterData()
java.lang.String
getMessage()
java.util.List<java.lang.Integer>
getStatusMeter()
java.util.LinkedHashMap<java.lang.String,ItemStatus>
getSubTaskStatus()
protected ItemStatus
increment(ItemStatus itemStatus1, ItemStatus itemStatus2)
ItemStatus
increment(StatusCode statusCode)
ItemStatus
increment(StatusCode statusCode, int increment)
boolean
isLifecycleEnable()
void
reinitStatusMeter()
Reinit all the values of this statusMeter to 0ItemStatus
setData(java.lang.String key, java.lang.Object value)
ItemStatus
setEvDetailData(java.lang.String evDetailData)
set EvDetailDataItemStatus
setGlobalOutcomeDetailSubcode(java.lang.String globalOutcomeDetailSubcode)
ItemStatus
setGlobalState(ProcessState globalState)
ItemStatus
setItemId(java.lang.String itemId)
ItemStatus
setItemsStatus(ItemStatus compositeItemStatus)
ItemStatus
setItemsStatus(java.lang.String itemId, ItemStatus statusDetails)
ItemStatus
setItemsStatus(java.lang.String itemId, ItemStatus statusDetails, StatusAggregationBehavior statusAggregationBehavior)
ItemStatus
setLogbookTypeProcess(java.lang.String logbookTypeProcess)
ItemStatus
setMasterData(java.lang.String key, java.lang.Object value)
ItemStatus
setMessage(java.lang.String message)
void
setStatusMeterValue(StatusCode statusCode, java.lang.Integer value)
Set the value of the specified statusCode in this statusMeterItemStatus
setSubTasksStatus(java.util.Map<java.lang.String,ItemStatus> tasks)
ItemStatus
setSubTaskStatus(java.lang.String taskId, ItemStatus taskStatus)
boolean
shallStop(boolean blocking)
-
-
-
Constructor Detail
-
ItemStatus
public ItemStatus()
-
ItemStatus
public ItemStatus(java.lang.String itemId, java.lang.String message, StatusCode globalStatus, java.util.List<java.lang.Integer> statusMeter, java.util.Map<java.lang.String,java.lang.Object> data, java.util.LinkedHashMap<java.lang.String,ItemStatus> itemsStatus, ProcessState globalState)
-
ItemStatus
public ItemStatus(java.lang.String itemId)
Constructor- Parameters:
itemId
-
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
- Returns:
- the message
-
setMessage
public ItemStatus setMessage(java.lang.String message)
- Parameters:
message
- the message to set- Returns:
- this
-
getItemId
public java.lang.String getItemId()
- Returns:
- the itemId
-
setItemId
public ItemStatus setItemId(java.lang.String itemId)
- Parameters:
itemId
- the itemId to set- Returns:
- this
-
getStatusMeter
public java.util.List<java.lang.Integer> getStatusMeter()
- Returns:
- the statusMeter
-
increment
public ItemStatus increment(StatusCode statusCode)
- Parameters:
statusCode
- the statusCode to increment- Returns:
- this
-
increment
public ItemStatus increment(StatusCode statusCode, int increment)
- Parameters:
statusCode
- the statusCode to incrementincrement
-- Returns:
- this
-
increment
protected ItemStatus increment(ItemStatus itemStatus1, ItemStatus itemStatus2)
- Parameters:
itemStatus1
- the statusCode to incrementitemStatus2
-- Returns:
- this
-
getGlobalStatus
public StatusCode getGlobalStatus()
- Returns:
- the globalStatus
-
getData
public java.lang.Object getData(java.lang.String key)
- Returns:
- the data
-
getData
@Deprecated public java.util.Map<java.lang.String,java.lang.Object> getData()
Deprecated.- Returns:
-
setData
public ItemStatus setData(java.lang.String key, java.lang.Object value)
- Parameters:
key
-value
-- Returns:
- this
-
getMasterData
public java.util.Map<java.lang.String,java.lang.Object> getMasterData()
- Returns:
- masterData
-
setMasterData
public ItemStatus setMasterData(java.lang.String key, java.lang.Object value)
-
computeStatusMeterMessage
public java.lang.String computeStatusMeterMessage()
- Returns:
- String message
-
getItemsStatus
public java.util.Map<java.lang.String,ItemStatus> getItemsStatus()
- Returns:
- the itemsStatus
-
setItemsStatus
public ItemStatus setItemsStatus(java.lang.String itemId, ItemStatus statusDetails)
-
setItemsStatus
public ItemStatus setItemsStatus(java.lang.String itemId, ItemStatus statusDetails, StatusAggregationBehavior statusAggregationBehavior)
-
setItemsStatus
public ItemStatus setItemsStatus(ItemStatus compositeItemStatus)
- Parameters:
compositeItemStatus
-- Returns:
- this
-
getGlobalState
public ProcessState getGlobalState()
Get the global state- Returns:
- globalState as type ProcessState
-
setGlobalState
public ItemStatus setGlobalState(ProcessState globalState)
- Parameters:
globalState
- the golbal state to set- Returns:
- this
-
shallStop
public boolean shallStop(boolean blocking)
- Parameters:
blocking
- True if the step or handler is blocking- Returns:
- True if this item shall stop the Step or Handler
-
getSubTaskStatus
public java.util.LinkedHashMap<java.lang.String,ItemStatus> getSubTaskStatus()
- Returns:
- the subTaskStatus
-
setSubTaskStatus
public ItemStatus setSubTaskStatus(java.lang.String taskId, ItemStatus taskStatus)
- Parameters:
taskId
- the taskId to settaskStatus
- the taskStatus to set- Returns:
- this
-
setSubTasksStatus
public ItemStatus setSubTasksStatus(java.util.Map<java.lang.String,ItemStatus> tasks)
-
getEvDetailData
public java.lang.String getEvDetailData()
- Returns:
- evDetailData
-
setEvDetailData
public ItemStatus setEvDetailData(java.lang.String evDetailData)
set EvDetailData- Parameters:
evDetailData
-- Returns:
- this
-
getLogbookTypeProcess
public java.lang.String getLogbookTypeProcess()
-
setLogbookTypeProcess
public ItemStatus setLogbookTypeProcess(java.lang.String logbookTypeProcess)
-
getGlobalOutcomeDetailSubcode
public java.lang.String getGlobalOutcomeDetailSubcode()
-
setGlobalOutcomeDetailSubcode
public ItemStatus setGlobalOutcomeDetailSubcode(java.lang.String globalOutcomeDetailSubcode)
-
isLifecycleEnable
public boolean isLifecycleEnable()
-
disableLfc
public ItemStatus disableLfc()
-
setStatusMeterValue
public void setStatusMeterValue(StatusCode statusCode, java.lang.Integer value)
Set the value of the specified statusCode in this statusMeter- Parameters:
statusCode
-value
-
-
reinitStatusMeter
public void reinitStatusMeter()
Reinit all the values of this statusMeter to 0
-
clearStatusMeterFatal
public void clearStatusMeterFatal()
-
-