| Enum Constant and Description |
|---|
ADMINISTRATOR |
USER |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ROLE_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Optional<UserRole> |
findByAuthority(java.lang.String name) |
static java.util.Optional<UserRole> |
findByName(java.lang.String name) |
java.lang.String |
getAuthority() |
static UserRole |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static UserRole[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UserRole USER
public static final UserRole ADMINISTRATOR
public static final java.lang.String ROLE_PREFIX
public static UserRole[] values()
for (UserRole c : UserRole.values()) System.out.println(c);
public static UserRole valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static java.util.Optional<UserRole> findByName(java.lang.String name)
public static java.util.Optional<UserRole> findByAuthority(java.lang.String name)
public java.lang.String getAuthority()