Enum Class StatusCode

java.lang.Object
java.lang.Enum<StatusCode>
fr.gouv.vitam.common.model.StatusCode
All Implemented Interfaces:
Serializable, Comparable<StatusCode>, Constable

public enum StatusCode extends Enum<StatusCode>
Enum StatusCode different constants status code for workflow , action handler and process
  • Enum Constant Details

    • 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 Details

    • values

      public static StatusCode[] 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

      public static StatusCode valueOf(String name)
      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 name
      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