org.kuali.rice.kim.service.impl
Class GroupServiceImpl

java.lang.Object
  extended by org.kuali.rice.kim.service.impl.GroupServiceBase
      extended by org.kuali.rice.kim.service.impl.GroupServiceImpl
All Implemented Interfaces:
GroupService

public class GroupServiceImpl
extends GroupServiceBase
implements GroupService


Field Summary
private  KimGroupDao kimGroupDao
           
 
Constructor Summary
GroupServiceImpl()
           
 
Method Summary
 List<String> getDirectGroupIdsForPrincipal(String principalId)
          Get the groupIds in which the principal has direct membership only.
protected  Collection<GroupInfo> getDirectGroupsForPrincipal(String principalId)
           
protected  Collection<GroupInfo> getDirectGroupsForPrincipal(String principalId, String namespaceCode)
           
 List<String> getDirectMemberGroupIds(String groupId)
          Get all the groups which are direct members of the given group.
 List<String> getDirectMemberPrincipalIds(String groupId)
          Get all the principals directly assigned to the given group.
 List<String> getDirectParentGroupIds(String groupId)
          Get the groupIds which that are directly above this group.
 AttributeSet getGroupAttributes(String groupId)
          Get all the attributes of the given group.
 List<String> getGroupIdsForPrincipal(String principalId)
          Get all the groups for the given principal.
 List<String> getGroupIdsForPrincipalByNamespace(String principalId, String namespaceCode)
          Get all the groups for the given principal in the given namespace.
 Collection<GroupMembershipInfo> getGroupMembers(List<String> groupIds)
          Get the membership info for the members of all the groups with the given group ids.
 Collection<GroupMembershipInfo> getGroupMembersOfGroup(String groupId)
          Get the membership info for the members of the group with the given id.
 List<GroupInfo> getGroupsForPrincipal(String principalId)
          Get all the groups for a given principal.
 List<GroupInfo> getGroupsForPrincipalByNamespace(String principalId, String namespaceCode)
          Get all the groups within a namespace for a given principal.
 KimGroupDao getKimGroupDao()
           
 List<String> getMemberGroupIds(String groupId)
          Get all the groups contained by the given group.
protected  List<GroupImpl> getMemberGroups(String groupId)
           
protected  void getMemberGroupsInternal(GroupImpl group, Set<GroupImpl> groups)
           
 List<String> getMemberPrincipalIds(String groupId)
          Get all the principals of the given group.
 List<String> getParentGroupIds(String groupId)
          Get the groups which are parents of the given group.
 boolean isDirectMemberOfGroup(String principalId, String groupId)
          Check whether the give principal is a member of the group.
 boolean isGroupActive(String groupId)
          Checks if the group with the given id is active.
 boolean isMemberOfGroup(String principalId, String groupId)
          Check whether the give principal is a member of the group.
 List<String> lookupGroupIds(Map<String,String> searchCriteria)
          Query for groups based on the given search criteria which is a Map of group field names to values.
 List<? extends Group> lookupGroups(Map<String,String> searchCriteria)
          Query for groups based on the given search criteria which is a Map of group field names to values.
 void setKimGroupDao(KimGroupDao kimGroupDao)
           
protected  GroupMembershipInfo toGroupMemberInfo(GroupMemberImpl kimGroupMember)
           
 
Methods inherited from class org.kuali.rice.kim.service.impl.GroupServiceBase
getBusinessObjectService, getDirectParentGroups, getGroupByName, getGroupImpl, getGroupInfo, getGroupInfoByName, getGroupInfos, getIdentityManagementNotificationService, getLookupService, getMemberPrincipalIdsInternal, getParentGroups, getParentGroupsInternal, isGroupMemberOfGroup, isGroupMemberOfGroupInternal, isMemberOfGroupInternal, toGroupInfo, toGroupInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.kim.service.GroupService
getGroupInfo, getGroupInfoByName, getGroupInfos, isGroupMemberOfGroup
 

Field Detail

kimGroupDao

private KimGroupDao kimGroupDao
Constructor Detail

GroupServiceImpl

public GroupServiceImpl()
Method Detail

getGroupIdsForPrincipal

public List<String> getGroupIdsForPrincipal(String principalId)
Description copied from interface: GroupService
Get all the groups for the given principal. Recurses into parent groups to provide a comprehensive list.

Specified by:
getGroupIdsForPrincipal in interface GroupService
See Also:
GroupService.getGroupIdsForPrincipal(java.lang.String)

getGroupIdsForPrincipalByNamespace

public List<String> getGroupIdsForPrincipalByNamespace(String principalId,
                                                       String namespaceCode)
Description copied from interface: GroupService
Get all the groups for the given principal in the given namespace. Recurses into parent groups to provide a comprehensive list.

Specified by:
getGroupIdsForPrincipalByNamespace in interface GroupService
See Also:
GroupService.getGroupIdsForPrincipalByNamespace(java.lang.String, java.lang.String)

getDirectGroupIdsForPrincipal

public List<String> getDirectGroupIdsForPrincipal(String principalId)
Description copied from interface: GroupService
Get the groupIds in which the principal has direct membership only.

Specified by:
getDirectGroupIdsForPrincipal in interface GroupService
See Also:
GroupService.getDirectGroupIdsForPrincipal(java.lang.String)

getGroupsForPrincipal

public List<GroupInfo> getGroupsForPrincipal(String principalId)
Description copied from interface: GroupService
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.

Specified by:
getGroupsForPrincipal in interface GroupService
See Also:
GroupService.getGroupsForPrincipal(java.lang.String)

getGroupsForPrincipalByNamespace

public List<GroupInfo> getGroupsForPrincipalByNamespace(String principalId,
                                                        String namespaceCode)
Description copied from interface: GroupService
Get all the groups within a namespace for a given principal.

This is the same as the GroupService.getGroupsForPrincipal(String) method except that the results will be filtered by namespace after retrieval.

Specified by:
getGroupsForPrincipalByNamespace in interface GroupService
See Also:
GroupService.getGroupsForPrincipalByNamespace(java.lang.String, java.lang.String)

getDirectGroupsForPrincipal

protected Collection<GroupInfo> getDirectGroupsForPrincipal(String principalId)

getDirectGroupsForPrincipal

protected Collection<GroupInfo> getDirectGroupsForPrincipal(String principalId,
                                                            String namespaceCode)

getMemberGroups

protected List<GroupImpl> getMemberGroups(String groupId)
See Also:
org.kuali.rice.kim.service.GroupService#getMemberGroups(java.lang.String)

getMemberGroupsInternal

protected void getMemberGroupsInternal(GroupImpl group,
                                       Set<GroupImpl> groups)

lookupGroupIds

public List<String> lookupGroupIds(Map<String,String> searchCriteria)
Description copied from interface: GroupService
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.

Specified by:
lookupGroupIds in interface GroupService
See Also:
GroupService.lookupGroupIds(java.util.Map)

lookupGroups

public List<? extends Group> lookupGroups(Map<String,String> searchCriteria)
Description copied from interface: GroupService
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 GroupInfo objects that match the given search criteria.

Specified by:
lookupGroups in interface GroupService
See Also:
GroupService.lookupGroups(java.util.Map)

getDirectMemberPrincipalIds

public List<String> getDirectMemberPrincipalIds(String groupId)
Description copied from interface: GroupService
Get all the principals directly assigned to the given group.

Specified by:
getDirectMemberPrincipalIds in interface GroupService
See Also:
GroupService.getDirectMemberPrincipalIds(java.lang.String)

getMemberPrincipalIds

public List<String> getMemberPrincipalIds(String groupId)
Description copied from interface: GroupService
Get all the principals of the given group. Recurses into contained groups to provide a comprehensive list.

Specified by:
getMemberPrincipalIds in interface GroupService
Overrides:
getMemberPrincipalIds in class GroupServiceBase
See Also:
GroupService.getMemberPrincipalIds(java.lang.String)

isMemberOfGroup

public boolean isMemberOfGroup(String principalId,
                               String groupId)
Description copied from interface: GroupService
Check whether the give principal is a member of the group.

This will also return true if the principal is a member of a groups assigned to this group.

Specified by:
isMemberOfGroup in interface GroupService
See Also:
GroupService.isMemberOfGroup(java.lang.String, java.lang.String)

getDirectParentGroupIds

public List<String> getDirectParentGroupIds(String groupId)
Description copied from interface: GroupService
Get the groupIds which that are directly above this group.

Specified by:
getDirectParentGroupIds in interface GroupService
See Also:
GroupService.getDirectParentGroupIds(java.lang.String)

getParentGroupIds

public List<String> getParentGroupIds(String groupId)
Description copied from interface: GroupService
Get the groups which are parents of the given group.

This will recurse into groups above the given group and build a complete list of all groups included above this group.

Specified by:
getParentGroupIds in interface GroupService
See Also:
GroupService.getParentGroupIds(java.lang.String)

getDirectMemberGroupIds

public List<String> getDirectMemberGroupIds(String groupId)
Description copied from interface: GroupService
Get all the groups which are direct members of the given group.

Specified by:
getDirectMemberGroupIds in interface GroupService
See Also:
GroupService.getDirectMemberGroupIds(java.lang.String)

isGroupActive

public boolean isGroupActive(String groupId)
Description copied from interface: GroupService
Checks if the group with the given id is active. Returns true if it is, false otherwise.

Specified by:
isGroupActive in interface GroupService
See Also:
GroupService.isGroupActive(java.lang.String)

getMemberGroupIds

public List<String> getMemberGroupIds(String groupId)
Description copied from interface: GroupService
Get all the groups contained by the given group. Recurses into contained groups to provide a comprehensive list.

Specified by:
getMemberGroupIds in interface GroupService
See Also:
GroupService.getMemberGroupIds(java.lang.String)

isDirectMemberOfGroup

public boolean isDirectMemberOfGroup(String principalId,
                                     String groupId)
Description copied from interface: GroupService
Check whether the give principal is a member of the group.

This will not recurse into contained groups.

Specified by:
isDirectMemberOfGroup in interface GroupService
See Also:
GroupService.isDirectMemberOfGroup(java.lang.String, java.lang.String)

getGroupAttributes

public AttributeSet getGroupAttributes(String groupId)
Description copied from interface: GroupService
Get all the attributes of the given group.

Specified by:
getGroupAttributes in interface GroupService
See Also:
GroupService.getGroupAttributes(java.lang.String)

getGroupMembers

public Collection<GroupMembershipInfo> getGroupMembers(List<String> groupIds)
Description copied from interface: GroupService
Get the membership info for the members of all the groups with the given group ids.

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

Specified by:
getGroupMembers in interface GroupService

getGroupMembersOfGroup

public Collection<GroupMembershipInfo> getGroupMembersOfGroup(String groupId)
Description copied from interface: GroupService
Get the membership info for the members of the group with the given id.

Only GroupMembershipInfo for direct group members is returned.

Specified by:
getGroupMembersOfGroup in interface GroupService

toGroupMemberInfo

protected GroupMembershipInfo toGroupMemberInfo(GroupMemberImpl kimGroupMember)

getKimGroupDao

public KimGroupDao getKimGroupDao()

setKimGroupDao

public void setKimGroupDao(KimGroupDao kimGroupDao)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.