Class Group


public class Group extends Permissionable
A grouping of users and/or other groups. Any permissions that are applied to the group will be inherited by every member of the group. A user can be a member of more than one group and a group can be a member of other groups.
  • Method Details

    • getMembers

      public Set<Permissionable> getMembers()
      Gets the members that have been added to the group.
      Returns:
      The Set of Group members.
      Throws:
      IllegalStateException - if this Group was removed from the PermissioningDatasource.
    • addMember

      public void addMember(Permissionable member) throws InvalidHierarchyException
      Adds a member to the group.
      Parameters:
      member - The member that you want to add.
      Throws:
      NoTransactionInProgressException - if this method is called outside the scope of a PermissioningDataSource transaction
      InvalidHierarchyException - if adding the member will create a cycle in the group hierarchy
      IllegalStateException - if this Group was removed from the PermissioningDatasource. It will also occur if you are attempting to add a member that has been removed from the PermissioningDataSource.
    • removeMember

      public void removeMember(Permissionable member) throws NoTransactionInProgressException
      Removes a member from the group.
      Parameters:
      member - The member to be removed from this group.
      Throws:
      NoTransactionInProgressException - if this method is called outside the scope of a PermissioningDataSource transaction
      IllegalStateException - if this Group was removed from the PermissioningDatasource.
    • toString

      public String toString()
      Returns a string representation of Group.
      Overrides:
      toString in class Object
      Returns:
      A string of the form "Group[name, permissions, members]".