All Superinterfaces:
Comparable, GrouperSetElement
All Known Implementing Classes:
Group

public interface Role extends GrouperSetElement, Comparable
  • Method Details

    • getAttributeDelegate

      AttributeAssignGroupDelegate getAttributeDelegate()
      Returns:
    • hasMember

      boolean hasMember(Subject subject)
      Parameters:
      subject -
      Returns:
      true if has member, false if not
      See Also:
    • delete

      void delete()
      delete this role. Note if the role participates in role inheritance, you need to break that inheritance first
    • getId

      String getId()
      uuid of role
      Returns:
      id
    • getIdIndex

      Long getIdIndex()
      id index of role
      Returns:
      idIndex
    • getName

      String getName()
      name of role
      Returns:
      name
    • getDescription

      String getDescription()
      description of role, friendly description, e.g. in sentence form, about what the attribute is about
      Returns:
      the description
    • getDisplayExtension

      String getDisplayExtension()
      displayExtension of role
      Returns:
      display extension
    • getDisplayName

      String getDisplayName()
      displayName of attribute, e.g. My School:Community Groups:Expire Date
      Returns:
      display name
    • getExtension

      String getExtension()
      extension of attribute expireTime
      Returns:
      extension
    • getStemId

      String getStemId()
      stem that this attribute is in
      Returns:
      the stem id
    • setDescription

      void setDescription(String description1)
      description of attribute, friendly description, e.g. in sentence form, about what the attribute is about
      Parameters:
      description1 -
    • setDisplayExtension

      void setDisplayExtension(String displayExtension1)
      displayExtension of attribute, e.g. Expire Date
      Parameters:
      displayExtension1 -
    • setDisplayName

      void setDisplayName(String displayName1)
      displayName of attribute, e.g. My School:Community Groups:Expire Date
      Parameters:
      displayName1 -
    • setExtension

      void setExtension(String extension1)
      extension of attribute expireTime
      Parameters:
      extension1 -
    • setId

      void setId(String id1)
      id of this attribute def name
      Parameters:
      id1 -
    • setName

      void setName(String name1)
      Parameters:
      name1 -
    • setStemId

      void setStemId(String stemId1)
      stem that this attribute is in
      Parameters:
      stemId1 -
    • getRoleInheritanceDelegate

      RoleInheritanceDelegate getRoleInheritanceDelegate()
      delegate calls to this class for role hierarchy stuff
      Returns:
      the delegate
    • getPermissionRoleDelegate

      PermissionRoleDelegate getPermissionRoleDelegate()
      delegate calls to this class for permission role stuff
      Returns:
      the delegate
    • addMember

      boolean addMember(Subject subj, boolean exceptionIfAlreadyMember) throws InsufficientPrivilegeException, MemberAddException
      Add a subject to this role as immediate member. An immediate member is directly assigned to a role. A composite role has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single role, and 0 to many effective memberships to a role. A role can have potentially unlimited effective memberships
       try {
         role.addMember(subj);
       }
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to add members 
       }
       catch (MemberAddException eMA) {
         // Unable to add subject
       } 
       
      Parameters:
      subj - Add this Subject
      exceptionIfAlreadyMember - if false, and subject is already a member, then dont throw a MemberAddException if the member is already in the role
      Returns:
      false if it already existed, true if it didnt already exist
      Throws:
      InsufficientPrivilegeException
      MemberAddException
    • deleteMember

      boolean deleteMember(Subject subj, boolean exceptionIfAlreadyDeleted) throws InsufficientPrivilegeException, MemberDeleteException
      remove a subject from this role, and subject must be immediate member. Will not remove the effective membership. An immediate member is directly assigned to a role. A composite role has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single role, and 0 to many effective memberships to a role. A role can have potentially unlimited effective memberships
       try {
         g.deleteMember(subj);
       } 
       catch (InsufficientPrivilegeException eIP) {
         // Not privileged to delete this subject
       }
       catch (MemberDeleteException eMD) {
         // Unable to delete subject
       }
       
      Parameters:
      subj - remove this Subject
      exceptionIfAlreadyDeleted -
      Returns:
      false if it was already deleted, true if it wasnt already deleted
      Throws:
      InsufficientPrivilegeException
      MemberDeleteException
    • getAttributeValueDelegate

      AttributeValueDelegate getAttributeValueDelegate()
      this delegate works on attributes and values at the same time
      Returns:
      the delegate