org.kuali.rice.kim.impl.role
Class RoleInternalServiceImpl

java.lang.Object
  extended by org.kuali.rice.kim.impl.role.RoleInternalServiceImpl
All Implemented Interfaces:
RoleInternalService

public class RoleInternalServiceImpl
extends Object
implements RoleInternalService


Nested Class Summary
protected static class RoleServiceBase.RoleDaoAction
          A helper enumeration for indicating which KimRoleDao method to use when attempting to get role/delegation-related lists that are not in the cache.
 
Field Summary
protected  CriteriaLookupService criteriaLookupService
           
 
Constructor Summary
RoleInternalServiceImpl()
           
 
Method Summary
protected  RoleMember doAnyMemberRecordsMatch(List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers, String memberId, String memberTypeCode, Map<String,String> qualifier)
           
protected  List<RoleMember> doAnyMemberRecordsMatchByExactQualifier(RoleEbo role, String memberId, RoleServiceBase.RoleDaoAction daoActionToTake, Map<String,String> qualifier)
           
protected  boolean doesMemberMatch(org.kuali.rice.kim.impl.role.RoleMemberBo roleMember, String memberId, String memberTypeCode, Map<String,String> qualifier)
           
protected  BusinessObjectService getBusinessObjectService()
           
 CriteriaLookupService getCriteriaLookupService()
           
protected  org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo getDelegateMemberBo(String delegationMemberId)
          Retrieves a DelegateMemberBo object by its ID.
protected  List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getDelegationMemberBoList(RoleServiceBase.RoleDaoAction daoActionToTake, Collection<String> delegationIds, String principalId, List<String> groupIds)
          Retrieves a List of delegation members from the KimRoleDao as appropriate.
protected  List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getDelegationMemberBoListByMemberAndDelegationId(String memberId, String delegationId)
          Retrieves a DelegateMemberBo List by (principal/group/role) member ID and delegation ID.
protected  org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo getDelegationOfType(String roleId, DelegationType delegationType)
           
protected  GroupService getGroupService()
           
protected  IdentityService getIdentityService()
           
protected  String getKimAttributeId(String attributeName)
           
protected  LookupService getLookupService()
           
protected  Object getMember(String memberTypeCode, String memberId)
           
protected  String getMemberName(Object member)
           
protected  void getNestedRoleTypeMemberIds(String roleId, Set<String> members)
           
protected  org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo getPrimaryDelegation(String roleId, List<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> roleDelegates)
           
protected  ResponsibilityInternalService getResponsibilityInternalService()
           
protected  org.kuali.rice.kim.impl.role.RoleBo getRoleBo(String roleId)
           
protected  org.kuali.rice.kim.impl.role.RoleBo getRoleBoByName(String namespaceCode, String roleName)
           
protected  org.kuali.rice.kim.impl.role.RoleBoLite getRoleBoLite(String roleId)
           
protected  org.kuali.rice.kim.impl.role.RoleBoLite getRoleBoLiteByName(String namespaceCode, String roleName)
           
protected  RoleDao getRoleDao()
           
protected  org.kuali.rice.kim.impl.role.RoleMemberBo getRoleMemberBo(String roleMemberId)
          Retrieves a RoleMemberBo object by its ID.
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMemberBoList(RoleServiceBase.RoleDaoAction daoActionToTake, Collection<String> roleIds, String principalId, Collection<String> groupIds, String memberTypeCode, Map<String,String> qualification)
          Retrieves a list of RoleMemberBo instances from the KimRoleDao.
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMembersByExactQualifierMatch(RoleEbo role, String memberId, RoleServiceBase.RoleDaoAction daoActionToTake, Map<String,String> qualifier)
           
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMembersForGroupIds(String roleId, List<String> groupIds)
           
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMembersForPrincipalId(String roleId, String principalId)
           
protected  org.kuali.rice.kim.impl.role.RoleResponsibilityActionBo getRoleResponsibilityActionBo(String roleResponsibilityActionId)
          Retrieves a RoleResponsibilityActionBo object by its ID.
protected  RoleTypeService getRoleTypeService(KimType typeInfo)
           
protected  RoleTypeService getRoleTypeService(String roleId)
          Retrieves the role type service associated with the given role ID
protected  RoleTypeService getRoleTypeServiceByName(String serviceName)
          Retrieves the role type service for the given service name.
protected  Map<String,org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> getStoredDelegationImplMapFromRoleIds(Collection<String> roleIds)
          Calls the KimRoleDao's "getDelegationImplMapFromRoleIds" method and/or retrieves any corresponding delegations from the cache.
protected  List<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> getStoredDelegationImplsForRoleIds(Collection<String> roleIds)
          Calls the KimRoleDao's "getDelegationBosForRoleIds" method and/or retrieves any corresponding delegations from the cache.
protected  List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getStoredDelegationPrincipalsForPrincipalIdAndDelegationIds(Collection<String> delegationIds, String principalId)
          Calls the KimRoleDao's "getDelegationPrincipalsForPrincipalIdAndDelegationIds" method and/or retrieves any corresponding members from the cache.
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleGroupsForGroupIdsAndRoleIds(Collection<String> roleIds, Collection<String> groupIds, Map<String,String> qualification)
          Calls the KimRoleDao's "getRoleGroupsForGroupIdsAndRoleIds" method and/or retrieves any corresponding members from the cache.
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembersForRoleIds(Collection<String> roleIds, String memberTypeCode, Map<String,String> qualification)
          Calls the KimRoleDao's "getRoleMembersForRoleIds" method and/or retrieves any corresponding members from the cache.
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembersForRoleIdsWithFilters(Collection<String> roleIds, String principalId, List<String> groupIds, Map<String,String> qualification)
          Calls the KimRoleDao's "getRoleMembersForRoleIdsWithFilters" method and/or retrieves any corresponding members from the cache.
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembershipsForRoleIdsAsMembers(Collection<String> roleIds, Map<String,String> qualification)
          Calls the KimRoleDao's "getRoleMembershipsForRoleIdsAsMembers" method and/or retrieves any corresponding members from the cache.
protected  List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRolePrincipalsForPrincipalIdAndRoleIds(Collection<String> roleIds, String principalId, Map<String,String> qualification)
          Calls the KimRoleDao's "getRolePrincipalsForPrincipalIdAndRoleIds" method and/or retrieves any corresponding members from the cache.
 void groupInactivated(String groupId)
          Notifies the role service that the group with the given id has been inactivated.
protected  void inactivateApplicationRoleMemberships(String principalId, Timestamp yesterday)
           
protected  void inactivateGroupRoleMemberships(List<String> groupIds, Timestamp yesterday)
           
protected  void inactivatePrincipalDelegations(String principalId, Timestamp yesterday)
           
protected  void inactivatePrincipalGroupMemberships(List<String> groupIds, Timestamp yesterday)
           
protected  void inactivatePrincipalGroupMemberships(String principalId, Timestamp yesterday)
           
protected  void inactivatePrincipalRoleMemberships(String principalId, Timestamp yesterday)
           
protected  boolean isDelegationPrimary(DelegationType delegationType)
           
protected  boolean isDelegationSecondary(DelegationType delegationType)
           
protected  org.kuali.rice.kim.impl.role.RoleMemberBo matchingMemberRecord(List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers, String memberId, String memberTypeCode, Map<String,String> qualifier)
           
protected  Map<String,String> populateQualifiersForExactMatch(Map<String,String> defaultQualification, List<String> attributes)
           
 void principalInactivated(String principalId)
          Notifies all of a principal's roles and role types that the principal has been inactivated.
 void roleInactivated(String roleId)
          Notifies the role service that the role with the given id has been inactivated.
 void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
           
 void setRoleDao(RoleDao roleDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

criteriaLookupService

protected CriteriaLookupService criteriaLookupService
Constructor Detail

RoleInternalServiceImpl

public RoleInternalServiceImpl()
Method Detail

principalInactivated

public void principalInactivated(String principalId)
Description copied from interface: RoleInternalService
Notifies all of a principal's roles and role types that the principal has been inactivated.

Specified by:
principalInactivated in interface RoleInternalService

roleInactivated

public void roleInactivated(String roleId)
Description copied from interface: RoleInternalService
Notifies the role service that the role with the given id has been inactivated.

Specified by:
roleInactivated in interface RoleInternalService

groupInactivated

public void groupInactivated(String groupId)
Description copied from interface: RoleInternalService
Notifies the role service that the group with the given id has been inactivated.

Specified by:
groupInactivated in interface RoleInternalService

inactivateApplicationRoleMemberships

protected void inactivateApplicationRoleMemberships(String principalId,
                                                    Timestamp yesterday)

inactivatePrincipalRoleMemberships

protected void inactivatePrincipalRoleMemberships(String principalId,
                                                  Timestamp yesterday)

inactivateGroupRoleMemberships

protected void inactivateGroupRoleMemberships(List<String> groupIds,
                                              Timestamp yesterday)

inactivatePrincipalGroupMemberships

protected void inactivatePrincipalGroupMemberships(String principalId,
                                                   Timestamp yesterday)

inactivatePrincipalGroupMemberships

protected void inactivatePrincipalGroupMemberships(List<String> groupIds,
                                                   Timestamp yesterday)

inactivatePrincipalDelegations

protected void inactivatePrincipalDelegations(String principalId,
                                              Timestamp yesterday)

getNestedRoleTypeMemberIds

protected void getNestedRoleTypeMemberIds(String roleId,
                                          Set<String> members)

getRoleMembersForPrincipalId

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMembersForPrincipalId(String roleId,
                                                                                       String principalId)

getRoleMembersForGroupIds

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMembersForGroupIds(String roleId,
                                                                                    List<String> groupIds)

getRoleMemberBoList

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMemberBoList(RoleServiceBase.RoleDaoAction daoActionToTake,
                                                                              Collection<String> roleIds,
                                                                              String principalId,
                                                                              Collection<String> groupIds,
                                                                              String memberTypeCode,
                                                                              Map<String,String> qualification)
Retrieves a list of RoleMemberBo instances from the KimRoleDao.

Parameters:
daoActionToTake - An indicator for which KimRoleDao method should be used to get the results if the desired RoleMemberBos are not cached.
roleIds - The role IDs to filter by; may get used as the IDs for members that are also roles, depending on the daoActionToTake value.
principalId - The principal ID to filter by; may get ignored depending on the daoActionToTake value.
groupIds - The group IDs to filter by; may get ignored depending on the daoActionToTake value.
memberTypeCode - The member type code to filter by; may get overridden depending on the daoActionToTake value.
qualification - The original role qualification attribute set
Returns:
A list of RoleMemberBo instances based on the provided parameters.
Throws:
IllegalArgumentException - if daoActionToTake refers to an enumeration constant that is not role-member-related.

getStoredRolePrincipalsForPrincipalIdAndRoleIds

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRolePrincipalsForPrincipalIdAndRoleIds(Collection<String> roleIds,
                                                                                                          String principalId,
                                                                                                          Map<String,String> qualification)
Calls the KimRoleDao's "getRolePrincipalsForPrincipalIdAndRoleIds" method and/or retrieves any corresponding members from the cache.


getStoredRoleGroupsForGroupIdsAndRoleIds

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleGroupsForGroupIdsAndRoleIds(Collection<String> roleIds,
                                                                                                   Collection<String> groupIds,
                                                                                                   Map<String,String> qualification)
Calls the KimRoleDao's "getRoleGroupsForGroupIdsAndRoleIds" method and/or retrieves any corresponding members from the cache.


getStoredRoleMembersForRoleIds

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembersForRoleIds(Collection<String> roleIds,
                                                                                         String memberTypeCode,
                                                                                         Map<String,String> qualification)
Calls the KimRoleDao's "getRoleMembersForRoleIds" method and/or retrieves any corresponding members from the cache.


getStoredRoleMembershipsForRoleIdsAsMembers

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembershipsForRoleIdsAsMembers(Collection<String> roleIds,
                                                                                                      Map<String,String> qualification)
Calls the KimRoleDao's "getRoleMembershipsForRoleIdsAsMembers" method and/or retrieves any corresponding members from the cache.


getStoredRoleMembersForRoleIdsWithFilters

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembersForRoleIdsWithFilters(Collection<String> roleIds,
                                                                                                    String principalId,
                                                                                                    List<String> groupIds,
                                                                                                    Map<String,String> qualification)
Calls the KimRoleDao's "getRoleMembersForRoleIdsWithFilters" method and/or retrieves any corresponding members from the cache.


getRoleMemberBo

protected org.kuali.rice.kim.impl.role.RoleMemberBo getRoleMemberBo(String roleMemberId)
Retrieves a RoleMemberBo object by its ID. If the role member already exists in the cache, this method will return the cached version; otherwise, it will retrieve the uncached version from the database and then cache it (if it belongs to a role that allows its members to be cached) before returning it.


getRoleResponsibilityActionBo

protected org.kuali.rice.kim.impl.role.RoleResponsibilityActionBo getRoleResponsibilityActionBo(String roleResponsibilityActionId)
Retrieves a RoleResponsibilityActionBo object by its ID.


getStoredDelegationImplMapFromRoleIds

protected Map<String,org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> getStoredDelegationImplMapFromRoleIds(Collection<String> roleIds)
Calls the KimRoleDao's "getDelegationImplMapFromRoleIds" method and/or retrieves any corresponding delegations from the cache.


getStoredDelegationImplsForRoleIds

protected List<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> getStoredDelegationImplsForRoleIds(Collection<String> roleIds)
Calls the KimRoleDao's "getDelegationBosForRoleIds" method and/or retrieves any corresponding delegations from the cache.


getDelegationMemberBoList

protected List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getDelegationMemberBoList(RoleServiceBase.RoleDaoAction daoActionToTake,
                                                                                                   Collection<String> delegationIds,
                                                                                                   String principalId,
                                                                                                   List<String> groupIds)
Retrieves a List of delegation members from the KimRoleDao as appropriate.

Parameters:
daoActionToTake - An indicator for which KimRoleDao method to use for retrieving results.
delegationIds - The IDs of the delegations that the members belong to.
principalId - The principal ID of the principal delegation members; may get ignored depending on the RoleDaoAction value.
groupIds - The group IDs of the group delegation members; may get ignored depending on the RoleDaoAction value.
Returns:
A List of DelegateMemberBo objects based on the provided parameters.
Throws:
IllegalArgumentException - if daoActionToTake does not represent a delegation-member-list-related enumeration value.

getStoredDelegationPrincipalsForPrincipalIdAndDelegationIds

protected List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getStoredDelegationPrincipalsForPrincipalIdAndDelegationIds(Collection<String> delegationIds,
                                                                                                                                     String principalId)
Calls the KimRoleDao's "getDelegationPrincipalsForPrincipalIdAndDelegationIds" method and/or retrieves any corresponding members from the cache.


getDelegateMemberBo

protected org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo getDelegateMemberBo(String delegationMemberId)
Retrieves a DelegateMemberBo object by its ID. If the delegation member already exists in the cache, this method will return the cached version; otherwise, it will retrieve the uncached version from the database and then cache it before returning it.


getDelegationMemberBoListByMemberAndDelegationId

protected List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getDelegationMemberBoListByMemberAndDelegationId(String memberId,
                                                                                                                          String delegationId)
Retrieves a DelegateMemberBo List by (principal/group/role) member ID and delegation ID. If the List already exists in the cache, this method will return the cached one; otherwise, it will retrieve the uncached version from the database and then cache it before returning it.


getMember

protected Object getMember(String memberTypeCode,
                           String memberId)

getMemberName

protected String getMemberName(Object member)

getRoleBo

protected org.kuali.rice.kim.impl.role.RoleBo getRoleBo(String roleId)

getRoleBoLite

protected org.kuali.rice.kim.impl.role.RoleBoLite getRoleBoLite(String roleId)

getDelegationOfType

protected org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo getDelegationOfType(String roleId,
                                                                                     DelegationType delegationType)

getPrimaryDelegation

protected org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo getPrimaryDelegation(String roleId,
                                                                                      List<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> roleDelegates)

matchingMemberRecord

protected org.kuali.rice.kim.impl.role.RoleMemberBo matchingMemberRecord(List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers,
                                                                         String memberId,
                                                                         String memberTypeCode,
                                                                         Map<String,String> qualifier)

isDelegationPrimary

protected boolean isDelegationPrimary(DelegationType delegationType)

isDelegationSecondary

protected boolean isDelegationSecondary(DelegationType delegationType)

getRoleBoByName

protected org.kuali.rice.kim.impl.role.RoleBo getRoleBoByName(String namespaceCode,
                                                              String roleName)

getRoleBoLiteByName

protected org.kuali.rice.kim.impl.role.RoleBoLite getRoleBoLiteByName(String namespaceCode,
                                                                      String roleName)

doAnyMemberRecordsMatchByExactQualifier

protected List<RoleMember> doAnyMemberRecordsMatchByExactQualifier(RoleEbo role,
                                                                   String memberId,
                                                                   RoleServiceBase.RoleDaoAction daoActionToTake,
                                                                   Map<String,String> qualifier)

getRoleMembersByExactQualifierMatch

protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMembersByExactQualifierMatch(RoleEbo role,
                                                                                              String memberId,
                                                                                              RoleServiceBase.RoleDaoAction daoActionToTake,
                                                                                              Map<String,String> qualifier)

doAnyMemberRecordsMatch

protected RoleMember doAnyMemberRecordsMatch(List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers,
                                             String memberId,
                                             String memberTypeCode,
                                             Map<String,String> qualifier)

doesMemberMatch

protected boolean doesMemberMatch(org.kuali.rice.kim.impl.role.RoleMemberBo roleMember,
                                  String memberId,
                                  String memberTypeCode,
                                  Map<String,String> qualifier)

getRoleTypeService

protected RoleTypeService getRoleTypeService(String roleId)
Retrieves the role type service associated with the given role ID

Parameters:
roleId - the role ID to get the role type service for
Returns:
the Role Type Service

getRoleTypeServiceByName

protected RoleTypeService getRoleTypeServiceByName(String serviceName)
Retrieves the role type service for the given service name.

Parameters:
serviceName - the name of the service to retrieve
Returns:
the Role Type Service

getRoleTypeService

protected RoleTypeService getRoleTypeService(KimType typeInfo)

populateQualifiersForExactMatch

protected Map<String,String> populateQualifiersForExactMatch(Map<String,String> defaultQualification,
                                                             List<String> attributes)

getKimAttributeId

protected String getKimAttributeId(String attributeName)

getBusinessObjectService

protected BusinessObjectService getBusinessObjectService()

getLookupService

protected LookupService getLookupService()
Returns:
the lookupService

getIdentityService

protected IdentityService getIdentityService()

getGroupService

protected GroupService getGroupService()

getResponsibilityInternalService

protected ResponsibilityInternalService getResponsibilityInternalService()

getRoleDao

protected RoleDao getRoleDao()
Returns:
the roleDao

setRoleDao

public void setRoleDao(RoleDao roleDao)
Parameters:
roleDao - the roleDao to set

setCriteriaLookupService

public void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)

getCriteriaLookupService

public CriteriaLookupService getCriteriaLookupService()


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.