Class RoleAuthority

java.lang.Object
com.gigaspaces.security.authorities.RoleAuthority
All Implemented Interfaces:
Authority, Serializable
Direct Known Subclasses:
PopulatedRoleAuthority

public class RoleAuthority extends Object implements Authority
Defines an association of a role by-name.

The RoleAuthoritys' Authority.getAuthority() String representation format:

 RolePrivilege role

 Where:
 role = role-name
 
Since:
7.0
Author:
Moran Avigdor
See Also:
  • Constructor Details

    • RoleAuthority

      public RoleAuthority(String role)
      A role authority with a specified role name.
      Parameters:
      role - The role name.
  • Method Details

    • valueOf

      public static RoleAuthority valueOf(String authority)
      Parses the getAuthority() string representation of an Authority.
      Parameters:
      authority - The role authority to be parsed.
      Returns:
      an instance of the authority represented by the authority string.
    • getAuthority

      public String getAuthority()
      Description copied from interface: Authority
      An Authority that can be represented as a String which is sufficient in precision to be relied upon for an access control decisions.
      Specified by:
      getAuthority in interface Authority
      Returns:
      a representation of the granted authority (expressed as a String with sufficient precision).
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRole

      public String getRole()