GroupService

Name Group
Version
Included Services  
Java Package org.kuali.rice.kim.api.group

This service provides operations for checking group membership, querying for group data,
creating and updating groups.

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.

Operations
Main Message Structures

Method getGroupsByPrincipalId
Description Get all the groups for a given principal.


This will include all groups directly assigned as well as those inferred
by the fact that they are members of higher level groups.

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

Back to Operations

Method getGroupsByPrincipalIdAndNamespaceCode
Description Get all the groups within a namespace for a given principal.


This will include all groups directly assigned as well as those inferred
by the fact that they are members of higher level groups, and filtered by Group namespace.

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

Back to Operations

Method findGroupIds
Description Query for groups based on the given search criteria which is a Map of group field names to values.


This method returns it's results as a List of group ids that match the given search criteria.

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

Back to Operations

Method findGroups
Description Query for groups based on the given search criteria which is a Map of group field names to values.


This method returns it's results as a List of Groups that match the given search criteria.

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

Back to Operations

Method findGroupMembers
Description Query for group members based on the given search criteria which is a Map of group member field names to values.


This method returns it's results as a List of GroupMemberss that match the given search criteria.

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

Method getGroupIdsByPrincipalId
Description Get all the groups for the given principal. Recurses into parent groups
to provide a comprehensive list.


This returns id for all groups for a given principal id.

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

Back to Operations

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.


This returns id for all groups for a given principal id, limited to specific Group 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

Back to Operations

Method getDirectGroupIdsByPrincipalId
Description Get all the groups for the given principal. Does not recurse into parent groups.


This returns id for all groups for a given principal id.

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

Method getMembersOfGroup
Description Get all GroupMembers all the groups with a given group id.


The collection of GroupMembers will contain members for a the group in no defined order.

Parameters String groupId Id of group
Return GroupMemberList Collection of GroupMembers.
Errors RiceIllegalArgumentException if the groupId is null or blank

Back to Operations

Method getMembers
Description Get all GroupMembers all the groups with the given group ids.


The collection of GroupMembers will contain members for all the groups in no defined order.
The values returned may or may not be grouped by group id.

Parameters StringList groupIds Ids of groups
Return GroupMemberList Collection of GroupMembers.
Errors RiceIllegalArgumentException if the groupIds is null or empty

Back to Operations

Method createGroup
Description Creates a new group using the given Group.


This will attempt to create a new 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

Back to Operations

Method updateGroup
Description Updates an existing group using the given Group.


This will attempt to update an existing Group. For this to return without exceptions, the passed in Group
must have it's Id set and be a valid group that already exists.

Parameters Group group The group to be updated
Return Group a the Group that has been updated.
Errors RiceIllegalArgumentException if the group is null

Back to Operations

Method updateGroup
Description Updates a group using the given Group.


This will attempt to update an existing group with data from the passed in group. If the passed in groupId and the group.id values are different
this method will inactivate the old group and create a new group with the same members with the passed in groups properties.

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

Back to Operations

Method createGroupMember
Description Creates a new group using the given GroupMember.


This will attempt to create a new 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

Back to Operations

Method updateGroupMember
Description Updates an existing group using the given GroupMember.


This will attempt to update an existing GroupMember. For this to return without exceptions, the passed in
GroupMember must have it's Id set and be a valid groupMember that already exists.

Parameters GroupMember groupMember The groupMember to be updated
Return GroupMember a the GroupMember that has been updated.
Errors RiceIllegalArgumentException if the groupMember is null

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations