|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.kim.impl.group.GroupServiceBase
org.kuali.rice.kim.impl.group.GroupServiceImpl
public class GroupServiceImpl
| Field Summary | |
|---|---|
protected BusinessObjectService |
businessObjectService
|
| Constructor Summary | |
|---|---|
GroupServiceImpl()
|
|
| Method Summary | |
|---|---|
boolean |
addGroupToGroup(String childId,
String parentId)
Adds the group with the id supplied in childId as a member of the group with the id supplied in parentId. |
boolean |
addPrincipalToGroup(String principalId,
String groupId)
Add the principal with the given principalId as a member of the group with the given groupId. |
Group |
createGroup(Group group)
Creates a new group using the given Group. |
GroupMember |
createGroupMember(GroupMember groupMember)
Creates a new group using the given GroupMember. |
List<String> |
findGroupIds(QueryByCriteria queryByCriteria)
Query for groups based on the given search criteria which is a Map of group field names to values. |
GroupMemberQueryResults |
findGroupMembers(QueryByCriteria queryByCriteria)
Query for group members based on the given search criteria which is a Map of group member field names to values. |
GroupQueryResults |
findGroups(QueryByCriteria queryByCriteria)
Query for groups based on the given search criteria which is a Map of group field names to values. |
Map<String,String> |
getAttributes(String groupId)
Get all the attributes of the given group. |
List<String> |
getDirectGroupIdsByPrincipalId(String principalId)
Get all the groups for the given principal. |
protected Collection<Group> |
getDirectGroupsForPrincipal(String principalId)
|
protected Collection<Group> |
getDirectGroupsForPrincipal(String principalId,
String namespaceCode)
|
List<String> |
getDirectMemberGroupIds(String groupId)
Returns all group ids that are direct members of the given group id. |
List<String> |
getDirectMemberPrincipalIds(String groupId)
Returns all principal ids that are direct members of the given group id. |
List<String> |
getDirectParentGroupIds(String groupId)
Returns all parent groups ids that the given group id is a member of. |
protected List<Group> |
getDirectParentGroups(String groupId)
|
Group |
getGroup(String groupId)
Lookup a Group based on the passed in id. |
protected org.kuali.rice.kim.impl.group.GroupBo |
getGroupBo(String groupId)
|
Group |
getGroupByNamespaceCodeAndName(String namespaceCode,
String groupName)
Lookup a Group based on the passed in namespace and name. |
List<String> |
getGroupIdsByPrincipalId(String principalId)
Get all the groups for the given principal. |
List<String> |
getGroupIdsByPrincipalIdAndNamespaceCode(String principalId,
String namespaceCode)
Get all the groups for the given principal. |
protected List<String> |
getGroupIdsByPrincipalIdAndNamespaceCodeInternal(String principalId,
String namespaceCode)
|
protected org.kuali.rice.kim.impl.group.GroupMemberBo |
getGroupMemberBo(String id)
|
List<Group> |
getGroups(Collection<String> groupIds)
Gets all groups for the given collection of group ids. |
List<Group> |
getGroupsByPrincipalId(String principalId)
Get all the groups for a given principal. |
List<Group> |
getGroupsByPrincipalIdAndNamespaceCode(String principalId,
String namespaceCode)
Get all the groups within a namespace for a given principal. |
protected List<Group> |
getGroupsByPrincipalIdAndNamespaceCodeInternal(String principalId,
String namespaceCode)
|
protected List<org.kuali.rice.kim.impl.group.GroupBo> |
getMemberGroupBos(String groupId)
|
List<String> |
getMemberGroupIds(String groupId)
Returns all group ids that are members of the given group id. |
protected void |
getMemberGroupsInternal(org.kuali.rice.kim.impl.group.GroupBo group,
Set<org.kuali.rice.kim.impl.group.GroupBo> groups)
|
protected List<String> |
getMemberIdsByType(Collection<GroupMember> members,
MemberType memberType)
|
List<String> |
getMemberPrincipalIds(String groupId)
Returns all principal ids that are members of the given group id. |
protected List<String> |
getMemberPrincipalIdsInternal(String groupId,
Set<String> visitedGroupIds)
|
List<GroupMember> |
getMembers(List<String> groupIds)
Get all GroupMembers all the groups with the given group ids. |
List<GroupMember> |
getMembersOfGroup(String groupId)
Get all GroupMembers all the groups with a given group id. |
List<String> |
getParentGroupIds(String groupId)
Returns all parent groups ids that the given group id is a member of. |
protected List<Group> |
getParentGroups(String groupId)
|
protected void |
getParentGroupsInternal(String groupId,
Set<Group> groups)
|
boolean |
isDirectMemberOfGroup(String principalId,
String groupId)
Check whether the give principal is a member of the group. |
boolean |
isGroupMemberOfGroup(String groupMemberId,
String groupId)
Check whether the group identified by groupMemberId is a member of the group identified by groupId. |
boolean |
isMemberOfGroup(String principalId,
String groupId)
Check whether the give principal is a member of the group. |
protected boolean |
isMemberOfGroupInternal(String memberId,
String groupId,
Set<String> visitedGroupIds,
MemberType memberType)
|
void |
removeAllMembers(String groupId)
Removes all members from the group with the given groupId. |
boolean |
removeGroupFromGroup(String childId,
String parentId)
Removes the group with the id supplied in childId from the group with the id supplied in parentId. |
boolean |
removePrincipalFromGroup(String principalId,
String groupId)
Removes the member principal with the given principalId from the group with the given groupId. |
protected org.kuali.rice.kim.impl.group.GroupBo |
saveGroup(org.kuali.rice.kim.impl.group.GroupBo group)
|
void |
setBusinessObjectService(BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value. |
void |
setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
Sets the criteriaLookupService attribute value. |
Group |
updateGroup(Group group)
Updates an existing group using the given Group. |
Group |
updateGroup(String groupId,
Group group)
Updates a group using the given Group. |
GroupMember |
updateGroupMember(GroupMember groupMember)
Updates an existing group using the given GroupMember. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BusinessObjectService businessObjectService
| Constructor Detail |
|---|
public GroupServiceImpl()
| Method Detail |
|---|
public Group getGroup(String groupId)
throws RiceIllegalArgumentException
GroupService
getGroup in interface GroupServicegroupId - String that matches the desired Groups id
RiceIllegalArgumentException - if the groupId is null or blank
public List<Group> getGroupsByPrincipalId(String principalId)
throws RiceIllegalArgumentException
GroupServiceThis will include all groups directly assigned as well as those inferred by the fact that they are members of higher level groups.
getGroupsByPrincipalId in interface GroupServiceprincipalId - The id of the Principal
RiceIllegalArgumentException - if the principalId is null or blank
public List<Group> getGroupsByPrincipalIdAndNamespaceCode(String principalId,
String namespaceCode)
throws RiceIllegalArgumentException
GroupServiceThis 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.
getGroupsByPrincipalIdAndNamespaceCode in interface GroupServiceprincipalId - The id of the PrincipalnamespaceCode - The namespace code of the desired Groups to return
RiceIllegalArgumentException - if the principalId, namespaceCode is null or blank
protected List<Group> getGroupsByPrincipalIdAndNamespaceCodeInternal(String principalId,
String namespaceCode)
throws RiceIllegalArgumentException
RiceIllegalArgumentException
public List<String> findGroupIds(QueryByCriteria queryByCriteria)
throws RiceIllegalArgumentException
GroupServiceThis method returns it's results as a List of group ids that match the given search criteria.
findGroupIds in interface GroupServicequeryByCriteria - the criteria. Cannot be null.
RiceIllegalArgumentException - if the queryByCriteria is null
public boolean isDirectMemberOfGroup(String principalId,
String groupId)
throws RiceIllegalArgumentException
GroupServiceThis method does not recurse into contained groups.
isDirectMemberOfGroup in interface GroupServiceprincipalId - Id of the principalgroupId - Id string of group
RiceIllegalArgumentException - if the principalId, groupId is null or blank
public List<String> getGroupIdsByPrincipalId(String principalId)
throws RiceIllegalArgumentException
GroupServiceThis returns id for all groups for a given principal id.
getGroupIdsByPrincipalId in interface GroupServiceprincipalId - Id of a Principal
RiceIllegalArgumentException - if the principalId is null or blank
public List<String> getGroupIdsByPrincipalIdAndNamespaceCode(String principalId,
String namespaceCode)
throws RiceIllegalArgumentException
GroupServiceThis returns id for all groups for a given principal id, limited to specific Group namespace.
getGroupIdsByPrincipalIdAndNamespaceCode in interface GroupServiceprincipalId - Id of a PrincipalnamespaceCode - Namspace code to limit group results to
RiceIllegalArgumentException - if the principalId, namespaceCode is null or blank
protected List<String> getGroupIdsByPrincipalIdAndNamespaceCodeInternal(String principalId,
String namespaceCode)
throws RiceIllegalArgumentException
RiceIllegalArgumentException
public List<String> getDirectGroupIdsByPrincipalId(String principalId)
throws RiceIllegalArgumentException
GroupServiceThis returns id for all groups for a given principal id.
getDirectGroupIdsByPrincipalId in interface GroupServiceprincipalId - Id of a Principal
RiceIllegalArgumentException - if the principalId is null or blank
public List<String> getMemberPrincipalIds(String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return a list of all principal ids for members this group.
getMemberPrincipalIds in interface GroupServicegroupId - Id string of group
RiceIllegalArgumentException - if the groupId is null or blank
public List<String> getDirectMemberPrincipalIds(String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return a list of all principal ids for direct members this group.
getDirectMemberPrincipalIds in interface GroupServicegroupId - Id string of group
RiceIllegalArgumentException - if the groupId is null or blank
public List<String> getMemberGroupIds(String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return a list of all group ids for members this group.
getMemberGroupIds in interface GroupServicegroupId - Id string of group
RiceIllegalArgumentException - if the groupId is null or blankprotected List<org.kuali.rice.kim.impl.group.GroupBo> getMemberGroupBos(String groupId)
protected void getMemberGroupsInternal(org.kuali.rice.kim.impl.group.GroupBo group,
Set<org.kuali.rice.kim.impl.group.GroupBo> groups)
public boolean isGroupMemberOfGroup(String groupMemberId,
String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return true if the group is a member of the group or a group assigned to this group.
isGroupMemberOfGroup in interface GroupServicegroupMemberId - Id of the principalgroupId - Id string of group
RiceIllegalArgumentException - if the groupMemberId, groupId is null or blank
public boolean isMemberOfGroup(String principalId,
String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return true if the principal is a member of the group or a group assigned to this group.
isMemberOfGroup in interface GroupServiceprincipalId - Id of the principalgroupId - Id string of group
RiceIllegalArgumentException - if the principalId, groupId is null or blank
public List<String> getDirectMemberGroupIds(String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return a list of all group ids for direct members this group.
getDirectMemberGroupIds in interface GroupServicegroupId - Id string of group
RiceIllegalArgumentException - if the groupId is null or blank
public List<String> getParentGroupIds(String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return a list of all group ids that the given group id is a member of.
getParentGroupIds in interface GroupServicegroupId - Id string of group
RiceIllegalArgumentException - if the groupId is null or blank
public List<String> getDirectParentGroupIds(String groupId)
throws RiceIllegalArgumentException
GroupServiceWill return a list of all group ids that the given group id is a member of.
getDirectParentGroupIds in interface GroupServicegroupId - Id string of group
RiceIllegalArgumentException - if the groupId is null or blank
public Map<String,String> getAttributes(String groupId)
throws RiceIllegalArgumentException
GroupService
getAttributes in interface GroupServiceRiceIllegalArgumentException - if the groupId is null or blank
public List<GroupMember> getMembers(List<String> groupIds)
throws RiceIllegalArgumentException
GroupServiceThe 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.
getMembers in interface GroupServicegroupIds - Ids of groups
RiceIllegalArgumentException - if the groupIds is null or empty
public List<Group> getGroups(Collection<String> groupIds)
throws RiceIllegalArgumentException
GroupServiceThe result is a Map containing the group id as the key and the Group as the value.
getGroups in interface GroupServicegroupIds - Collection that matches the desired Groups' id
RiceIllegalArgumentException - if the groupIds null or empty
public Group getGroupByNamespaceCodeAndName(String namespaceCode,
String groupName)
throws RiceIllegalArgumentException
GroupService
getGroupByNamespaceCodeAndName in interface GroupServicenamespaceCode - String that matches the desired Group's namespaceCodegroupName - String that matches the desired Group's name
RiceIllegalArgumentException - if the namespaceCode, groupName is null or blank
public GroupQueryResults findGroups(QueryByCriteria queryByCriteria)
throws RiceIllegalArgumentException
GroupServiceThis method returns it's results as a List of Groups that match the given search criteria.
findGroups in interface GroupServicequeryByCriteria - the criteria. Cannot be null.
RiceIllegalArgumentException - if the queryByCriteria is null
public GroupMemberQueryResults findGroupMembers(QueryByCriteria queryByCriteria)
throws RiceIllegalArgumentException
GroupServiceThis method returns it's results as a List of GroupMemberss that match the given search criteria.
findGroupMembers in interface GroupServicequeryByCriteria - the criteria. Cannot be null.
RiceIllegalArgumentException - if the queryByCriteria is null
protected boolean isMemberOfGroupInternal(String memberId,
String groupId,
Set<String> visitedGroupIds,
MemberType memberType)
protected void getParentGroupsInternal(String groupId,
Set<Group> groups)
protected List<Group> getDirectParentGroups(String groupId)
public List<GroupMember> getMembersOfGroup(String groupId)
throws RiceIllegalArgumentException
GroupServiceThe collection of GroupMembers will contain members for a the group in no defined order.
getMembersOfGroup in interface GroupServicegroupId - Id of group
RiceIllegalArgumentException - if the groupId is null or blank
protected List<String> getMemberIdsByType(Collection<GroupMember> members,
MemberType memberType)
protected org.kuali.rice.kim.impl.group.GroupBo getGroupBo(String groupId)
protected org.kuali.rice.kim.impl.group.GroupMemberBo getGroupMemberBo(String id)
protected List<Group> getParentGroups(String groupId)
throws RiceIllegalArgumentException
RiceIllegalArgumentException
protected List<String> getMemberPrincipalIdsInternal(String groupId,
Set<String> visitedGroupIds)
protected Collection<Group> getDirectGroupsForPrincipal(String principalId)
protected Collection<Group> getDirectGroupsForPrincipal(String principalId,
String namespaceCode)
public boolean addGroupToGroup(String childId,
String parentId)
throws RiceIllegalArgumentException
GroupService
addGroupToGroup in interface GroupServicechildId - Id of the Group to be added to the members of ParentparentId - Id of the Group object to add the member to
RiceIllegalArgumentException - if the childId, parentId is null or blank
public boolean addPrincipalToGroup(String principalId,
String groupId)
throws RiceIllegalArgumentException
GroupService
addPrincipalToGroup in interface GroupServiceprincipalId - Id of the Principal to be added to the members of the Parent GroupgroupId - Id of the Group object to add the member to
RiceIllegalArgumentException - if the principalId, groupId is null or blank
public Group createGroup(Group group)
throws RiceIllegalArgumentException
GroupServiceThis will attempt to create a new Group
createGroup in interface GroupServicegroup - The new group to be created
RiceIllegalArgumentException - if the group is null
public Group updateGroup(Group group)
throws RiceIllegalArgumentException
GroupServiceThis 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.
updateGroup in interface GroupServicegroup - The group to be updated
RiceIllegalArgumentException - if the group is null
public Group updateGroup(String groupId,
Group group)
throws RiceIllegalArgumentException
GroupServiceThis 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.
updateGroup in interface GroupServicegroupId - Id of the Group to be updatedgroup - Group object to use for update
RiceIllegalArgumentException - if the group is null or the groupId is null or blank
public GroupMember createGroupMember(GroupMember groupMember)
throws RiceIllegalArgumentException
GroupServiceThis will attempt to create a new GroupMember
createGroupMember in interface GroupServicegroupMember - The new groupMember to be created
RiceIllegalArgumentException - if the group is null
public GroupMember updateGroupMember(GroupMember groupMember)
throws RiceIllegalArgumentException
GroupServiceThis 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.
updateGroupMember in interface GroupServicegroupMember - The groupMember to be updated
RiceIllegalArgumentException - if the groupMember is null
public void removeAllMembers(String groupId)
throws RiceIllegalArgumentException
GroupService
removeAllMembers in interface GroupServicegroupId - Id of the Group object to remove the members from
RiceIllegalArgumentException - if the groupId is null or blank
public boolean removeGroupFromGroup(String childId,
String parentId)
throws RiceIllegalArgumentException
GroupService
removeGroupFromGroup in interface GroupServicechildId - Id of the Group to be removed from the members of ParentparentId - Id of the Group object to remove the member from
RiceIllegalArgumentException - if the childId, parentId is null or blank
public boolean removePrincipalFromGroup(String principalId,
String groupId)
throws RiceIllegalArgumentException
GroupService
removePrincipalFromGroup in interface GroupServiceprincipalId - Id of the Principal to be removed from the members of the Parent GroupgroupId - Id of the Group object to remove the member from
RiceIllegalArgumentException - if the principalId, groupId is null or blankprotected org.kuali.rice.kim.impl.group.GroupBo saveGroup(org.kuali.rice.kim.impl.group.GroupBo group)
public void setBusinessObjectService(BusinessObjectService businessObjectService)
businessObjectService - The businessObjectService to set.public void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
criteriaLookupService - The criteriaLookupService to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||