public class RoleAndPermissionServiceMockImpl extends Object implements RoleService, PermissionService, MockService
Constructor and Description |
---|
RoleAndPermissionServiceMockImpl() |
public RoleAndPermissionServiceMockImpl()
public void clear()
MockService
clear
in interface MockService
public GroupService getGroupService()
public void setGroupService(GroupService groupService)
public Role getRole(String id) throws RiceIllegalArgumentException
getRole
in interface RoleService
RiceIllegalArgumentException
public List<Role> getRoles(List<String> roleIds)
getRoles
in interface RoleService
public Role getRoleByNamespaceCodeAndName(String namespaceCode, String roleName)
getRoleByNamespaceCodeAndName
in interface RoleService
public String getRoleIdByNamespaceCodeAndName(String namespaceCode, String roleName)
getRoleIdByNamespaceCodeAndName
in interface RoleService
public boolean isRoleActive(String roleId) throws RiceIllegalArgumentException
isRoleActive
in interface RoleService
RiceIllegalArgumentException
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) throws RiceIllegalArgumentException
getRoleMemberPrincipalIds
in interface RoleService
RiceIllegalArgumentException
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)
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 void deleteRoleResponsibilityAction(String roleResponsibilityActionId) throws RiceIllegalArgumentException
deleteRoleResponsibilityAction
in interface RoleService
RiceIllegalArgumentException
public RoleResponsibilityAction updateRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) throws RiceIllegalArgumentException
updateRoleResponsibilityAction
in interface RoleService
RiceIllegalArgumentException
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 RiceIllegalArgumentException
assignGroupToRole
in interface RoleService
RiceIllegalArgumentException
public RoleMember assignPrincipalToRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
assignPrincipalToRole
in interface RoleService
RiceIllegalArgumentException
public RoleMember assignRoleToRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
assignRoleToRole
in interface RoleService
RiceIllegalArgumentException
public void removeGroupFromRole(String groupId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
removeGroupFromRole
in interface RoleService
RiceIllegalArgumentException
public void removePrincipalFromRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
removePrincipalFromRole
in interface RoleService
RiceIllegalArgumentException
public void removeRoleFromRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
removeRoleFromRole
in interface RoleService
RiceIllegalArgumentException
public RoleResponsibilityAction createRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) throws RiceIllegalArgumentException
createRoleResponsibilityAction
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 assignPermissionToRole(String permissionId, String roleId) throws RiceIllegalArgumentException
assignPermissionToRole
in interface RoleService
RiceIllegalArgumentException
public void revokePermissionFromRole(String permissionId, String roleId) throws RiceIllegalArgumentException
revokePermissionFromRole
in interface RoleService
RiceIllegalArgumentException
public boolean isDerivedRole(String roleId) throws RiceIllegalArgumentException
isDerivedRole
in interface RoleService
RiceIllegalArgumentException
public boolean isDynamicRoleMembership(String roleId) throws RiceIllegalArgumentException
isDynamicRoleMembership
in interface RoleService
RiceIllegalArgumentException
public List<Template> getAllTemplates()
getAllTemplates
in interface PermissionService
public List<Permission> getAuthorizedPermissions(String principalId, String namespaceCode, String permissionName, Map<String,String> qualification)
getAuthorizedPermissions
in interface PermissionService
public List<Permission> getAuthorizedPermissionsByTemplate(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification)
getAuthorizedPermissionsByTemplate
in interface PermissionService
public Permission getPermission(String permissionId)
getPermission
in interface PermissionService
public List<Assignee> getPermissionAssignees(String namespaceCode, String permissionName, Map<String,String> qualification)
getPermissionAssignees
in interface PermissionService
public List<Assignee> getPermissionAssigneesByTemplate(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification)
getPermissionAssigneesByTemplate
in interface PermissionService
public Template getPermissionTemplate(String permissionTemplateId)
getPermissionTemplate
in interface PermissionService
public Template findPermTemplateByNamespaceCodeAndName(String namespaceCode, String permissionTemplateName)
findPermTemplateByNamespaceCodeAndName
in interface PermissionService
public Permission findPermByNamespaceCodeAndName(String namespaceCode, String permissionName)
findPermByNamespaceCodeAndName
in interface PermissionService
public List<Permission> findPermissionsByTemplate(String namespaceCode, String permissionTemplateName)
findPermissionsByTemplate
in interface PermissionService
public List<String> getRoleIdsForPermission(String namespaceCode, String permissionName) throws RiceIllegalArgumentException
getRoleIdsForPermission
in interface PermissionService
RiceIllegalArgumentException
public boolean hasPermission(String principalId, String namespaceCode, String permissionName) throws RiceIllegalArgumentException
hasPermission
in interface PermissionService
RiceIllegalArgumentException
public boolean hasPermissionByTemplate(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails) throws RiceIllegalArgumentException
hasPermissionByTemplate
in interface PermissionService
RiceIllegalArgumentException
public boolean isAuthorized(String principalId, String namespaceCode, String permissionName, Map<String,String> qualification)
isAuthorized
in interface PermissionService
public boolean isAuthorizedByTemplate(String principalId, String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails, Map<String,String> qualification)
isAuthorizedByTemplate
in interface PermissionService
public boolean isPermissionDefined(String namespaceCode, String permissionName)
isPermissionDefined
in interface PermissionService
public boolean isPermissionDefinedByTemplate(String namespaceCode, String permissionTemplateName, Map<String,String> permissionDetails)
isPermissionDefinedByTemplate
in interface PermissionService
public PermissionQueryResults findPermissions(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
findPermissions
in interface PermissionService
RiceIllegalArgumentException
public Permission createPermission(Permission permission) throws RiceIllegalArgumentException, RiceIllegalStateException
createPermission
in interface PermissionService
RiceIllegalArgumentException
RiceIllegalStateException
public Permission updatePermission(Permission permission) throws RiceIllegalArgumentException, RiceIllegalStateException
updatePermission
in interface PermissionService
RiceIllegalArgumentException
RiceIllegalStateException
public TemplateQueryResults findPermissionTemplates(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
findPermissionTemplates
in interface PermissionService
RiceIllegalArgumentException
public Template createTemplate(Template template) throws RiceIllegalArgumentException, RiceIllegalStateException
template
- RiceIllegalArgumentException
RiceIllegalStateException
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.