org.keyczar.enums
Enum KeyStatus
java.lang.Object
java.lang.Enum<KeyStatus>
org.keyczar.enums.KeyStatus
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<KeyStatus>
public enum KeyStatus
- extends java.lang.Enum<KeyStatus>
Encodes different possible statuses of keys:
- Primary: This key can verify or decrypt existing data and can sign or
encrypt new data.
- Active: This key can only verify or decrypt existing data.
- Inactive: This key can only verify or decrypt existing
data and may be revoked at any time.
JSON Representation is one of the strings:
- "PRIMARY"
- "ACTIVE"
- "INACTIVE"
- Author:
- steveweis@gmail.com (Steve Weis), arkajit.dey@gmail.com (Arkajit Dey)
Method Summary |
static KeyStatus |
getStatus(int value)
|
static KeyStatus |
getStatus(java.lang.String name)
|
static KeyStatus |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static KeyStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
Methods inherited from class java.lang.Enum |
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
PRIMARY
public static final KeyStatus PRIMARY
ACTIVE
public static final KeyStatus ACTIVE
INACTIVE
public static final KeyStatus INACTIVE
values
public static KeyStatus[] 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 (KeyStatus c : KeyStatus.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static KeyStatus valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null
getStatus
public static KeyStatus getStatus(int value)
getStatus
public static KeyStatus getStatus(java.lang.String name)