|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kim.impl.role.RoleServiceImpl
public class RoleServiceImpl
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. |
Constructor Summary | |
---|---|
RoleServiceImpl()
|
Method Summary | |
---|---|
protected void |
addDelegationMemberAttributeData(org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo delegationMember,
Map<String,String> qualifier,
String kimTypeId)
|
protected void |
addMemberAttributeData(org.kuali.rice.kim.impl.role.RoleMemberBo roleMember,
Map<String,String> qualifier,
String kimTypeId)
|
protected List<RoleMembership.Builder> |
applyDelegationsToRoleMembers(List<RoleMembership> roleMemberships,
Collection<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> delegations,
Map<String,String> qualification)
Checks each of the result records to determine if there are potentially applicable delegation members for that role membership. |
RoleMember |
assignGroupToRole(String groupId,
String namespaceCode,
String roleName,
Map<String,String> qualifier)
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 |
RoleMember |
assignPrincipalToRole(String principalId,
String namespaceCode,
String roleName,
Map<String,String> qualifier)
Assigns the principal with the given id to the role with the specified namespace code and name with the supplied set of qualifications. |
RoleMember |
assignRoleToRole(String roleId,
String namespaceCode,
String roleName,
Map<String,String> qualifier)
Assigns the role with the given id to the role with the specified namespace code and name with the supplied set of qualifications. |
protected boolean |
checkForCircularRoleMembership(String newMemberId,
org.kuali.rice.kim.impl.role.RoleBo roleBo)
This method tests to see if assigning a roleBo to another roleBo will create a circular reference. |
DelegateMember |
createDelegateMember(DelegateMember delegateMember)
Creates a new DelegateMember. |
DelegateType |
createDelegateType(DelegateType delegateType)
Creates a new DelegateType. |
Role |
createRole(Role role)
This will create a Role exactly like the role passed in. |
RoleMember |
createRoleMember(RoleMember roleMember)
Creates a new RoleMember. |
RoleResponsibilityAction |
createRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction)
Creates a new RoleResponsibilityAction. |
protected RoleMember |
doAnyMemberRecordsMatch(List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers,
String memberId,
String memberTypeCode,
Map<String,String> qualifier)
|
protected List<RoleMember> |
doAnyMemberRecordsMatchByExactQualifier(org.kuali.rice.kim.impl.role.RoleBo 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)
|
DelegateMemberQueryResults |
findDelegateMembers(QueryByCriteria queryByCriteria)
Gets role members based on the given search criteria. |
protected RoleMember |
findRoleMember(String roleMemberId)
|
RoleMemberQueryResults |
findRoleMembers(QueryByCriteria queryByCriteria)
Gets role members based on the given search criteria. |
RoleMembershipQueryResults |
findRoleMemberships(QueryByCriteria queryByCriteria)
Gets role member information based on the given search criteria. |
RoleQueryResults |
findRoles(QueryByCriteria queryByCriteria)
This method gets search results for role lookup |
protected BusinessObjectService |
getBusinessObjectService()
|
CriteriaLookupService |
getCriteriaLookupService()
|
protected org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo |
getDelegateMemberBo(String delegationMemberId)
Retrieves a DelegateMemberBo object by its ID. |
DelegateType |
getDelegateTypeByDelegationId(String delegationId)
Gets a DelegateType for the given delegation id. |
DelegateType |
getDelegateTypeByRoleIdAndDelegateTypeCode(String roleId,
DelegationType delegationType)
Gets a DelegateType for the given role id and delegation type. |
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. |
DelegateMember |
getDelegationMemberByDelegationAndMemberId(String delegationId,
String memberId)
Gets the delegate member for the given delegationId and memberId. |
DelegateMember |
getDelegationMemberById(String delegationMemberId)
Gets the delegate member with the given delegation member id. |
List<DelegateMember> |
getDelegationMembersByDelegationId(String delegationId)
Gets the delegate members for the given delegation. |
protected org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo |
getDelegationOfType(String roleId,
DelegationType delegationType)
|
protected DelegationTypeService |
getDelegationTypeService(String delegationId)
|
List<RoleMembership> |
getFirstLevelRoleMembers(List<String> roleIds)
Gets all direct members of the roles that have ids within the given list of role ids. |
protected GroupService |
getGroupService()
|
protected IdentityService |
getIdentityService()
|
protected String |
getKimAttributeId(String attributeName)
|
protected org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo |
getKimDelegationImpl(String delegationId)
Retrieves a KimDelegationImpl object by its ID. |
protected org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo |
getKimDelegationMemberImplByDelegationAndId(String delegationId,
String delegationMemberId)
Retrieves a KimDelegationMemberImpl object by its ID and the ID of the delegation it belongs to. |
protected LookupService |
getLookupService()
|
protected Object |
getMember(String memberTypeCode,
String memberId)
|
protected String |
getMemberName(Object member)
|
List<String> |
getMemberParentRoleIds(String memberType,
String memberId)
Gets a list of Roles that the given member belongs to. |
protected Collection<RoleMembership> |
getNestedRoleMembers(Map<String,String> qualification,
RoleMembership rm,
Set<String> foundRoleTypeMembers)
|
List<Map<String,String>> |
getNestedRoleQualifersForPrincipalByNamespaceAndRolename(String principalId,
String namespaceCode,
String roleName,
Map<String,String> qualification)
Returns a list of role qualifiers that the given principal. |
List<Map<String,String>> |
getNestedRoleQualifiersForPrincipalByRoleIds(String principalId,
List<String> roleIds,
Map<String,String> qualification)
Returns a list of role qualifiers that the given principal. |
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)
|
List<String> |
getPrincipalIdSubListWithRole(List<String> principalIds,
String roleNamespaceCode,
String roleName,
Map<String,String> qualification)
Returns the subset of the given principal ID list which has the given role and qualification. |
protected RoleService |
getProxiedRoleService()
This gets the proxied version of the role service which will go through Spring's caching mechanism for method calls rather than skipping it when methods are called directly. |
protected ResponsibilityInternalService |
getResponsibilityInternalService()
|
Role |
getRole(String roleId)
Get the KIM Role object with the given ID. |
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 Map<String,org.kuali.rice.kim.impl.role.RoleBoLite> |
getRoleBoLiteMap(Collection<String> roleIds)
|
protected Map<String,org.kuali.rice.kim.impl.role.RoleBo> |
getRoleBoMap(Collection<String> roleIds)
|
Role |
getRoleByNamespaceCodeAndName(String namespaceCode,
String roleName)
Get the KIM Role object with the unique combination of namespace, component, and role name. |
protected RoleDao |
getRoleDao()
|
String |
getRoleIdByNamespaceCodeAndName(String namespaceCode,
String roleName)
Return the Role ID for the given unique combination of namespace, component and role name. |
protected boolean |
getRoleIdToMembershipMap(Map<String,List<RoleMembership>> roleIdToMembershipMap,
List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers)
Helper method used by principalHasRole to build the role ID -> list of members map. |
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. |
Collection<String> |
getRoleMemberPrincipalIds(String namespaceCode,
String roleName,
Map<String,String> qualification)
This method gets all the members, then traverses down into members of type role and group to obtain the nested principal ids |
List<RoleResponsibilityAction> |
getRoleMemberResponsibilityActions(String roleMemberId)
Gets a list of RoleResponsibilityActions for the given role member id. |
List<RoleMembership> |
getRoleMembers(List<String> roleIds,
Map<String,String> 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<RoleMembership> |
getRoleMembers(List<String> roleIds,
Map<String,String> qualification,
boolean followDelegations,
Set<String> foundRoleTypeMembers)
|
protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> |
getRoleMembersByExactQualifierMatch(org.kuali.rice.kim.impl.role.RoleBo role,
String memberId,
RoleServiceBase.RoleDaoAction daoActionToTake,
Map<String,String> qualifier)
|
List<Map<String,String>> |
getRoleQualifersForPrincipalByNamespaceAndRolename(String principalId,
String namespaceCode,
String roleName,
Map<String,String> 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<Map<String,String>> |
getRoleQualifersForPrincipalByRoleIds(String principalId,
List<String> roleIds,
Map<String,String> 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<RoleResponsibility> |
getRoleResponsibilities(String roleId)
Gets a list of role reponsibilities for the given role id. |
List<Role> |
getRoles(List<String> roleIds)
Get the KIM Role objects for the role IDs in the given List. |
Set<String> |
getRoleTypeRoleMemberIds(String roleId)
Gets a list of Roles Ids that are a member of the given roleId, including nested membership. |
protected RoleTypeService |
getRoleTypeService(KimType typeInfo)
|
protected RoleTypeService |
getRoleTypeService(String roleId)
Retrieves the role type service associated with the given role ID |
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. |
protected boolean |
isDelegationPrimary(DelegationType delegationType)
|
protected boolean |
isDelegationSecondary(DelegationType delegationType)
|
boolean |
isDerivedRole(String roleId)
Determines if a role with a provided id is a derived role |
boolean |
isDerivedRoleType(RoleTypeService service)
|
protected boolean |
isDerivedRoleType(String roleTypeId,
RoleTypeService service)
|
boolean |
isDynamicRoleMembership(String roleId)
Determines if a role with a provided id is a uses dynamic role memberships |
boolean |
isRoleActive(String roleId)
Checks whether the role with the given role ID is active. |
protected void |
linkDelegateToRoleMembership(org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo delegation,
DelegateMember.Builder delegateMemberBuilder,
RoleMembership.Builder roleMembershipBuilder)
|
protected void |
logPrincipalHasRoleCheck(String principalId,
List<String> roleIds,
Map<String,String> roleQualifiers)
|
protected boolean |
matchesOnDelegation(Set<String> allRoleIds,
String principalId,
List<String> principalGroupIds,
Map<String,String> qualification)
Support method for principalHasRole. |
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)
|
boolean |
principalHasRole(String principalId,
List<String> roleIds,
Map<String,String> qualification)
Returns whether the given principal has any of the passed role IDs with the given qualification. |
boolean |
principalHasRole(String principalId,
List<String> roleIds,
Map<String,String> qualification,
boolean checkDelegations)
Returns whether the given principal has any of the passed role IDs with the given qualification. |
void |
removeDelegateMembers(List<DelegateMember> delegateMembers)
Removes existing DelegateMembers. |
void |
removeGroupFromRole(String groupId,
String namespaceCode,
String roleName,
Map<String,String> qualifier)
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,
Map<String,String> qualifier)
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,
Map<String,String> qualifier)
Remove the group with the given id and qualifications from the role with the specified namespace code and role name. |
protected void |
resolveDelegationMemberRoles(List<RoleMembership.Builder> membershipBuilders,
Map<String,String> qualification,
Set<String> foundRoleTypeMembers)
Once the delegations for a RoleMembershipInfo object have been determined, any "role" member types need to be resolved into groups and principals so that further KIM requests are not needed. |
void |
revokePermissionFromRole(String permissionId,
String roleId)
Removes the given permission to the given role |
void |
setCacheManager(org.springframework.cache.CacheManager cacheManager)
Sets the cache manager which this service implementation can for internal caching. |
void |
setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
|
void |
setRoleDao(RoleDao roleDao)
|
DelegateMember |
updateDelegateMember(DelegateMember delegateMember)
Updates the given delegateMember to the values in the passed in delegateMember |
DelegateType |
updateDelegateType(DelegateType delegateType)
Updates the given DelegateType to the values in the passed in delegateType |
Role |
updateRole(Role role)
This will update a Role . |
RoleMember |
updateRoleMember(RoleMember roleMember)
Updates the given roleMember to the values in the passed in roleMember |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RoleServiceImpl()
Method Detail |
---|
public Role createRole(Role role) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
Role
exactly like the role passed in.
createRole
in interface RoleService
role
- the role to create
RiceIllegalArgumentException
- if the role passed in is null
RiceIllegalStateException
- if the role is already existing in the systempublic Role updateRole(Role role) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
Role
.
updateRole
in interface RoleService
role
- the role to update
RiceIllegalArgumentException
- if the role is null
RiceIllegalStateException
- if the role does not exist in the systemprotected boolean checkForCircularRoleMembership(String newMemberId, org.kuali.rice.kim.impl.role.RoleBo roleBo)
newMemberId
- roleBo
-
protected RoleMember findRoleMember(String roleMemberId)
public RoleMemberQueryResults findRoleMembers(QueryByCriteria queryByCriteria) throws RiceIllegalStateException
RoleService
findRoleMembers
in interface RoleService
queryByCriteria
- the qualifications for the roleIds.
RiceIllegalStateException
public Set<String> getRoleTypeRoleMemberIds(String roleId) throws RiceIllegalArgumentException
RoleService
getRoleTypeRoleMemberIds
in interface RoleService
roleId
- the role id.
RiceIllegalArgumentException
- if roleId is null or blank.public List<String> getMemberParentRoleIds(String memberType, String memberId) throws RiceIllegalStateException
RoleService
getMemberParentRoleIds
in interface RoleService
memberType
- the role member type.memberId
- the role member id (principalId, roleId, groupId).
RiceIllegalStateException
public List<RoleResponsibilityAction> getRoleMemberResponsibilityActions(String roleMemberId) throws RiceIllegalStateException
RoleService
getRoleMemberResponsibilityActions
in interface RoleService
roleMemberId
- the role member Id.
RiceIllegalStateException
public DelegateMemberQueryResults findDelegateMembers(QueryByCriteria queryByCriteria) throws RiceIllegalStateException
RoleService
findDelegateMembers
in interface RoleService
queryByCriteria
- the qualifications for the roleIds.
RiceIllegalStateException
public Role getRole(String roleId) throws RiceIllegalStateException
RoleService
getRole
in interface RoleService
roleId
- the id of the role.
RiceIllegalStateException
protected Map<String,org.kuali.rice.kim.impl.role.RoleBo> getRoleBoMap(Collection<String> roleIds)
protected Map<String,org.kuali.rice.kim.impl.role.RoleBoLite> getRoleBoLiteMap(Collection<String> roleIds)
public List<Role> getRoles(List<String> roleIds) throws RiceIllegalStateException
RoleService
getRoles
in interface RoleService
roleIds
- the ids of the roles.
RiceIllegalStateException
public Role getRoleByNamespaceCodeAndName(String namespaceCode, String roleName) throws RiceIllegalStateException
RoleService
getRoleByNamespaceCodeAndName
in interface RoleService
namespaceCode
- the namespace code of the role.roleName
- the name of the role.
RiceIllegalStateException
public String getRoleIdByNamespaceCodeAndName(String namespaceCode, String roleName) throws RiceIllegalStateException
RoleService
getRoleIdByNamespaceCodeAndName
in interface RoleService
namespaceCode
- the namespace code of the role.roleName
- the name of the role.
RiceIllegalStateException
public boolean isRoleActive(String roleId) throws RiceIllegalStateException
RoleService
isRoleActive
in interface RoleService
roleId
- the unique id of a role.
RiceIllegalStateException
public List<Map<String,String>> getRoleQualifersForPrincipalByRoleIds(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
getRoleQualifersForPrincipalByRoleIds
in interface RoleService
principalId
- the principalId toroleIds
- the namespace code of the role.qualification
- the qualifications for the roleIds.
RiceIllegalStateException
public List<Map<String,String>> getRoleQualifersForPrincipalByNamespaceAndRolename(String principalId, String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
getRoleQualifersForPrincipalByNamespaceAndRolename
in interface RoleService
principalId
- the principalId tonamespaceCode
- the namespace code of the role.roleName
- the name of the role.qualification
- the qualifications for the roleIds.
RiceIllegalStateException
public List<Map<String,String>> getNestedRoleQualifersForPrincipalByNamespaceAndRolename(String principalId, String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
getNestedRoleQualifersForPrincipalByNamespaceAndRolename
in interface RoleService
principalId
- the principalId tonamespaceCode
- the namespace code of the role.roleName
- the name of the role.qualification
- the qualifications for the roleIds.
RiceIllegalStateException
public List<Map<String,String>> getNestedRoleQualifiersForPrincipalByRoleIds(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
getNestedRoleQualifiersForPrincipalByRoleIds
in interface RoleService
principalId
- the principalId toroleIds
- the namespace code of the role.qualification
- the qualifications for the roleIds.
RiceIllegalStateException
public List<RoleMembership> getRoleMembers(List<String> roleIds, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
getRoleMembers
in interface RoleService
roleIds
- a list of role Ids.qualification
- the qualifications for the roleIds.
RiceIllegalStateException
public Collection<String> getRoleMemberPrincipalIds(String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
getRoleMemberPrincipalIds
in interface RoleService
namespaceCode
- the namespace code of the role.roleName
- the name of the rolequalification
- the qualifications for the roleIds.
RiceIllegalStateException
public boolean principalHasRole(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
principalHasRole
in interface RoleService
principalId
- the principal Id to check.roleIds
- the list of role ids.qualification
- the qualifications for the roleIds.
RiceIllegalStateException
public List<String> getPrincipalIdSubListWithRole(List<String> principalIds, String roleNamespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalStateException
RoleService
getPrincipalIdSubListWithRole
in interface RoleService
principalIds
- the principal Ids to check.roleNamespaceCode
- the namespaceCode of the role.roleName
- the name of the role.qualification
- the qualifications for the roleIds.
RiceIllegalStateException
public RoleQueryResults findRoles(QueryByCriteria queryByCriteria) throws RiceIllegalStateException
RoleService
findRoles
in interface RoleService
queryByCriteria
- the qualifications for the roleIds.
RiceIllegalStateException
public List<RoleMembership> getFirstLevelRoleMembers(List<String> roleIds) throws RiceIllegalStateException
RoleService
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.
getFirstLevelRoleMembers
in interface RoleService
roleIds
- a list of role Ids.
RiceIllegalStateException
public RoleMembershipQueryResults findRoleMemberships(QueryByCriteria queryByCriteria) throws RiceIllegalStateException
RoleService
findRoleMemberships
in interface RoleService
queryByCriteria
- the qualifications for the roleIds.
RiceIllegalStateException
public List<DelegateMember> getDelegationMembersByDelegationId(String delegationId) throws RiceIllegalStateException
RoleService
getDelegationMembersByDelegationId
in interface RoleService
delegationId
- the delegate id.
RiceIllegalStateException
public DelegateMember getDelegationMemberByDelegationAndMemberId(String delegationId, String memberId) throws RiceIllegalStateException
RoleService
getDelegationMemberByDelegationAndMemberId
in interface RoleService
delegationId
- the delegate id.memberId
- the member id matching the DelegateMember
RiceIllegalStateException
public DelegateMember getDelegationMemberById(String delegationMemberId) throws RiceIllegalStateException
RoleService
getDelegationMemberById
in interface RoleService
delegationMemberId
- the member id matching the DelegateMember
RiceIllegalStateException
public List<RoleResponsibility> getRoleResponsibilities(String roleId) throws RiceIllegalStateException
RoleService
getRoleResponsibilities
in interface RoleService
roleId
- the role Id.
RiceIllegalStateException
public DelegateType getDelegateTypeByRoleIdAndDelegateTypeCode(String roleId, DelegationType delegationType) throws RiceIllegalStateException
RoleService
getDelegateTypeByRoleIdAndDelegateTypeCode
in interface RoleService
roleId
- the role Id.delegationType
- type of delegation
RiceIllegalStateException
public DelegateType getDelegateTypeByDelegationId(String delegationId) throws RiceIllegalStateException
RoleService
getDelegateTypeByDelegationId
in interface RoleService
delegationId
- the id of delegation
RiceIllegalStateException
protected List<RoleMembership> getRoleMembers(List<String> roleIds, Map<String,String> qualification, boolean followDelegations, Set<String> foundRoleTypeMembers)
protected List<RoleMembership.Builder> applyDelegationsToRoleMembers(List<RoleMembership> roleMemberships, Collection<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> delegations, Map<String,String> qualification)
protected void linkDelegateToRoleMembership(org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo delegation, DelegateMember.Builder delegateMemberBuilder, RoleMembership.Builder roleMembershipBuilder)
protected void resolveDelegationMemberRoles(List<RoleMembership.Builder> membershipBuilders, Map<String,String> qualification, Set<String> foundRoleTypeMembers)
public boolean principalHasRole(String principalId, List<String> roleIds, Map<String,String> qualification, boolean checkDelegations)
RoleService
principalHasRole
in interface RoleService
principalId
- the principal Id to check.roleIds
- the list of role ids.qualification
- the qualifications for the roleIds.checkDelegations
- whether delegations should be checked or not
protected boolean isDerivedRoleType(String roleTypeId, RoleTypeService service)
public boolean isDerivedRoleType(RoleTypeService service)
public boolean isDerivedRole(String roleId)
RoleService
isDerivedRole
in interface RoleService
roleId
- the roleId
public boolean isDynamicRoleMembership(String roleId)
RoleService
isDynamicRoleMembership
in interface RoleService
roleId
- the roleId
protected boolean matchesOnDelegation(Set<String> allRoleIds, String principalId, List<String> principalGroupIds, Map<String,String> qualification)
protected boolean getRoleIdToMembershipMap(Map<String,List<RoleMembership>> roleIdToMembershipMap, List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers)
protected org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo getKimDelegationImpl(String delegationId)
protected DelegationTypeService getDelegationTypeService(String delegationId)
protected Collection<RoleMembership> getNestedRoleMembers(Map<String,String> qualification, RoleMembership rm, Set<String> foundRoleTypeMembers)
protected org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo getKimDelegationMemberImplByDelegationAndId(String delegationId, String delegationMemberId)
public RoleMember assignPrincipalToRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifier) throws RiceIllegalArgumentException
RoleService
assignPrincipalToRole
in interface RoleService
principalId
- the principalIdnamespaceCode
- the namespaceCode of the RoleroleName
- the name of the rolequalifier
- the qualifications for the principalId to be assigned to the role
RiceIllegalArgumentException
- if princialId, namespaceCode or roleName is null or blank.public RoleMember assignGroupToRole(String groupId, String namespaceCode, String roleName, Map<String,String> qualifier) throws RiceIllegalStateException
RoleService
assignGroupToRole
in interface RoleService
groupId
- the groupIdnamespaceCode
- the namespaceCode of the RoleroleName
- the name of the rolequalifier
- the qualifications for the principalId to be assigned to the role
RiceIllegalStateException
public RoleMember assignRoleToRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifier) throws RiceIllegalStateException
RoleService
assignRoleToRole
in interface RoleService
roleId
- the roleIdnamespaceCode
- the namespaceCode of the RoleroleName
- the name of the rolequalifier
- the qualifications for the principalId to be assigned to the role
RiceIllegalStateException
public RoleMember createRoleMember(RoleMember roleMember) throws RiceIllegalStateException
RoleService
createRoleMember
in interface RoleService
roleMember
- the new RoleMember to save.
RiceIllegalStateException
- if roleMember already exists.public RoleMember updateRoleMember(RoleMember roleMember) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
updateRoleMember
in interface RoleService
roleMember
- the new RoleMember to save.
RiceIllegalArgumentException
- if roleMember is null.
RiceIllegalStateException
- if roleMember does not yet exist.public DelegateMember updateDelegateMember(DelegateMember delegateMember) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
updateDelegateMember
in interface RoleService
delegateMember
- the new DelegateMember to save.
RiceIllegalArgumentException
- if delegateMember is null.
RiceIllegalStateException
- if delegateMember does not yet exist.public DelegateMember createDelegateMember(DelegateMember delegateMember) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
createDelegateMember
in interface RoleService
delegateMember
- the new DelegateMember to save.
RiceIllegalArgumentException
- if delegateMember is null.
RiceIllegalStateException
- if delegateMember already exists.public void removeDelegateMembers(List<DelegateMember> delegateMembers) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
removeDelegateMembers
in interface RoleService
RiceIllegalArgumentException
- if delegateMember is null.
RiceIllegalStateException
public RoleResponsibilityAction createRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
createRoleResponsibilityAction
in interface RoleService
roleResponsibilityAction
- the new RoleResponsibilityAction to save.
RiceIllegalArgumentException
- if roleResponsibilityAction is null.
RiceIllegalStateException
- if roleResponsibilityAction already exists.public DelegateType createDelegateType(DelegateType delegateType) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
createDelegateType
in interface RoleService
delegateType
- the new DelegateType to save.
RiceIllegalArgumentException
- if delegateType is null.
RiceIllegalStateException
- if delegateType already exists.public DelegateType updateDelegateType(DelegateType delegateType) throws RiceIllegalArgumentException, RiceIllegalStateException
RoleService
updateDelegateType
in interface RoleService
delegateType
- the new DelegateType to save.
RiceIllegalArgumentException
- if delegateType is null.
RiceIllegalStateException
- if delegateType does not yet exist.public void removePrincipalFromRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifier) throws RiceIllegalArgumentException
RoleService
removePrincipalFromRole
in interface RoleService
principalId
- the principalIdnamespaceCode
- the namespaceCode of the RoleroleName
- the name of the rolequalifier
- the qualifications for the principalId to be assigned to the role
RiceIllegalArgumentException
- if principalId, namespaceCode or roleName is null or blank.public void removeGroupFromRole(String groupId, String namespaceCode, String roleName, Map<String,String> qualifier) throws RiceIllegalArgumentException
RoleService
removeGroupFromRole
in interface RoleService
groupId
- the groupIdnamespaceCode
- the namespaceCode of the RoleroleName
- the name of the rolequalifier
- the qualifications for the principalId to be assigned to the role
RiceIllegalArgumentException
- if groupId, namespaceCode or roleName is null or blank.public void removeRoleFromRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifier) throws RiceIllegalArgumentException
RoleService
removeRoleFromRole
in interface RoleService
roleId
- the roleIdnamespaceCode
- the namespaceCode of the RoleroleName
- the name of the rolequalifier
- the qualifications for the principalId to be assigned to the role
RiceIllegalArgumentException
- if roleId, namespaceCode or roleName is null or blank.public void assignPermissionToRole(String permissionId, String roleId) throws RiceIllegalArgumentException
RoleService
assignPermissionToRole
in interface RoleService
permissionId
- the permissionIdroleId
- the roleId
RiceIllegalArgumentException
- if permissionId or roleId is null or blank.public void revokePermissionFromRole(String permissionId, String roleId) throws RiceIllegalArgumentException
RoleService
revokePermissionFromRole
in interface RoleService
permissionId
- the permissionIdroleId
- the roleId
RiceIllegalArgumentException
- if permissionId or roleId is null or blank.protected void addMemberAttributeData(org.kuali.rice.kim.impl.role.RoleMemberBo roleMember, Map<String,String> qualifier, String kimTypeId)
protected void addDelegationMemberAttributeData(org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo delegationMember, Map<String,String> qualifier, String kimTypeId)
protected void logPrincipalHasRoleCheck(String principalId, List<String> roleIds, Map<String,String> roleQualifiers)
protected RoleService getProxiedRoleService()
public void setCacheManager(org.springframework.cache.CacheManager cacheManager)
cacheManager
- the cache manager to use for internal caching, must not be null
IllegalArgumentException
- if a null cache manager is passedprotected void getNestedRoleTypeMemberIds(String roleId, Set<String> members)
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)
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
IllegalArgumentException
- if daoActionToTake refers to an enumeration constant that is not role-member-related.protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRolePrincipalsForPrincipalIdAndRoleIds(Collection<String> roleIds, String principalId, Map<String,String> qualification)
protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleGroupsForGroupIdsAndRoleIds(Collection<String> roleIds, Collection<String> groupIds, Map<String,String> qualification)
protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembersForRoleIds(Collection<String> roleIds, String memberTypeCode, Map<String,String> qualification)
protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembershipsForRoleIdsAsMembers(Collection<String> roleIds, Map<String,String> qualification)
protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getStoredRoleMembersForRoleIdsWithFilters(Collection<String> roleIds, String principalId, List<String> groupIds, Map<String,String> qualification)
protected org.kuali.rice.kim.impl.role.RoleMemberBo getRoleMemberBo(String roleMemberId)
protected Map<String,org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> getStoredDelegationImplMapFromRoleIds(Collection<String> roleIds)
protected List<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> getStoredDelegationImplsForRoleIds(Collection<String> roleIds)
protected List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getDelegationMemberBoList(RoleServiceBase.RoleDaoAction daoActionToTake, Collection<String> delegationIds, String principalId, List<String> groupIds)
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.
IllegalArgumentException
- if daoActionToTake does not represent a delegation-member-list-related enumeration value.protected List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getStoredDelegationPrincipalsForPrincipalIdAndDelegationIds(Collection<String> delegationIds, String principalId)
protected org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo getDelegateMemberBo(String delegationMemberId)
protected List<org.kuali.rice.kim.impl.common.delegate.DelegateMemberBo> getDelegationMemberBoListByMemberAndDelegationId(String memberId, String delegationId)
protected Object getMember(String memberTypeCode, String memberId)
protected String getMemberName(Object member)
protected org.kuali.rice.kim.impl.role.RoleBo getRoleBo(String roleId)
protected org.kuali.rice.kim.impl.role.RoleBoLite getRoleBoLite(String roleId)
protected org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo getDelegationOfType(String roleId, DelegationType delegationType)
protected org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo getPrimaryDelegation(String roleId, List<org.kuali.rice.kim.impl.common.delegate.DelegateTypeBo> roleDelegates)
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 boolean isDelegationPrimary(DelegationType delegationType)
protected boolean isDelegationSecondary(DelegationType delegationType)
protected org.kuali.rice.kim.impl.role.RoleBo getRoleBoByName(String namespaceCode, String roleName)
protected org.kuali.rice.kim.impl.role.RoleBoLite getRoleBoLiteByName(String namespaceCode, String roleName)
protected List<RoleMember> doAnyMemberRecordsMatchByExactQualifier(org.kuali.rice.kim.impl.role.RoleBo role, String memberId, RoleServiceBase.RoleDaoAction daoActionToTake, Map<String,String> qualifier)
protected List<org.kuali.rice.kim.impl.role.RoleMemberBo> getRoleMembersByExactQualifierMatch(org.kuali.rice.kim.impl.role.RoleBo role, String memberId, RoleServiceBase.RoleDaoAction daoActionToTake, Map<String,String> qualifier)
protected RoleMember doAnyMemberRecordsMatch(List<org.kuali.rice.kim.impl.role.RoleMemberBo> roleMembers, String memberId, String memberTypeCode, Map<String,String> qualifier)
protected boolean doesMemberMatch(org.kuali.rice.kim.impl.role.RoleMemberBo roleMember, String memberId, String memberTypeCode, Map<String,String> qualifier)
protected RoleTypeService getRoleTypeService(String roleId)
roleId
- the role ID to get the role type service for
protected RoleTypeService getRoleTypeService(KimType typeInfo)
protected Map<String,String> populateQualifiersForExactMatch(Map<String,String> defaultQualification, List<String> attributes)
protected String getKimAttributeId(String attributeName)
protected BusinessObjectService getBusinessObjectService()
protected LookupService getLookupService()
protected IdentityService getIdentityService()
protected GroupService getGroupService()
protected ResponsibilityInternalService getResponsibilityInternalService()
protected RoleDao getRoleDao()
public void setRoleDao(RoleDao roleDao)
roleDao
- the roleDao to setpublic void setCriteriaLookupService(CriteriaLookupService criteriaLookupService)
public CriteriaLookupService getCriteriaLookupService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |