Enum Class FacilityState

java.lang.Object
java.lang.Enum<FacilityState>
de.dlr.proseo.model.enums.FacilityState
All Implemented Interfaces:
Serializable, Comparable<FacilityState>, Constable

public enum FacilityState extends Enum<FacilityState>
For the user as well as for planning and product access purposes it is important to know, whether a processing facility is operational or not.
Allowed state transitions are DISABLED <--> STOPPED --> STARTING --> RUNNING --> STOPPING --> STOPPED.
Author:
Dr. Thomas Bassler
  • Enum Constant Details

    • DISABLED

      public static final FacilityState DISABLED
      The processing facility must not be used. All requests concerning a facility in this state shall return the HTTP code 400 (Bad Request)
    • STOPPED

      public static final FacilityState STOPPED
      The processing facility is temporarily halted. The facility is available for order planning, but no job steps shall be started, and requests for product ingestion or download shall return the HTTP code 503 (Temporarily Unavailable) immediately.
    • STARTING

      public static final FacilityState STARTING
      The processing facility is in the run-up process. The fa- cility is available for order planning, job step starting may be initiated, but may time out, all other requests shall return the HTTP code 503 (Temporarily Unavailable) either immediately or after a reasonable time out period.
    • RUNNING

      public static final FacilityState RUNNING
      The processing facility is fully available. All requests are allowed.
    • STOPPING

      public static final FacilityState STOPPING
      The processing facility is in the process of being stopped. No new job steps shall be started, but running job steps are allowed to finish and can be queried. All other requests shall return the HTTP code 503 (Temporarily Unavailable) immediately.
  • Method Details

    • values

      public static FacilityState[] 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 FacilityState 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
    • isLegalTransition

      public boolean isLegalTransition(FacilityState other)
      Check whether the transition to the other state is legal
      Parameters:
      other - the state to switch to
      Returns:
      true, if the transition is legal, false otherwise