Package fr.gouv.vitam.common.model
Enum StatusCode
- java.lang.Object
-
- java.lang.Enum<StatusCode>
-
- fr.gouv.vitam.common.model.StatusCode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<StatusCode>
public enum StatusCode extends java.lang.Enum<StatusCode>
Enum StatusCode different constants status code for workflow , action handler and process
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALREADY_EXECUTED
ALREADY_EXECUTED : indicates that a particular step / action has already been processedFATAL
FATAL : indicates a critical error such as technical Exception ( runtime exception, illegal argument exception, null pointer exception ...)KO
KO : indicates the failed execution of the actionOK
OK : indicates the successful without warningSTARTED
STARTED : indicates that the workflow or the action handler or the process has been startedUNKNOWN
UNKNOWN : indicates that the workflow or the action handler or the process is in unknown status!WARNING
WARNING : indicates successful with a general warning.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response.Status
getEquivalentHttpStatus()
int
getStatusLevel()
boolean
isGreaterOrEqualToFatal()
boolean
isGreaterOrEqualToKo()
boolean
isGreaterOrEqualToStarted()
boolean
isGreaterOrEqualToWarn()
static StatusCode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static StatusCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final StatusCode UNKNOWN
UNKNOWN : indicates that the workflow or the action handler or the process is in unknown status!
-
STARTED
public static final StatusCode STARTED
STARTED : indicates that the workflow or the action handler or the process has been started
-
ALREADY_EXECUTED
public static final StatusCode ALREADY_EXECUTED
ALREADY_EXECUTED : indicates that a particular step / action has already been processed
-
OK
public static final StatusCode OK
OK : indicates the successful without warning
-
WARNING
public static final StatusCode WARNING
WARNING : indicates successful with a general warning. Warning are often useful in preventing future Action problems
-
KO
public static final StatusCode KO
KO : indicates the failed execution of the action
-
FATAL
public static final StatusCode FATAL
FATAL : indicates a critical error such as technical Exception ( runtime exception, illegal argument exception, null pointer exception ...)
-
-
Method Detail
-
values
public static StatusCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StatusCode c : StatusCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StatusCode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- 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
-
-