Class RoleDescriptor

    • Constructor Detail

      • RoleDescriptor

        public RoleDescriptor​(java.lang.String id,
                              ObjectIdentity definedContext,
                              ObjectIdentity assignedContext,
                              java.lang.String name,
                              java.lang.String description,
                              java.util.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 Detail

      • 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 java.lang.String getName()
        Gets the name of a role.
        Returns:
        The name of this role.
      • setName

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

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

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

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

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