Enum Class ContextLifecycle
java.lang.Object
java.lang.Enum<ContextLifecycle>
org.gcube.informationsystem.resourceregistry.api.rest.ContextLifecycle
- All Implemented Interfaces:
Serializable,Comparable<ContextLifecycle>,Constable
Lifecycle slice selector for context collection reads.
- Author:
- Luca Frosini (ISTI - CNR)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLowercase wire value for live + deleted contexts.static final ContextLifecycleThe default lifecycle slice when no parameter is supplied.static final StringLowercase wire value for deleted (cemetery) contexts only.static final StringLowercase wire value for live contexts only (default). -
Method Summary
Modifier and TypeMethodDescriptionstatic ContextLifecyclefromString(String s) Parses a wire value (case-insensitive).toString()Returns the lowercase wire value (e.g.static ContextLifecycleReturns the enum constant of this class with the specified name.static ContextLifecycle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LIVE
Includes only live (non-deleted) contexts. -
DELETED
Includes only deleted (cemetery) contexts. -
ALL
Includes both live and deleted contexts.
-
-
Field Details
-
LIVE_WIRE
Lowercase wire value for live contexts only (default).- See Also:
-
DELETED_WIRE
Lowercase wire value for deleted (cemetery) contexts only.- See Also:
-
ALL_WIRE
Lowercase wire value for live + deleted contexts.- See Also:
-
DEFAULT
The default lifecycle slice when no parameter is supplied.
-
-
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
-
fromString
Parses a wire value (case-insensitive). Returnsnullfor unrecognised strings.- Parameters:
s- the wire string to parse- Returns:
- the matching
ContextLifecycle, ornullif unrecognised
-
toString
Returns the lowercase wire value (e.g."live").- Overrides:
toStringin classEnum<ContextLifecycle>
-