Package com.authlete.common.types
Enum GMAction
- java.lang.Object
-
- java.lang.Enum<GMAction>
-
- com.authlete.common.types.GMAction
-
- All Implemented Interfaces:
Serializable
,Comparable<GMAction>
public enum GMAction extends Enum<GMAction>
Grant Management Action.- Since:
- 3.1
- See Also:
- Grant Management for OAuth 2.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GMAction
getByValue(short value)
Find an instance of this enum by a value.short
getValue()
Get the integer representation of this enum instance.static GMAction
parse(String action)
ConvertString
toGMAction
.static GMAction[]
toArray(int bits)
static int
toBits(EnumSet<GMAction> set)
static EnumSet<GMAction>
toSet(int bits)
static EnumSet<GMAction>
toSet(GMAction[] array)
String
toString()
static GMAction
valueOf(String name)
Returns the enum constant of this type with the specified name.static GMAction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CREATE
public static final GMAction CREATE
"create"
(1).
-
QUERY
public static final GMAction QUERY
"query"
(2).
-
REPLACE
public static final GMAction REPLACE
"replace"
(3).
-
REVOKE
public static final GMAction REVOKE
"revoke"
(4).
-
MERGE
public static final GMAction MERGE
"merge"
(5)."update"
was renamed to"merge"
by FAPI PR 344. The change takes effect from the second Implementer's Draft of Grant Management for OAuth 2.0.- Since:
- 3.28
- See Also:
- FAPI PR 344
-
-
Method Detail
-
values
public static GMAction[] 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 (GMAction c : GMAction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GMAction 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
-
getValue
public short getValue()
Get the integer representation of this enum instance.
-
getByValue
public static GMAction getByValue(short value)
Find an instance of this enum by a value.- Parameters:
value
- The integer representation of the instance to find.- Returns:
- An instance of this enum, or
null
if not found.
-
parse
public static GMAction parse(String action)
ConvertString
toGMAction
.- Parameters:
action
- A grant management action. For example,"query"
.- Returns:
GMAction
instance, ornull
.
-
toArray
public static GMAction[] toArray(int bits)
-
-