Package org.cyclos.model.access.tokens
Enum TokenStatus
- java.lang.Object
-
- java.lang.Enum<TokenStatus>
-
- org.cyclos.model.access.tokens.TokenStatus
-
- All Implemented Interfaces:
Serializable,Comparable<TokenStatus>,HasMessageKey
public enum TokenStatus extends Enum<TokenStatus> implements HasMessageKey
Possible statuses for a token
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTIVATION_EXPIREDThe token has exceeded the activation deadlineACTIVEThe token is active and can be used.BLOCKEDThe token is blocked from being used.CANCELEDThe token is canceled and cannot be used.EXPIREDThe token has exceeded the expiration datePENDING_ACTIVATIONThe token has been assigned to a user, but it's still not active.UNASSIGNEDThe token is not assigned to a user
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageKeygetMessageKey()static TokenStatusvalueOf(String name)Returns the enum constant of this type with the specified name.static TokenStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNASSIGNED
public static final TokenStatus UNASSIGNED
The token is not assigned to a user
-
PENDING_ACTIVATION
public static final TokenStatus PENDING_ACTIVATION
The token has been assigned to a user, but it's still not active.
-
ACTIVE
public static final TokenStatus ACTIVE
The token is active and can be used.
-
BLOCKED
public static final TokenStatus BLOCKED
The token is blocked from being used.
-
CANCELED
public static final TokenStatus CANCELED
The token is canceled and cannot be used.
-
ACTIVATION_EXPIRED
public static final TokenStatus ACTIVATION_EXPIRED
The token has exceeded the activation deadline
-
EXPIRED
public static final TokenStatus EXPIRED
The token has exceeded the expiration date
-
-
Method Detail
-
values
public static TokenStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TokenStatus c : TokenStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TokenStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
-