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

java.lang.Object
  extended by org.kuali.rice.kim.service.impl.RoleManagementServiceImpl
All Implemented Interfaces:
RoleManagementService, RoleService, RoleUpdateService, org.springframework.beans.factory.InitializingBean

public class RoleManagementServiceImpl
extends Object
implements RoleManagementService, org.springframework.beans.factory.InitializingBean

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
protected  Map<String,MaxAgeSoftReference<Collection<String>>> memberPrincipalIdsCache
           
protected  Map<String,MaxAgeSoftReference<Boolean>> principalHasRoleCache
           
protected  Map<String,MaxAgeSoftReference<KimRoleInfo>> roleByIdCache
           
protected  Map<String,MaxAgeSoftReference<KimRoleInfo>> roleByNameCache
           
protected  int roleCacheMaxAgeSeconds
           
protected  int roleCacheMaxSize
           
protected  Map<String,MaxAgeSoftReference<List<RoleMembershipInfo>>> roleMembersWithDelegationCache
           
protected  Map<String,MaxAgeSoftReference<List<AttributeSet>>> roleQualifiersForPrincipalCache
           
protected  Map<String,Boolean> shouldCacheRoleCache
           
 
Constructor Summary
RoleManagementServiceImpl()
           
 
Method Summary
protected  void addAttributesToKey(StringBuffer key, AttributeSet attributes)
           
protected  void addIdsToKey(StringBuffer key, List<String> idList)
           
protected  void addPrincipalHasRoleToCache(String key, boolean hasRole)
           
protected  void addRoleMemberPrincipalIdsToCache(String key, Collection<String> principalIds)
           
protected  void addRoleMembersWithDelegationToCache(String key, List<RoleMembershipInfo> members)
           
protected  void addRoleQualifiersForPrincipalToCache(String key, List<AttributeSet> qualifiers)
           
protected  void addRoleToCaches(KimRoleInfo role)
           
 void afterPropertiesSet()
           
 void applicationRoleMembershipChanged(String roleId)
           
 void assignGroupToRole(String groupId, String namespaceCode, String roleName, AttributeSet qualifications)
          Assigns the group with the given id to the role with the specified namespace code and name with the supplied set of qualifications.
 void assignPermissionToRole(String permissionId, String roleId)
          Assigns the given permission to the given role
 void assignPrincipalToRole(String principalId, String namespaceCode, String roleName, AttributeSet qualifications)
          Assigns the principal with the given id to the role with the specified namespace code and name with the supplied set of qualifications.
 void assignRoleToRole(String roleId, String namespaceCode, String roleName, AttributeSet qualifications)
          Assigns the role with the given id to the role with the specified namespace code and name with the supplied set of qualifications.
protected  List<String>[] filterRoleIdsByCachingAbility(List<String> roleIds)
          Splits the given List of role ids into two Lists, one with roles to cache, and one with roles not to cache
 List<DelegateMemberCompleteInfo> findDelegateMembersCompleteInfo(Map<String,String> fieldValues)
           
 List<RoleMembershipInfo> findRoleMembers(Map<String,String> fieldValues)
          Gets role member information based on the given search criteria.
 List<RoleMemberCompleteInfo> findRoleMembersCompleteInfo(Map<String,String> fieldValues)
           
 void flushDelegationCaches()
          Flush all of the delegation-related caches.
 void flushDelegationMemberCaches()
          Flush all of the delegation-member-related caches.
 void flushInternalDelegationCache()
          Flushes an internal delegation cache used by the base implementation to prevent repeated database I/O.
 void flushInternalDelegationMemberCache()
          Flushes an internal delegation member cache used by the base implementation to prevent repeated database I/O.
 void flushInternalRoleCache()
          Flushes an internal role cache used by the base implementation to prevent repeated database I/O.
 void flushInternalRoleMemberCache()
          Flushes an internal role member cache used by the base implementation to prevent repeated database I/O.
 void flushRoleCaches()
          Flush all of the role-related caches.
 void flushRoleMemberCaches()
          Flush all of the role-member-related caches.
 DelegateTypeInfo getDelegateTypeInfo(String roleId, String delegationTypeCode)
           
 DelegateTypeInfo getDelegateTypeInfoById(String delegationId)
           
 DelegateMemberCompleteInfo getDelegationMemberByDelegationAndMemberId(String delegationId, String memberId)
           
 DelegateMemberCompleteInfo getDelegationMemberById(String delegationMemberId)
           
 List<DelegateMemberCompleteInfo> getDelegationMembersByDelegationId(String delegationId)
          Gets delegation member information based on the given search criteria.
 List<RoleMembershipInfo> getFirstLevelRoleMembers(List<String> roleIds)
          Gets all direct members of the roles that have ids within the given list of role ids.
 List<String> getMemberParentRoleIds(String memberType, String memberId)
          This overridden method ...
 String getNextAvailableRoleId()
          Returns id available for a new role
protected  Boolean getPrincipalHasRoleCacheCache(String key)
           
 List<String> getPrincipalIdSubListWithRole(List<String> principalIds, String roleNamespaceCode, String roleName, AttributeSet qualification)
          Returns the subset of the given principal ID list which has the given role and qualification.
 KimRoleInfo getRole(String roleId)
          Get the KIM Role object with the given ID.
protected  KimRoleInfo getRoleByIdCache(String roleId)
           
 KimRoleInfo getRoleByName(String namespaceCode, String roleName)
          Get the KIM Role object with the unique combination of namespace, component, and role name.
protected  KimRoleInfo getRoleByNameCache(String key)
           
 String getRoleIdByName(String namespaceCode, String roleName)
          Return the Role ID for the given unique combination of namespace, component and role name.
 Collection<String> getRoleMemberPrincipalIds(String namespaceCode, String roleName, AttributeSet qualification)
          This method gets all the members, then traverses down into members of type role and group to obtain the nested principal ids
protected  Collection<String> getRoleMemberPrincipalIdsCache(String key)
           
 List<RoleResponsibilityActionInfo> getRoleMemberResponsibilityActionInfo(String roleMemberId)
           
 List<RoleMembershipInfo> getRoleMembers(List<String> roleIds, AttributeSet qualification)
          Get all the role members (groups and principals) associated with the given list of roles where their role membership/assignment matches the given qualification.
protected  List<RoleMembershipInfo> getRoleMembersWithDelegationCache(String key)
           
 List<AttributeSet> getRoleQualifiersForPrincipal(String principalId, List<String> roleIds, AttributeSet qualification)
          Returns a list of role qualifiers that the given principal has without taking into consideration that the principal may be a member via an assigned group or role.
 List<AttributeSet> getRoleQualifiersForPrincipal(String principalId, String namespaceCode, String roleName, AttributeSet qualification)
          Returns a list of role qualifiers that the given principal has without taking into consideration that the principal may be a member via an assigned group or role.
protected  List<AttributeSet> getRoleQualifiersForPrincipalCache(String key)
           
 List<AttributeSet> getRoleQualifiersForPrincipalIncludingNested(String principalId, List<String> roleIds, AttributeSet qualification)
          Returns a list of role qualifiers that the given principal.
 List<AttributeSet> getRoleQualifiersForPrincipalIncludingNested(String principalId, String namespaceCode, String roleName, AttributeSet qualification)
          Returns a list of role qualifiers that the given principal.
 List<RoleResponsibilityInfo> getRoleResponsibilities(String roleId)
           
 List<KimRoleInfo> getRoles(List<String> roleIds)
          Get the KIM Role objects for the role IDs in the given List.
 RoleService getRoleService()
           
 List<? extends Role> getRolesSearchResults(Map<String,String> fieldValues)
          This method get search results for role lookup
protected  KimRoleTypeService getRoleTypeService(KimTypeInfo typeInfo)
          Retrieves a role type from the given type info
protected  KimRoleTypeService getRoleTypeService(String roleId)
          Retrieves the role type service associated with the given role ID
 RoleUpdateService getRoleUpdateService()
           
 KimTypeInfoService getTypeInfoService()
           
 void groupInactivated(String groupId)
          Notifies the role service that the group with the given id has been inactivated.
 boolean isRoleActive(String roleId)
          Checks whether the role with the given role ID is active.
protected  void logPrincipalHasRoleCheck(String principalId, List<String> roleIds, AttributeSet roleQualifiers)
           
 List<KimRoleInfo> lookupRoles(Map<String,String> searchCriteria)
          This overridden method looks up roles based on criteria.
 boolean principalHasRole(String principalId, List<String> roleIds, AttributeSet qualification)
          Returns whether the given principal has any of the passed role IDs with the given qualification.
 void principalInactivated(String principalId)
          Notifies all of a principal's roles and role types that the principal has been inactivated.
 void removeCacheEntries(String roleId, String principalId)
          Remove all cache entries for the given roleId and principalId combination.
 void removeGroupFromRole(String groupId, String namespaceCode, String roleName, AttributeSet qualifications)
          Remove the group with the given id and qualifications from the role with the specified namespace code and role name.
 void removePrincipalFromRole(String principalId, String namespaceCode, String roleName, AttributeSet qualifications)
          Remove the principal with the given id and qualifications from the role with the specified namespace code and role name.
 void removeRoleFromRole(String roleId, String namespaceCode, String roleName, AttributeSet qualifications)
          Remove the group with the given id and qualifications from the role with the specified namespace code and role name.
 void roleInactivated(String roleId)
          Notifies the role service that the role with the given id has been inactivated.
 void saveDelegationMemberForRole(String delegationMemberId, String roleMemberId, String memberId, String memberTypeCode, String delegationTypeCode, String roleId, AttributeSet qualifications, Date activeFromDate, Date activeToDate)
          Assigns the member with the given id as a delegation member to the role with the specified namespace code and name with the supplied set of qualifications.
 void saveRole(String roleId, String roleName, String roleDescription, boolean active, String kimTypeId, String namespaceCode)
          Creates or updates role with given attributes
 RoleMemberCompleteInfo saveRoleMemberForRole(String roleMemberId, String memberId, String memberTypeCode, String roleId, AttributeSet qualifications, Date activeFromDate, Date activeToDate)
          Assigns the role with the given id to the role with the specified namespace code and name with the supplied set of qualifications.
 void saveRoleRspActions(String roleResponsibilityActionId, String roleId, String roleResponsibilityId, String roleMemberId, String actionTypeCode, String actionPolicyCode, Integer priorityNumber, Boolean forceAction)
           
 void setRoleCacheMaxAgeSeconds(int roleCacheMaxAge)
           
 void setRoleCacheMaxSize(int roleCacheMaxSize)
           
protected  boolean shouldCacheRole(String roleId)
          Determines if the role with the given id will be cached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

roleCacheMaxSize

protected int roleCacheMaxSize

roleCacheMaxAgeSeconds

protected int roleCacheMaxAgeSeconds

roleByIdCache

protected Map<String,MaxAgeSoftReference<KimRoleInfo>> roleByIdCache

roleByNameCache

protected Map<String,MaxAgeSoftReference<KimRoleInfo>> roleByNameCache

roleMembersWithDelegationCache

protected Map<String,MaxAgeSoftReference<List<RoleMembershipInfo>>> roleMembersWithDelegationCache

roleQualifiersForPrincipalCache

protected Map<String,MaxAgeSoftReference<List<AttributeSet>>> roleQualifiersForPrincipalCache

principalHasRoleCache

protected Map<String,MaxAgeSoftReference<Boolean>> principalHasRoleCache

memberPrincipalIdsCache

protected Map<String,MaxAgeSoftReference<Collection<String>>> memberPrincipalIdsCache

shouldCacheRoleCache

protected Map<String,Boolean> shouldCacheRoleCache
Constructor Detail

RoleManagementServiceImpl

public RoleManagementServiceImpl()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

flushRoleCaches

public void flushRoleCaches()
Description copied from interface: RoleManagementService
Flush all of the role-related caches.

Specified by:
flushRoleCaches in interface RoleManagementService

flushRoleMemberCaches

public void flushRoleMemberCaches()
Description copied from interface: RoleManagementService
Flush all of the role-member-related caches.

Specified by:
flushRoleMemberCaches in interface RoleManagementService

flushDelegationCaches

public void flushDelegationCaches()
Description copied from interface: RoleManagementService
Flush all of the delegation-related caches.

Specified by:
flushDelegationCaches in interface RoleManagementService

flushDelegationMemberCaches

public void flushDelegationMemberCaches()
Description copied from interface: RoleManagementService
Flush all of the delegation-member-related caches.

Specified by:
flushDelegationMemberCaches in interface RoleManagementService

getRoleByIdCache

protected KimRoleInfo getRoleByIdCache(String roleId)

getRoleByNameCache

protected KimRoleInfo getRoleByNameCache(String key)

getRoleMembersWithDelegationCache

protected List<RoleMembershipInfo> getRoleMembersWithDelegationCache(String key)

getRoleQualifiersForPrincipalCache

protected List<AttributeSet> getRoleQualifiersForPrincipalCache(String key)

getPrincipalHasRoleCacheCache

protected Boolean getPrincipalHasRoleCacheCache(String key)

addRoleToCaches

protected void addRoleToCaches(KimRoleInfo role)

addRoleMembersWithDelegationToCache

protected void addRoleMembersWithDelegationToCache(String key,
                                                   List<RoleMembershipInfo> members)

addRoleQualifiersForPrincipalToCache

protected void addRoleQualifiersForPrincipalToCache(String key,
                                                    List<AttributeSet> qualifiers)

addPrincipalHasRoleToCache

protected void addPrincipalHasRoleToCache(String key,
                                          boolean hasRole)

getRoleMemberPrincipalIdsCache

protected Collection<String> getRoleMemberPrincipalIdsCache(String key)

addRoleMemberPrincipalIdsToCache

protected void addRoleMemberPrincipalIdsToCache(String key,
                                                Collection<String> principalIds)

getRoleMemberPrincipalIds

public Collection<String> getRoleMemberPrincipalIds(String namespaceCode,
                                                    String roleName,
                                                    AttributeSet qualification)
Description copied from interface: RoleService
This method gets all the members, then traverses down into members of type role and group to obtain the nested principal ids

Specified by:
getRoleMemberPrincipalIds in interface RoleService
Returns:
list of member principal ids
See Also:
RoleService.getRoleMemberPrincipalIds(java.lang.String, java.lang.String, org.kuali.rice.core.xml.dto.AttributeSet)

getRole

public KimRoleInfo getRole(String roleId)
Description copied from interface: RoleService
Get the KIM Role object with the given ID. If the roleId is blank, this method returns null.

Specified by:
getRole in interface RoleService
See Also:
RoleService.getRole(java.lang.String)

getRoleByName

public KimRoleInfo getRoleByName(String namespaceCode,
                                 String roleName)
Description copied from interface: RoleService
Get the KIM Role object with the unique combination of namespace, component, and role name. If any parameter is blank, this method returns null.

Specified by:
getRoleByName in interface RoleService
See Also:
RoleService.getRoleByName(java.lang.String, java.lang.String)

getRoleIdByName

public String getRoleIdByName(String namespaceCode,
                              String roleName)
Description copied from interface: RoleService
Return the Role ID for the given unique combination of namespace, component and role name.

Specified by:
getRoleIdByName in interface RoleService
See Also:
RoleService.getRoleIdByName(java.lang.String, java.lang.String)

getRoles

public List<KimRoleInfo> getRoles(List<String> roleIds)
Description copied from interface: RoleService
Get the KIM Role objects for the role IDs in the given List.

Specified by:
getRoles in interface RoleService
See Also:
RoleService.getRoles(java.util.List)

addIdsToKey

protected void addIdsToKey(StringBuffer key,
                           List<String> idList)

addAttributesToKey

protected void addAttributesToKey(StringBuffer key,
                                  AttributeSet attributes)

getRoleMembers

public List<RoleMembershipInfo> getRoleMembers(List<String> roleIds,
                                               AttributeSet qualification)
Description copied from interface: RoleService
Get all the role members (groups and principals) associated with the given list of roles where their role membership/assignment matches the given qualification. The return object will have each membership relationship along with the delegations

Specified by:
getRoleMembers in interface RoleService
See Also:
RoleService.getRoleMembers(java.util.List, org.kuali.rice.core.xml.dto.AttributeSet)

getRoleQualifiersForPrincipal

public List<AttributeSet> getRoleQualifiersForPrincipal(String principalId,
                                                        List<String> roleIds,
                                                        AttributeSet qualification)
Description copied from interface: RoleService
Returns a list of role qualifiers that the given principal has without taking into consideration that the principal may be a member via an assigned group or role. Use in situations where you are only interested in the qualifiers that are directly assigned to the principal.

Specified by:
getRoleQualifiersForPrincipal in interface RoleService
See Also:
RoleService.getRoleQualifiersForPrincipal(java.lang.String, java.util.List, org.kuali.rice.core.xml.dto.AttributeSet)

getRoleQualifiersForPrincipal

public List<AttributeSet> getRoleQualifiersForPrincipal(String principalId,
                                                        String namespaceCode,
                                                        String roleName,
                                                        AttributeSet qualification)
Description copied from interface: RoleService
Returns a list of role qualifiers that the given principal has without taking into consideration that the principal may be a member via an assigned group or role. Use in situations where you are only interested in the qualifiers that are directly assigned to the principal.

Specified by:
getRoleQualifiersForPrincipal in interface RoleService
See Also:
RoleService.getRoleQualifiersForPrincipal(java.lang.String, java.lang.String, java.lang.String, org.kuali.rice.core.xml.dto.AttributeSet)

isRoleActive

public boolean isRoleActive(String roleId)
Description copied from interface: RoleService
Checks whether the role with the given role ID is active.

Specified by:
isRoleActive in interface RoleService
Returns:

principalHasRole

public boolean principalHasRole(String principalId,
                                List<String> roleIds,
                                AttributeSet qualification)
Description copied from interface: RoleService
Returns whether the given principal has any of the passed role IDs with the given qualification.

Specified by:
principalHasRole in interface RoleService

shouldCacheRole

protected boolean shouldCacheRole(String roleId)
Determines if the role with the given id will be cached

Parameters:
roleId - the role id of the role to determine caching on
Returns:
true if the role should be cached, false otherwise

filterRoleIdsByCachingAbility

protected List<String>[] filterRoleIdsByCachingAbility(List<String> roleIds)
Splits the given List of role ids into two Lists, one with roles to cache, and one with roles not to cache

Parameters:
roleIds - the List of role ids to split
Returns:
an array of two Lists of role ids - the first, roles which can be cached and the second, roles which should not be cached

getRoleTypeService

protected KimRoleTypeService 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

getRoleTypeService

protected KimRoleTypeService getRoleTypeService(KimTypeInfo typeInfo)
Retrieves a role type from the given type info

Parameters:
typeInfo -
Returns:

getPrincipalIdSubListWithRole

public List<String> getPrincipalIdSubListWithRole(List<String> principalIds,
                                                  String roleNamespaceCode,
                                                  String roleName,
                                                  AttributeSet qualification)
Description copied from interface: RoleService
Returns the subset of the given principal ID list which has the given role and qualification. This is designed to be used by lookups of people by their roles.

Specified by:
getPrincipalIdSubListWithRole in interface RoleService
See Also:
RoleService.getPrincipalIdSubListWithRole(java.util.List, java.lang.String, java.lang.String, org.kuali.rice.core.xml.dto.AttributeSet)

removeCacheEntries

public void removeCacheEntries(String roleId,
                               String principalId)
Description copied from interface: RoleManagementService
Remove all cache entries for the given roleId and principalId combination.

Specified by:
removeCacheEntries in interface RoleManagementService

getRoleQualifiersForPrincipalIncludingNested

public List<AttributeSet> getRoleQualifiersForPrincipalIncludingNested(String principalId,
                                                                       List<String> roleIds,
                                                                       AttributeSet qualification)
Description copied from interface: RoleService
Returns a list of role qualifiers that the given principal. If the principal's membership is via a group or role, that group or role's qualifier on the given role is returned.

Specified by:
getRoleQualifiersForPrincipalIncludingNested in interface RoleService
See Also:
RoleService.getRoleQualifiersForPrincipalIncludingNested(java.lang.String, java.util.List, org.kuali.rice.core.xml.dto.AttributeSet)

getRoleQualifiersForPrincipalIncludingNested

public List<AttributeSet> getRoleQualifiersForPrincipalIncludingNested(String principalId,
                                                                       String namespaceCode,
                                                                       String roleName,
                                                                       AttributeSet qualification)
Description copied from interface: RoleService
Returns a list of role qualifiers that the given principal. If the principal's membership is via a group or role, that group or role's qualifier on the given role is returned.

Specified by:
getRoleQualifiersForPrincipalIncludingNested in interface RoleService
See Also:
RoleService.getRoleQualifiersForPrincipalIncludingNested(java.lang.String, java.lang.String, java.lang.String, org.kuali.rice.core.xml.dto.AttributeSet)

assignGroupToRole

public void assignGroupToRole(String groupId,
                              String namespaceCode,
                              String roleName,
                              AttributeSet qualifications)
Description copied from interface: RoleUpdateService
Assigns the group with the given id to the role with the specified namespace code and name with the supplied set of qualifications.

Specified by:
assignGroupToRole in interface RoleUpdateService

assignPrincipalToRole

public void assignPrincipalToRole(String principalId,
                                  String namespaceCode,
                                  String roleName,
                                  AttributeSet qualifications)
Description copied from interface: RoleUpdateService
Assigns the principal with the given id to the role with the specified namespace code and name with the supplied set of qualifications.

Specified by:
assignPrincipalToRole in interface RoleUpdateService

removeGroupFromRole

public void removeGroupFromRole(String groupId,
                                String namespaceCode,
                                String roleName,
                                AttributeSet qualifications)
Description copied from interface: RoleUpdateService
Remove the group with the given id and qualifications from the role with the specified namespace code and role name.

Specified by:
removeGroupFromRole in interface RoleUpdateService

removePrincipalFromRole

public void removePrincipalFromRole(String principalId,
                                    String namespaceCode,
                                    String roleName,
                                    AttributeSet qualifications)
Description copied from interface: RoleUpdateService
Remove the principal with the given id and qualifications from the role with the specified namespace code and role name.

Specified by:
removePrincipalFromRole in interface RoleUpdateService

getRolesSearchResults

public List<? extends Role> getRolesSearchResults(Map<String,String> fieldValues)
Description copied from interface: RoleService
This method get search results for role lookup

Specified by:
getRolesSearchResults in interface RoleService
See Also:
RoleService.getRolesSearchResults(java.util.Map)

logPrincipalHasRoleCheck

protected void logPrincipalHasRoleCheck(String principalId,
                                        List<String> roleIds,
                                        AttributeSet roleQualifiers)

principalInactivated

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

Specified by:
principalInactivated in interface RoleService
See Also:
RoleService.principalInactivated(java.lang.String)

roleInactivated

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

Specified by:
roleInactivated in interface RoleService
See Also:
RoleService.roleInactivated(java.lang.String)

groupInactivated

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

Specified by:
groupInactivated in interface RoleService
See Also:
RoleService.roleInactivated(java.lang.String)

getFirstLevelRoleMembers

public List<RoleMembershipInfo> getFirstLevelRoleMembers(List<String> roleIds)
Description copied from interface: RoleService
Gets all direct members of the roles that have ids within the given list of role ids. This method does not recurse into any nested roles.

The resulting List of role membership will contain membership for all the roles with the specified ids. The list is not guaranteed to be in any particular order and may have membership info for the different roles interleaved with each other.

Specified by:
getFirstLevelRoleMembers in interface RoleService

findRoleMembers

public List<RoleMembershipInfo> findRoleMembers(Map<String,String> fieldValues)
Description copied from interface: RoleService
Gets role member information based on the given search criteria. The map of criteria contains attributes of RoleMembershipInfo as it's key and the values to search on as the value.

Specified by:
findRoleMembers in interface RoleService

assignRoleToRole

public void assignRoleToRole(String roleId,
                             String namespaceCode,
                             String roleName,
                             AttributeSet qualifications)
Description copied from interface: RoleUpdateService
Assigns the role with the given id to the role with the specified namespace code and name with the supplied set of qualifications.

Specified by:
assignRoleToRole in interface RoleUpdateService

saveDelegationMemberForRole

public void saveDelegationMemberForRole(String delegationMemberId,
                                        String roleMemberId,
                                        String memberId,
                                        String memberTypeCode,
                                        String delegationTypeCode,
                                        String roleId,
                                        AttributeSet qualifications,
                                        Date activeFromDate,
                                        Date activeToDate)
                                 throws UnsupportedOperationException
Description copied from interface: RoleUpdateService
Assigns the member with the given id as a delegation member to the role with the specified namespace code and name with the supplied set of qualifications.

Specified by:
saveDelegationMemberForRole in interface RoleUpdateService
Throws:
UnsupportedOperationException
See Also:
org.kuali.rice.kim.service.RoleUpdateService#assignRoleAsDelegationMemberToRole(java.lang.String, java.lang.String, java.lang.String, org.kuali.rice.core.xml.dto.AttributeSet)

saveRoleMemberForRole

public RoleMemberCompleteInfo saveRoleMemberForRole(String roleMemberId,
                                                    String memberId,
                                                    String memberTypeCode,
                                                    String roleId,
                                                    AttributeSet qualifications,
                                                    Date activeFromDate,
                                                    Date activeToDate)
                                             throws UnsupportedOperationException
Description copied from interface: RoleUpdateService
Assigns the role with the given id to the role with the specified namespace code and name with the supplied set of qualifications.

Specified by:
saveRoleMemberForRole in interface RoleUpdateService
Throws:
UnsupportedOperationException

removeRoleFromRole

public void removeRoleFromRole(String roleId,
                               String namespaceCode,
                               String roleName,
                               AttributeSet qualifications)
Description copied from interface: RoleUpdateService
Remove the group with the given id and qualifications from the role with the specified namespace code and role name.

Specified by:
removeRoleFromRole in interface RoleUpdateService

findRoleMembersCompleteInfo

public List<RoleMemberCompleteInfo> findRoleMembersCompleteInfo(Map<String,String> fieldValues)
Specified by:
findRoleMembersCompleteInfo in interface RoleService

findDelegateMembersCompleteInfo

public List<DelegateMemberCompleteInfo> findDelegateMembersCompleteInfo(Map<String,String> fieldValues)
Specified by:
findDelegateMembersCompleteInfo in interface RoleService

getDelegationMembersByDelegationId

public List<DelegateMemberCompleteInfo> getDelegationMembersByDelegationId(String delegationId)
Description copied from interface: RoleService
Gets delegation member information based on the given search criteria. The map of criteria contains attributes of DelegateInfo as it's key and the values to search on as the value.

Specified by:
getDelegationMembersByDelegationId in interface RoleService

getDelegationMemberByDelegationAndMemberId

public DelegateMemberCompleteInfo getDelegationMemberByDelegationAndMemberId(String delegationId,
                                                                             String memberId)
Specified by:
getDelegationMemberByDelegationAndMemberId in interface RoleService

getDelegationMemberById

public DelegateMemberCompleteInfo getDelegationMemberById(String delegationMemberId)
Specified by:
getDelegationMemberById in interface RoleService

getRoleMemberResponsibilityActionInfo

public List<RoleResponsibilityActionInfo> getRoleMemberResponsibilityActionInfo(String roleMemberId)
Specified by:
getRoleMemberResponsibilityActionInfo in interface RoleService

getDelegateTypeInfo

public DelegateTypeInfo getDelegateTypeInfo(String roleId,
                                            String delegationTypeCode)
Specified by:
getDelegateTypeInfo in interface RoleService

getDelegateTypeInfoById

public DelegateTypeInfo getDelegateTypeInfoById(String delegationId)
Specified by:
getDelegateTypeInfoById in interface RoleService

saveRoleRspActions

public void saveRoleRspActions(String roleResponsibilityActionId,
                               String roleId,
                               String roleResponsibilityId,
                               String roleMemberId,
                               String actionTypeCode,
                               String actionPolicyCode,
                               Integer priorityNumber,
                               Boolean forceAction)
Specified by:
saveRoleRspActions in interface RoleUpdateService

getRoleResponsibilities

public List<RoleResponsibilityInfo> getRoleResponsibilities(String roleId)
Specified by:
getRoleResponsibilities in interface RoleService

applicationRoleMembershipChanged

public void applicationRoleMembershipChanged(String roleId)
Specified by:
applicationRoleMembershipChanged in interface RoleService

getRoleService

public RoleService getRoleService()

getTypeInfoService

public KimTypeInfoService getTypeInfoService()

getRoleUpdateService

public RoleUpdateService getRoleUpdateService()

setRoleCacheMaxSize

public void setRoleCacheMaxSize(int roleCacheMaxSize)

setRoleCacheMaxAgeSeconds

public void setRoleCacheMaxAgeSeconds(int roleCacheMaxAge)

lookupRoles

public List<KimRoleInfo> lookupRoles(Map<String,String> searchCriteria)
This overridden method looks up roles based on criteria. If you want to return all roles pass in an empty map.

Specified by:
lookupRoles in interface RoleService
See Also:
RoleService.lookupRoles(java.util.Map)

flushInternalRoleCache

public void flushInternalRoleCache()
Description copied from interface: RoleService
Flushes an internal role cache used by the base implementation to prevent repeated database I/O.

Specified by:
flushInternalRoleCache in interface RoleService

flushInternalRoleMemberCache

public void flushInternalRoleMemberCache()
Description copied from interface: RoleService
Flushes an internal role member cache used by the base implementation to prevent repeated database I/O.

Specified by:
flushInternalRoleMemberCache in interface RoleService

flushInternalDelegationCache

public void flushInternalDelegationCache()
Description copied from interface: RoleService
Flushes an internal delegation cache used by the base implementation to prevent repeated database I/O.

Specified by:
flushInternalDelegationCache in interface RoleService

flushInternalDelegationMemberCache

public void flushInternalDelegationMemberCache()
Description copied from interface: RoleService
Flushes an internal delegation member cache used by the base implementation to prevent repeated database I/O.

Specified by:
flushInternalDelegationMemberCache in interface RoleService

assignPermissionToRole

public void assignPermissionToRole(String permissionId,
                                   String roleId)
                            throws UnsupportedOperationException
Description copied from interface: RoleUpdateService
Assigns the given permission to the given role

Specified by:
assignPermissionToRole in interface RoleUpdateService
Throws:
UnsupportedOperationException

getNextAvailableRoleId

public String getNextAvailableRoleId()
                              throws UnsupportedOperationException
Description copied from interface: RoleUpdateService
Returns id available for a new role

Specified by:
getNextAvailableRoleId in interface RoleUpdateService
Throws:
UnsupportedOperationException

saveRole

public void saveRole(String roleId,
                     String roleName,
                     String roleDescription,
                     boolean active,
                     String kimTypeId,
                     String namespaceCode)
              throws UnsupportedOperationException
Description copied from interface: RoleUpdateService
Creates or updates role with given attributes

Specified by:
saveRole in interface RoleUpdateService
Throws:
UnsupportedOperationException

getMemberParentRoleIds

public List<String> getMemberParentRoleIds(String memberType,
                                           String memberId)
This overridden method ...

Specified by:
getMemberParentRoleIds in interface RoleService
See Also:
RoleService.getMemberParentRoleIds(java.lang.String, java.lang.String)


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