Enum Class ContextLifecycle

java.lang.Object
java.lang.Enum<ContextLifecycle>
org.gcube.informationsystem.resourceregistry.api.rest.ContextLifecycle
All Implemented Interfaces:
Serializable, Comparable<ContextLifecycle>, Constable

public enum ContextLifecycle extends Enum<ContextLifecycle>
Lifecycle slice selector for context collection reads.
Author:
Luca Frosini (ISTI - CNR)
  • Enum Constant Details

    • LIVE

      public static final ContextLifecycle LIVE
      Includes only live (non-deleted) contexts.
    • DELETED

      public static final ContextLifecycle DELETED
      Includes only deleted (cemetery) contexts.
    • ALL

      public static final ContextLifecycle ALL
      Includes both live and deleted contexts.
  • Field Details

    • LIVE_WIRE

      public static final String LIVE_WIRE
      Lowercase wire value for live contexts only (default).
      See Also:
    • DELETED_WIRE

      public static final String DELETED_WIRE
      Lowercase wire value for deleted (cemetery) contexts only.
      See Also:
    • ALL_WIRE

      public static final String ALL_WIRE
      Lowercase wire value for live + deleted contexts.
      See Also:
    • DEFAULT

      public static final ContextLifecycle DEFAULT
      The default lifecycle slice when no parameter is supplied.
  • Method Details

    • values

      public static ContextLifecycle[] 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 ContextLifecycle 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
    • fromString

      public static ContextLifecycle fromString(String s)
      Parses a wire value (case-insensitive). Returns null for unrecognised strings.
      Parameters:
      s - the wire string to parse
      Returns:
      the matching ContextLifecycle, or null if unrecognised
    • toString

      public String toString()
      Returns the lowercase wire value (e.g. "live").
      Overrides:
      toString in class Enum<ContextLifecycle>