Package com.caplin.permissioning
Class Group
java.lang.Object
com.caplin.permissioning.Permissionable
com.caplin.permissioning.Group
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.
-
Field Summary
Fields inherited from class com.caplin.permissioning.Permissionable
name, parents, productPermissionSets -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMember(Permissionable member) Adds a member to the group.Gets the members that have been added to the group.voidremoveMember(Permissionable member) Removes a member from the group.toString()Returns a string representation ofGroup.Methods inherited from class com.caplin.permissioning.Permissionable
applyPermission, copyPermissions, deny, equals, getName, hashCode, permit, removeAllPermissions, removePermission
-
Method Details
-
getMembers
Gets the members that have been added to the group.- Returns:
- The
SetofGroupmembers. - Throws:
IllegalStateException- if thisGroupwas removed from thePermissioningDatasource.
-
addMember
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 aPermissioningDataSourcetransactionInvalidHierarchyException- if adding the member will create a cycle in the group hierarchyIllegalStateException- if thisGroupwas removed from thePermissioningDatasource. It will also occur if you are attempting to add a member that has been removed from thePermissioningDataSource.
-
removeMember
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 aPermissioningDataSourcetransactionIllegalStateException- if thisGroupwas removed from thePermissioningDatasource.
-
toString
Returns a string representation ofGroup.
-