Enum Class JPPFRole

java.lang.Object
java.lang.Enum<JPPFRole>
org.jppf.admin.web.auth.JPPFRole
All Implemented Interfaces:
Serializable, Comparable<JPPFRole>, Constable

public enum JPPFRole extends Enum<JPPFRole>
Author:
Laurent Cohen
  • Enum Constant Details

    • MONITOR

      public static final JPPFRole MONITOR
      Monitor role.
    • MANAGER

      public static final JPPFRole MANAGER
      Manager role.
    • ADMIN

      public static final JPPFRole ADMIN
      Admin role.
  • Method Details

    • values

      public static JPPFRole[] 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

      public static JPPFRole valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • implies

      public boolean implies(JPPFRole role)
      Determine whether this role implies the specified one.
      Parameters:
      role - the role to check for implication.
      Returns:
      true if the role is implied, false otherwise.
    • getRoleName

      public String getRoleName()
      Returns:
      the role name.
    • getImpliedRoles

      public JPPFRole[] getImpliedRoles()
      Returns:
      the implied roles.
    • getRole

      public static JPPFRole getRole(String roleName)
      Get the role associated with the specified role name.
      Parameters:
      roleName - the role name to lookup.
      Returns:
      a JPPFRole enum value, or null if 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.