Package org.jppf.admin.web.auth
Enum Class JPPFRole
- All Implemented Interfaces:
Serializable,Comparable<JPPFRole>,Constable
- Author:
- Laurent Cohen
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionJPPFRole[]static JPPFRoleGet the role associated with the specified role name.getRoles(org.apache.wicket.authroles.authorization.strategies.role.Roles roles) Get the roles the current user has.booleanDetermine whether this role implies the specified one.static JPPFRoleReturns the enum constant of this class with the specified name.static JPPFRole[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MONITOR
Monitor role. -
MANAGER
Manager role. -
ADMIN
Admin role.
-
-
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
-
implies
Determine whether this role implies the specified one.- Parameters:
role- the role to check for implication.- Returns:
trueif the role is implied,falseotherwise.
-
getRoleName
- Returns:
- the role name.
-
getImpliedRoles
- Returns:
- the implied roles.
-
getRole
Get the role associated with the specified role name.- Parameters:
roleName- the role name to lookup.- Returns:
- a
JPPFRoleenum value, ornullif there is no matching role.
-
getRoles
public static Set<String> getRoles(org.apache.wicket.authroles.authorization.strategies.role.Roles roles) Get the roles the current user has.- Parameters:
roles- the roles determined from the current user session.- Returns:
- a set of roles, possibly empty.
-