Package fr.gouv.vitam.common.model
Enum Class StatusCode
- All Implemented Interfaces:
Serializable
,Comparable<StatusCode>
,Constable
Enum StatusCode
different constants status code for workflow , action handler and process
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionALREADY_EXECUTED : indicates that a particular step / action has already been processedFATAL : indicates a critical error such as technical Exception ( runtime exception, illegal argument exception, null pointer exception ...)KO : indicates the failed execution of the actionOK : indicates the successful without warningSTARTED : indicates that the workflow or the action handler or the process has been startedUNKNOWN : indicates that the workflow or the action handler or the process is in unknown status!WARNING : indicates successful with a general warning. -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response.Status
int
boolean
boolean
boolean
boolean
static StatusCode
Returns the enum constant of this class with the specified name.static StatusCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
UNKNOWN : indicates that the workflow or the action handler or the process is in unknown status! -
STARTED
STARTED : indicates that the workflow or the action handler or the process has been started -
ALREADY_EXECUTED
ALREADY_EXECUTED : indicates that a particular step / action has already been processed -
OK
OK : indicates the successful without warning -
WARNING
WARNING : indicates successful with a general warning. Warning are often useful in preventing future Action problems -
KO
KO : indicates the failed execution of the action -
FATAL
FATAL : indicates a critical error such as technical Exception ( runtime exception, illegal argument exception, null pointer exception ...)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getStatusLevel
public int getStatusLevel()- Returns:
- Status Level
-
isGreaterOrEqualToWarn
public boolean isGreaterOrEqualToWarn()- Returns:
- True if the status is greater or equal to WARN
-
isGreaterOrEqualToKo
public boolean isGreaterOrEqualToKo()- Returns:
- True if the status is greater or equal to KO
-
isGreaterOrEqualToFatal
public boolean isGreaterOrEqualToFatal()- Returns:
- True if the status is greater or equal to FATAL
-
isGreaterOrEqualToStarted
public boolean isGreaterOrEqualToStarted() -
getEquivalentHttpStatus
public javax.ws.rs.core.Response.Status getEquivalentHttpStatus()- Returns:
- the HTTP Status equivalent to this StatusCode for OK, KO and WARNING status
-