public class RoleServiceMockImpl extends Object implements RoleService, MockService
Constructor and Description |
---|
RoleServiceMockImpl() |
Modifier and Type | Method and Description |
---|---|
RoleMember |
assignGroupToRole(String groupId,
String namespaceCode,
String roleName,
Map<String,String> qualifications) |
void |
assignPermissionToRole(String permissionId,
String roleId) |
RoleMember |
assignPrincipalToRole(String principalId,
String namespaceCode,
String roleName,
Map<String,String> qualifications) |
RoleMember |
assignRoleToRole(String roleId,
String namespaceCode,
String roleName,
Map<String,String> qualifications) |
void |
clear()
Clear all cached service data.
|
DelegateMember |
createDelegateMember(DelegateMember delegateMember) |
DelegateType |
createDelegateType(DelegateType delegateType) |
Role |
createRole(Role role) |
RoleMember |
createRoleMember(RoleMember roleMember) |
RoleResponsibilityAction |
createRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) |
void |
deleteRoleResponsibilityAction(String s) |
DelegateMemberQueryResults |
findDelegateMembers(QueryByCriteria queryByCriteria) |
RoleMemberQueryResults |
findRoleMembers(QueryByCriteria queryByCriteria)
Gets role member information based on the given search criteria.
|
RoleMembershipQueryResults |
findRoleMemberships(QueryByCriteria queryByCriteria) |
RoleQueryResults |
findRoles(QueryByCriteria queryByCriteria) |
DelegateType |
getDelegateTypeByDelegationId(String delegationId) |
DelegateType |
getDelegateTypeByRoleIdAndDelegateTypeCode(String roleId,
DelegationType delegateType) |
DelegateMember |
getDelegationMemberByDelegationAndMemberId(String delegationId,
String memberId) |
DelegateMember |
getDelegationMemberById(String delegationMemberId) |
List<DelegateMember> |
getDelegationMembersByDelegationId(String delegationId)
Gets delegation member information based on the given search criteria.
|
List<RoleMembership> |
getFirstLevelRoleMembers(List<String> roleIds)
Gets all direct members of the roles that have ids within the given list
of role ids.
|
GroupService |
getGroupService() |
KimTypeService |
getKimTypeService() |
List<String> |
getMemberParentRoleIds(String memberType,
String memberId)
Gets a list of Roles that the given member belongs to.
|
List<Map<String,String>> |
getNestedRoleQualifersForPrincipalByNamespaceAndRolename(String principalId,
String namespaceCode,
String roleName,
Map<String,String> qualification) |
List<Map<String,String>> |
getNestedRoleQualifiersForPrincipalByRoleIds(String principalId,
List<String> roleIds,
Map<String,String> qualification) |
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.
|
Role |
getRole(String roleId)
Get the KIM Role object with the given ID.
|
Role |
getRoleByNamespaceCodeAndName(String namespaceCode,
String roleName)
Get the KIM Role object with the unique combination of namespace, component,
and role name.
|
String |
getRoleIdByNamespaceCodeAndName(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,
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) |
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.
|
List<Map<String,String>> |
getRoleQualifersForPrincipalByNamespaceAndRolename(String principalId,
String namespaceCode,
String roleName,
Map<String,String> qualification) |
List<Map<String,String>> |
getRoleQualifersForPrincipalByRoleIds(String principalId,
List<String> roleIds,
Map<String,String> qualification) |
List<RoleResponsibility> |
getRoleResponsibilities(String roleId) |
List<Role> |
getRoles(List<String> roleIds)
Get the KIM Role objects for the role IDs in the given List.
|
Set<String> |
getRoleTypeRoleMemberIds(String roleId) |
boolean |
isDerivedRole(String s) |
boolean |
isDynamicRoleMembership(String s) |
boolean |
isRoleActive(String roleId)
Checks whether the role with the given role ID is active.
|
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) |
void |
removeDelegateMembers(List<DelegateMember> delegateMembers) |
void |
removeGroupFromRole(String groupId,
String namespaceCode,
String roleName,
Map<String,String> qualifications) |
void |
removePrincipalFromRole(String principalId,
String namespaceCode,
String roleName,
Map<String,String> qualifications) |
void |
removeRoleFromRole(String roleId,
String namespaceCode,
String roleName,
Map<String,String> qualifications) |
void |
revokePermissionFromRole(String permissionId,
String roleId) |
void |
setGroupService(GroupService groupService) |
void |
setKimTypeService(KimTypeService kimTypeInfoService) |
DelegateMember |
updateDelegateMember(DelegateMember delegateMember) |
DelegateType |
updateDelegateType(DelegateType delegateType) |
Role |
updateRole(Role role) |
RoleMember |
updateRoleMember(RoleMember roleMember) |
RoleResponsibilityAction |
updateRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) |
public RoleServiceMockImpl()
public void clear()
MockService
clear
in interface MockService
public GroupService getGroupService()
public void setGroupService(GroupService groupService)
public KimTypeService getKimTypeService()
public void setKimTypeService(KimTypeService kimTypeInfoService)
public Role getRole(String roleId)
null
.getRole
in interface RoleService
public List<Role> getRoles(List<String> roleIds)
getRoles
in interface RoleService
public Role getRoleByNamespaceCodeAndName(String namespaceCode, String roleName)
null
.getRoleByNamespaceCodeAndName
in interface RoleService
public String getRoleIdByNamespaceCodeAndName(String namespaceCode, String roleName)
getRoleIdByNamespaceCodeAndName
in interface RoleService
public boolean isRoleActive(String roleId)
isRoleActive
in interface RoleService
roleId
- public List<RoleMembership> getRoleMembers(List<String> roleIds, Map<String,String> qualification)
getRoleMembers
in interface RoleService
public Collection<String> getRoleMemberPrincipalIds(String namespaceCode, String roleName, Map<String,String> qualification)
getRoleMemberPrincipalIds
in interface RoleService
public boolean principalHasRole(String principalId, List<String> roleIds, Map<String,String> qualification)
principalHasRole
in interface RoleService
public boolean principalHasRole(String principalId, List<String> roleIds, Map<String,String> qualification, boolean checkDelegations) throws RiceIllegalArgumentException
principalHasRole
in interface RoleService
RiceIllegalArgumentException
public List<String> getPrincipalIdSubListWithRole(List<String> principalIds, String roleNamespaceCode, String roleName, Map<String,String> qualification)
getPrincipalIdSubListWithRole
in interface RoleService
public RoleQueryResults findRoles(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
findRoles
in interface RoleService
RiceIllegalArgumentException
public List<RoleMembership> getFirstLevelRoleMembers(List<String> roleIds)
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
public RoleMemberQueryResults findRoleMembers(QueryByCriteria queryByCriteria)
findRoleMembers
in interface RoleService
public Set<String> getRoleTypeRoleMemberIds(String roleId) throws RiceIllegalArgumentException
getRoleTypeRoleMemberIds
in interface RoleService
RiceIllegalArgumentException
public List<String> getMemberParentRoleIds(String memberType, String memberId)
getMemberParentRoleIds
in interface RoleService
public RoleMembershipQueryResults findRoleMemberships(QueryByCriteria queryByCriteria)
findRoleMemberships
in interface RoleService
public DelegateMemberQueryResults findDelegateMembers(QueryByCriteria queryByCriteria)
findDelegateMembers
in interface RoleService
public List<DelegateMember> getDelegationMembersByDelegationId(String delegationId)
getDelegationMembersByDelegationId
in interface RoleService
public DelegateMember getDelegationMemberByDelegationAndMemberId(String delegationId, String memberId)
getDelegationMemberByDelegationAndMemberId
in interface RoleService
public DelegateMember getDelegationMemberById(String delegationMemberId)
getDelegationMemberById
in interface RoleService
public List<RoleResponsibility> getRoleResponsibilities(String roleId)
getRoleResponsibilities
in interface RoleService
public List<RoleResponsibilityAction> getRoleMemberResponsibilityActions(String roleMemberId)
getRoleMemberResponsibilityActions
in interface RoleService
public DelegateType getDelegateTypeByRoleIdAndDelegateTypeCode(String roleId, DelegationType delegateType) throws RiceIllegalArgumentException
getDelegateTypeByRoleIdAndDelegateTypeCode
in interface RoleService
RiceIllegalArgumentException
public DelegateType getDelegateTypeByDelegationId(String delegationId) throws RiceIllegalArgumentException
getDelegateTypeByDelegationId
in interface RoleService
RiceIllegalArgumentException
public DelegateType updateDelegateType(DelegateType delegateType) throws RiceIllegalArgumentException, RiceIllegalStateException
updateDelegateType
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public RoleMember assignGroupToRole(String groupId, String namespaceCode, String roleName, Map<String,String> qualifications) throws UnsupportedOperationException
assignGroupToRole
in interface RoleService
UnsupportedOperationException
public void assignPermissionToRole(String permissionId, String roleId) throws UnsupportedOperationException
assignPermissionToRole
in interface RoleService
UnsupportedOperationException
public RoleMember assignPrincipalToRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifications) throws UnsupportedOperationException
assignPrincipalToRole
in interface RoleService
UnsupportedOperationException
public RoleMember assignRoleToRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifications) throws UnsupportedOperationException
assignRoleToRole
in interface RoleService
UnsupportedOperationException
public void removeGroupFromRole(String groupId, String namespaceCode, String roleName, Map<String,String> qualifications) throws UnsupportedOperationException
removeGroupFromRole
in interface RoleService
UnsupportedOperationException
public void removePrincipalFromRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifications) throws UnsupportedOperationException
removePrincipalFromRole
in interface RoleService
UnsupportedOperationException
public void removeRoleFromRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifications) throws UnsupportedOperationException
removeRoleFromRole
in interface RoleService
UnsupportedOperationException
public RoleResponsibilityAction createRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) throws RiceIllegalArgumentException
createRoleResponsibilityAction
in interface RoleService
RiceIllegalArgumentException
public RoleResponsibilityAction updateRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) throws RiceIllegalArgumentException
updateRoleResponsibilityAction
in interface RoleService
RiceIllegalArgumentException
public void deleteRoleResponsibilityAction(String s) throws RiceIllegalArgumentException
deleteRoleResponsibilityAction
in interface RoleService
RiceIllegalArgumentException
public RoleMember createRoleMember(RoleMember roleMember) throws RiceIllegalArgumentException, RiceIllegalStateException
createRoleMember
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public RoleMember updateRoleMember(RoleMember roleMember) throws RiceIllegalArgumentException, RiceIllegalStateException
updateRoleMember
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public DelegateMember updateDelegateMember(DelegateMember delegateMember) throws RiceIllegalArgumentException, RiceIllegalStateException
updateDelegateMember
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public DelegateMember createDelegateMember(DelegateMember delegateMember) throws RiceIllegalArgumentException, RiceIllegalStateException
createDelegateMember
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public void removeDelegateMembers(List<DelegateMember> delegateMembers) throws RiceIllegalArgumentException, RiceIllegalStateException
removeDelegateMembers
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public Role createRole(Role role) throws RiceIllegalArgumentException, RiceIllegalStateException
createRole
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public Role updateRole(Role role) throws RiceIllegalArgumentException, RiceIllegalStateException
updateRole
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public List<Map<String,String>> getNestedRoleQualifiersForPrincipalByRoleIds(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalArgumentException
getNestedRoleQualifiersForPrincipalByRoleIds
in interface RoleService
RiceIllegalArgumentException
public List<Map<String,String>> getRoleQualifersForPrincipalByNamespaceAndRolename(String principalId, String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalArgumentException
getRoleQualifersForPrincipalByNamespaceAndRolename
in interface RoleService
RiceIllegalArgumentException
public List<Map<String,String>> getRoleQualifersForPrincipalByRoleIds(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalArgumentException
getRoleQualifersForPrincipalByRoleIds
in interface RoleService
RiceIllegalArgumentException
public List<Map<String,String>> getNestedRoleQualifersForPrincipalByNamespaceAndRolename(String principalId, String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalArgumentException
getNestedRoleQualifersForPrincipalByNamespaceAndRolename
in interface RoleService
RiceIllegalArgumentException
public DelegateType createDelegateType(DelegateType delegateType) throws RiceIllegalArgumentException, RiceIllegalStateException
createDelegateType
in interface RoleService
RiceIllegalArgumentException
RiceIllegalStateException
public void revokePermissionFromRole(String permissionId, String roleId) throws RiceIllegalArgumentException
revokePermissionFromRole
in interface RoleService
RiceIllegalArgumentException
public boolean isDerivedRole(String s) throws RiceIllegalArgumentException
isDerivedRole
in interface RoleService
RiceIllegalArgumentException
public boolean isDynamicRoleMembership(String s) throws RiceIllegalArgumentException
isDynamicRoleMembership
in interface RoleService
RiceIllegalArgumentException
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.