Name | Group | |
---|---|---|
Version | ||
Included Services | ||
Java Package | org.kuali.rice.kim.api.group |
A group is a collection of principals. It's membership consists of direct principal
assignment and/or nested group membership. All groups are uniquely identified by a namespace
code plus a name.
As mentioned previously, groups support nested group membership. A principal or group is
considered to be a "member" of a group if it is either directly assigned to the group or
indirectly assigned (via a nested group membership). A principal or group is said to be a
"direct" member of another group only if it is directly assigned as a member of the group,
and not via a nested group assignment.
Method | getGroupsByPrincipalId | ||
---|---|---|---|
Description | Get all the groups for a given principal.
|
||
Parameters | String | principalId | The id of the Principal |
Return | GroupList | a list of Group objects in which the given Principal is a member of. An empty list is returned if an invalid or non-existant principalId is supplied. |
|
Errors | RiceIllegalArgumentException | if the principalId is null or blank |
Method | getGroupsByPrincipalIdAndNamespaceCode | ||
---|---|---|---|
Description | Get all the groups within a namespace for a given principal.
|
||
Parameters | String | principalId | The id of the Principal |
String | namespaceCode | The namespace code of the desired Groups to return | |
Return | GroupList | a list of Group objects in which the given Principal is a member of, filtered by Group namespace. An empty list is returned if an invalid or non-existant principalId is supplied. |
|
Errors | RiceIllegalArgumentException | if the principalId, namespaceCode is null or blank |
Method | findGroupIds | ||
---|---|---|---|
Description | Query for groups based on the given search criteria which is a Map of group field names to values.
|
||
Parameters | QueryByCriteria | queryByCriteria | the criteria. Cannot be null. |
Return | StringList | a list of groupId Strings in which the given criteria match Group properties. An empty list is returned if an invalid or non-existent criteria is supplied. |
|
Errors | RiceIllegalArgumentException | if the queryByCriteria is null |
Method | findGroups | ||
---|---|---|---|
Description | Query for groups based on the given search criteria which is a Map of group field names to values.
|
||
Parameters | QueryByCriteria | queryByCriteria | the criteria. Cannot be null. |
Return | GroupQueryResults | a list of Group objects in which the given criteria match Group properties. An empty list is returned if an invalid or non-existent criteria is supplied. |
|
Errors | RiceIllegalArgumentException | if the queryByCriteria is null |
Method | findGroupMembers | ||
---|---|---|---|
Description | Query for group members based on the given search criteria which is a Map of group member field names to values.
|
||
Parameters | QueryByCriteria | queryByCriteria | the criteria. Cannot be null. |
Return | GroupMemberQueryResults | a list of GroupMember objects in which the given criteria match Group properties. An empty list is returned if an invalid or non-existent criteria is supplied. |
|
Errors | RiceIllegalArgumentException | if the queryByCriteria is null |
Method | getGroup | ||
---|---|---|---|
Description | Lookup a Group based on the passed in id. | ||
Parameters | String | id | String that matches the desired Groups id |
Return | Group | a Group with the given id value. A null reference is returned if an invalid or non-existant id is supplied. |
|
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getGroupByNamespaceCodeAndName | ||
---|---|---|---|
Description | Lookup a Group based on the passed in namespace and name. | ||
Parameters | String | namespaceCode | String that matches the desired Group's namespaceCode |
String | groupName | String that matches the desired Group's name | |
Return | Group | a Group with the given namespace and name values. A null reference is returned if an invalid or non-existant id is supplied. |
|
Errors | RiceIllegalArgumentException | if the namespaceCode, groupName is null or blank |
Method | getGroups | ||
---|---|---|---|
Description | Gets all groups for the given collection of group ids. The result is a Map containing the group id as the key and the Group as the value. |
||
Parameters | StringList | ids | Collection that matches the desired Groups' id |
Return | GroupList | a Map of Groups with the given id values. An empty Map is returned if an invalid or non-existant id is supplied. |
|
Errors | RiceIllegalArgumentException | if the groupIds null or empty |
Method | isMemberOfGroup | ||
---|---|---|---|
Description | Check whether the give principal is a member of the group. Will return true if the principal is a member of the group or a group assigned to this group. |
||
Parameters | String | principalId | Id of the principal |
String | groupId | Id string of group | |
Return | boolean | true if principal is a member of the group or a member of a group assigned to the the group. | |
Errors | RiceIllegalArgumentException | if the principalId, groupId is null or blank |
Method | isDirectMemberOfGroup | ||
---|---|---|---|
Description | Check whether the give principal is a member of the group. This method does not recurse into contained groups. |
||
Parameters | String | principalId | Id of the principal |
String | groupId | Id string of group | |
Return | boolean | true if principal is a direct member of the group. | |
Errors | RiceIllegalArgumentException | if the principalId, groupId is null or blank |
Method | getGroupIdsByPrincipalId | ||
---|---|---|---|
Description | Get all the groups for the given principal. Recurses into parent groups to provide a comprehensive list.
|
||
Parameters | String | principalId | Id of a Principal |
Return | StringList | a list of Group Ids in which the principal is a member of. | |
Errors | RiceIllegalArgumentException | if the principalId is null or blank |
Method | getGroupIdsByPrincipalIdAndNamespaceCode | ||
---|---|---|---|
Description | Get all the groups for the given principal. Recurses into parent groups to provide a comprehensive list. This is limited to the passed in Group's namespace.
|
||
Parameters | String | principalId | Id of a Principal |
String | namespaceCode | Namspace code to limit group results to | |
Return | StringList | a list of Group Ids in which the principal is a member of, limited to the passed in namespace. | |
Errors | RiceIllegalArgumentException | if the principalId, namespaceCode is null or blank |
Method | getDirectGroupIdsByPrincipalId | ||
---|---|---|---|
Description | Get all the groups for the given principal. Does not recurse into parent groups.
|
||
Parameters | String | principalId | Id of a Principal |
Return | StringList | a list of Group Ids in which the principal is directly a member of. | |
Errors | RiceIllegalArgumentException | if the principalId is null or blank |
Method | isGroupMemberOfGroup | ||
---|---|---|---|
Description | Check whether the group identified by groupMemberId is a member of the group identified by groupId. This will recurse through all groups. Will return true if the group is a member of the group or a group assigned to this group. |
||
Parameters | String | groupMemberId | Id of the principal |
String | groupId | Id string of group | |
Return | boolean | true if group is a member of the group or a member of a group assigned to the the group. | |
Errors | RiceIllegalArgumentException | if the groupMemberId, groupId is null or blank |
Method | getMemberPrincipalIds | ||
---|---|---|---|
Description | Returns all principal ids that are members of the given group id. Recurses into contained groups for comprehensive list. Will return a list of all principal ids for members this group. |
||
Parameters | String | groupId | Id string of group |
Return | StringList | List of principal ids | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getDirectMemberPrincipalIds | ||
---|---|---|---|
Description | Returns all principal ids that are direct members of the given group id. Will return a list of all principal ids for direct members this group. |
||
Parameters | String | groupId | Id string of group |
Return | StringList | List of direct member principal ids. | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getMemberGroupIds | ||
---|---|---|---|
Description | Returns all group ids that are members of the given group id. Recurses into contained groups for a comprehensive list. Will return a list of all group ids for members this group. |
||
Parameters | String | groupId | Id string of group |
Return | StringList | List of group ids | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getDirectMemberGroupIds | ||
---|---|---|---|
Description | Returns all group ids that are direct members of the given group id. Will return a list of all group ids for direct members this group. |
||
Parameters | String | groupId | Id string of group |
Return | StringList | List of direct member group ids. | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getParentGroupIds | ||
---|---|---|---|
Description | Returns all parent groups ids that the given group id is a member of. Recurses parent groups for a comprehensive list. Will return a list of all group ids that the given group id is a member of. |
||
Parameters | String | groupId | Id string of group |
Return | StringList | List of parent group ids. | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getDirectParentGroupIds | ||
---|---|---|---|
Description | Returns all parent groups ids that the given group id is a member of. Will return a list of all group ids that the given group id is a member of. |
||
Parameters | String | groupId | Id string of group |
Return | StringList | List of parent group ids. | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getAttributes | ||
---|---|---|---|
Description | Get all the attributes of the given group. | ||
Parameters | String | groupId | ??? |
Return | Map | ??? | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getMembersOfGroup | ||
---|---|---|---|
Description | Get all GroupMembers all the groups with a given group id.
|
||
Parameters | String | groupId | Id of group |
Return | GroupMemberList | Collection of GroupMembers. | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |
Method | getMembers | ||
---|---|---|---|
Description | Get all GroupMembers all the groups with the given group ids.
|
||
Parameters | StringList | groupIds | Ids of groups |
Return | GroupMemberList | Collection of GroupMembers. | |
Errors | RiceIllegalArgumentException | if the groupIds is null or empty |
Method | createGroup | ||
---|---|---|---|
Description | Creates a new group using the given Group.
|
||
Parameters | Group | group | The new group to be created |
Return | Group | a the Group that has been created. | |
Errors | RiceIllegalArgumentException | if the group is null |
Method | updateGroup | ||
---|---|---|---|
Description | Updates an existing group using the given Group.
|
||
Parameters | Group | group | The group to be updated |
Return | Group | a the Group that has been updated. | |
Errors | RiceIllegalArgumentException | if the group is null |
Method | updateGroup | ||
---|---|---|---|
Description | Updates a group using the given Group.
|
||
Parameters | String | groupId | Id of the Group to be updated |
Group | group | Group object to use for update | |
Return | Group | a the Group that has been updated. | |
Errors | RiceIllegalArgumentException | if the group is null or the groupId is null or blank |
Method | createGroupMember | ||
---|---|---|---|
Description | Creates a new group using the given GroupMember.
|
||
Parameters | GroupMember | groupMember | The new groupMember to be created |
Return | GroupMember | a the GroupMember that has been created. | |
Errors | RiceIllegalArgumentException | if the group is null |
Method | updateGroupMember | ||
---|---|---|---|
Description | Updates an existing group using the given GroupMember.
|
||
Parameters | GroupMember | groupMember | The groupMember to be updated |
Return | GroupMember | a the GroupMember that has been updated. | |
Errors | RiceIllegalArgumentException | if the groupMember is null |
Method | addGroupToGroup | ||
---|---|---|---|
Description | Adds the group with the id supplied in childId as a member of the group with the id supplied in parentId. | ||
Parameters | String | childId | Id of the Group to be added to the members of Parent |
String | parentId | Id of the Group object to add the member to | |
Return | boolean | true if the member was added successfully. | |
Errors | RiceIllegalArgumentException | if the childId, parentId is null or blank |
Method | removeGroupFromGroup | ||
---|---|---|---|
Description | Removes the group with the id supplied in childId from the group with the id supplied in parentId. | ||
Parameters | String | childId | Id of the Group to be removed from the members of Parent |
String | parentId | Id of the Group object to remove the member from | |
Return | boolean | true if the member was removed successfully. | |
Errors | RiceIllegalArgumentException | if the childId, parentId is null or blank |
Method | addPrincipalToGroup | ||
---|---|---|---|
Description | Add the principal with the given principalId as a member of the group with the given groupId. | ||
Parameters | String | principalId | Id of the Principal to be added to the members of the Parent Group |
String | groupId | Id of the Group object to add the member to | |
Return | boolean | true if the member was added successfully. | |
Errors | RiceIllegalArgumentException | if the principalId, groupId is null or blank |
Method | removePrincipalFromGroup | ||
---|---|---|---|
Description | Removes the member principal with the given principalId from the group with the given groupId. | ||
Parameters | String | principalId | Id of the Principal to be removed from the members of the Parent Group |
String | groupId | Id of the Group object to remove the member from | |
Return | boolean | true if the member was removed successfully. | |
Errors | RiceIllegalArgumentException | if the principalId, groupId is null or blank |
Method | removeAllMembers | ||
---|---|---|---|
Description | Removes all members from the group with the given groupId. | ||
Parameters | String | groupId | Id of the Group object to remove the members from |
Return | void | ??? | |
Errors | RiceIllegalArgumentException | if the groupId is null or blank |