Class RoleDescriptor

java.lang.Object
com.sas.lsaf.core.AbstractIdentifiable
com.sas.lsaf.security.role.RoleDescriptor
All Implemented Interfaces:
Identifiable, Serializable
Direct Known Subclasses:
Role

public class RoleDescriptor extends AbstractIdentifiable
A lightweight representation of a role.
Since:
1.2
See Also:
  • Constructor Details

    • RoleDescriptor

      public RoleDescriptor(String id, ObjectIdentity definedContext, ObjectIdentity assignedContext, String name, String description, Set<ScopedPrivilege> privileges)
      It is not intended or recommended that the consumer of this API construct these objects. They should only deal with the role descriptors returned by the API.
      Parameters:
      id - the unique identifier of this role.
      definedContext - the context where this role was defined.
      assignedContext - the context where this role is being assigned.
      name - the name of this role.
      description - the description of this role.
      privileges - the privileges associated with this role.
  • Method Details

    • getDefinedContext

      public ObjectIdentity getDefinedContext()
      Gets the context where a role is defined.
      Returns:
      The context where a role is defined.
    • getAssignedContext

      public ObjectIdentity getAssignedContext()
      Gets the context where a role was assigned. If a role is a defined role a context value will always match the getDefinedContext() value. If a role is inherited then this value will be a descendant context where the role was inherited.
      Returns:
      The context where this role has been applied.
    • isInherited

      public boolean isInherited()
      Checks if this role is a defined role or an inherited role.
      Returns:
      true if this role is an inherited role, false if this a defined role.
    • getName

      public String getName()
      Gets the name of a role.
      Returns:
      The name of this role.
    • setName

      public void setName(String name)
      Sets the name of a role.
      Parameters:
      name - the name of this role.
    • getDescription

      public String getDescription()
      Gets the description of a role.
      Returns:
      The description of this role.
    • setDescription

      public void setDescription(String description)
      Sets the description of a role.
      Parameters:
      description - the description of this role.
    • getPrivileges

      public Set<ScopedPrivilege> getPrivileges()
      Gets the privileges assigned to a role.
      Returns:
      The privileges assigned to this role.
    • setPrivileges

      public void setPrivileges(Set<ScopedPrivilege> privileges)
      Sets the privileges assigned to a role.
      Parameters:
      privileges - the privileges to assign to this role.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractIdentifiable
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractIdentifiable
    • toString

      public String toString()
      Overrides:
      toString in class AbstractIdentifiable