Enum Class LicenseState
- All Implemented Interfaces:
Serializable, Comparable<LicenseState>, Constable
The
state of a licence document (LICENSE-V2-DESIGN.md sections 2.2 and 7): what the MLS says about the installation at the time of issue.- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe entitlement is active:active.The owner of the installation gave it up (7.3):deactivated.Mindus withdrew it (7.4):revoked.A trial, ending attrialUntil:trial.Method Summary
Modifier and TypeMethodDescriptionstatic LicenseStateFinds the state of a token.token()Gets the token as written in the payload.static LicenseStateReturns the enum constant of this class with the specified name.static LicenseState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
ACTIVE
The entitlement is active:active.TRIAL
A trial, ending attrialUntil:trial.DEACTIVATED
The owner of the installation gave it up (7.3):deactivated.REVOKED
Mindus withdrew it (7.4):revoked.
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
token
fromToken
Finds the state of a token.- Parameters:
token- The token, exactly as the payload spells it.- Returns:
- The state, or null when the token is none of them.