|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RoleService
This service provides operations for querying role and role qualification data.
A role is where permissions and responsibilities are granted. Roles have a membership consisting of principals, groups or even other roles. By being assigned as members of a role, the associated principals will be granted all permissions and responsibilities that have been granted to the role.
Each membership assignment on the role can have a qualification which defines extra information about that particular member of the role. For example, one may have the role of "Dean" but that can be further qualified by the school they are the dean of, such as "Dean of Computer Science". Authorization checks that are then done in the permission service can pass qualifiers as part of the operation if they want to restrict the subset of the role against which the check is made.
Method Summary | |
---|---|
void |
assignGroupToRole(String groupId,
String namespaceCode,
String roleName,
Map<String,String> 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,
Map<String,String> 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,
Map<String,String> qualifications)
Assigns the role with the given id to the role with the specified namespace code and name with the supplied set of qualifications. |
DelegateType |
createDelegateType(DelegateType delegateType)
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. |
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)
|
DelegateMemberQueryResults |
findDelegateMembers(QueryByCriteria queryByCriteria)
|
RoleMemberQueryResults |
findRoleMembers(QueryByCriteria queryByCriteria)
|
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 |
DelegateType |
getDelegateTypeByDelegationId(String delegationId)
|
DelegateType |
getDelegateTypeByRoleIdAndDelegateTypeCode(String roleId,
DelegationType delegateType)
|
DelegateMember |
getDelegationMemberByDelegationAndMemberId(String delegationId,
String memberId)
|
DelegateMember |
getDelegationMemberById(String id)
|
List<DelegateMember> |
getDelegationMembersByDelegationId(String delegateId)
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. |
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)
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. |
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 id)
Get the KIM Role object with the given ID. |
Role |
getRoleByNameAndNamespaceCode(String namespaceCode,
String name)
Get the KIM Role object with the unique combination of namespace, component, and role name. |
String |
getRoleIdByNameAndNamespaceCode(String namespaceCode,
String name)
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)
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)
|
List<Role> |
getRoles(List<String> ids)
Get the KIM Role objects for the role IDs in the given List. |
Set<String> |
getRoleTypeRoleMemberIds(String roleId)
|
boolean |
isRoleActive(String id)
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. |
void |
removeGroupFromRole(String groupId,
String namespaceCode,
String roleName,
Map<String,String> 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,
Map<String,String> 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,
Map<String,String> qualifications)
Remove the group with the given id and qualifications from the role with the specified namespace code and role name. |
DelegateType |
updateDelegateType(DelegateType delegateType)
Updates a delegation type, including attached members |
Role |
updateRole(Role role)
This will update a Role . |
RoleMember |
updateRoleMember(RoleMember roleMember)
Assigns the role with the given id to the role with the specified namespace code and name with the supplied set of qualifications. |
Method Detail |
---|
@CacheEvict(value="http://rice.kuali.org/kim/v2_0/RoleType", allEntries=true) Role createRole(Role role) throws RiceIllegalArgumentException, RiceIllegalStateException
Role
exactly like the role passed in.
role
- the role to create
IllegalArgumentException
- if the responsibility is null
IllegalStateException
- if the responsibility is already existing in the system
RiceIllegalArgumentException
RiceIllegalStateException
@CacheEvict(value="http://rice.kuali.org/kim/v2_0/RoleType", allEntries=true) Role updateRole(Role role) throws RiceIllegalArgumentException, RiceIllegalStateException
Role
.
role
- the role to update
IllegalArgumentException
- if the role is null
IllegalStateException
- if the role does not exist in the system
RiceIllegalArgumentException
RiceIllegalStateException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleType", key="\'id=\' + #p0") Role getRole(String id) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleType", key="\'ids=\' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).key(#p0)") List<Role> getRoles(List<String> ids) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleType", key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") Role getRoleByNameAndNamespaceCode(String namespaceCode, String name) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleType", key="\'{getRoleIdByNameAndNamespaceCode}\' + \'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") String getRoleIdByNameAndNamespaceCode(String namespaceCode, String name) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleType", key="\'{isRoleActive}\' + \'id=\' + #p0") boolean isRoleActive(String id) throws RiceIllegalArgumentException
id
-
RiceIllegalArgumentException
List<Map<String,String>> getRoleQualifersForPrincipalByRoleIds(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
List<Map<String,String>> getRoleQualifersForPrincipalByNamespaceAndRolename(String principalId, String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
List<Map<String,String>> getNestedRoleQualifersForPrincipalByNamespaceAndRolename(String principalId, String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
List<Map<String,String>> getNestedRoleQualifiersForPrincipalByRoleIds(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
List<RoleMembership> getRoleMembers(List<String> roleIds, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
Collection<String> getRoleMemberPrincipalIds(String namespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
boolean principalHasRole(String principalId, List<String> roleIds, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
List<String> getPrincipalIdSubListWithRole(List<String> principalIds, String roleNamespaceCode, String roleName, Map<String,String> qualification) throws RiceIllegalArgumentException
RiceIllegalArgumentException
RoleQueryResults findRoles(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleMembershipType", key="\'roleIds=\' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).key(#p0)") List<RoleMembership> getFirstLevelRoleMembers(List<String> roleIds) throws RiceIllegalArgumentException
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.
RiceIllegalArgumentException
RoleMembershipQueryResults findRoleMemberships(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleMembershipType", key="\'memberType=\' + #p0 + \'|\' + \'memberId=\' + #p1") List<String> getMemberParentRoleIds(String memberType, String memberId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
RoleMemberQueryResults findRoleMembers(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleMemberType", key="\'{getRoleTypeRoleMemberIds} + \'roleId=\' + #p0") Set<String> getRoleTypeRoleMemberIds(String roleId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
DelegateMemberQueryResults findDelegateMembers(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/DelegateMemberType", key="\'delegateId=\' + #p0") List<DelegateMember> getDelegationMembersByDelegationId(String delegateId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/DelegateMemberType", key="\'delegateId=\' + #p0 + \'|\' + \'memberId=\' + #p1") DelegateMember getDelegationMemberByDelegationAndMemberId(String delegationId, String memberId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/DelegateMemberType", key="\'id=\' + #p0") DelegateMember getDelegationMemberById(String id) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleResponsibilityType", key="\'roleId=\' + #p0") List<RoleResponsibility> getRoleResponsibilities(String roleId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/RoleResponsibilityType", key="\'roleMemberId=\' + #p0") List<RoleResponsibilityAction> getRoleMemberResponsibilityActions(String roleMemberId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/DelegateTypeType", key="\'roleId=\' + #p0 + \'|\' + \'code=\' + #p1") DelegateType getDelegateTypeByRoleIdAndDelegateTypeCode(String roleId, DelegationType delegateType) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@Cacheable(value="http://rice.kuali.org/kim/v2_0/DelegateTypeType", key="\'delegationId=\' + #p0") DelegateType getDelegateTypeByDelegationId(String delegationId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) void assignPrincipalToRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) void assignGroupToRole(String groupId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) void assignRoleToRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) RoleMember createRoleMember(RoleMember roleMember) throws RiceIllegalArgumentException, RiceIllegalStateException
RiceIllegalArgumentException
RiceIllegalStateException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) RoleMember updateRoleMember(RoleMember roleMember) throws RiceIllegalArgumentException, RiceIllegalStateException
RiceIllegalArgumentException
RiceIllegalStateException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) RoleResponsibilityAction createRoleResponsibilityAction(RoleResponsibilityAction roleResponsibilityAction) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) DelegateType createDelegateType(DelegateType delegateType) throws RiceIllegalArgumentException, RiceIllegalStateException
RiceIllegalArgumentException
RiceIllegalStateException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) DelegateType updateDelegateType(DelegateType delegateType) throws RiceIllegalArgumentException, RiceIllegalStateException
RiceIllegalArgumentException
RiceIllegalStateException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) void removePrincipalFromRole(String principalId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) void removeGroupFromRole(String groupId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) void removeRoleFromRole(String roleId, String namespaceCode, String roleName, Map<String,String> qualifications) throws RiceIllegalArgumentException
RiceIllegalArgumentException
@CacheEvict(value={"http://rice.kuali.org/kim/v2_0/RoleType","http://rice.kuali.org/kim/v2_0/RoleMembershipType","http://rice.kuali.org/kim/v2_0/RoleMemberType","http://rice.kuali.org/kim/v2_0/DelegateMemberType","http://rice.kuali.org/kim/v2_0/RoleResponsibilityType","http://rice.kuali.org/kim/v2_0/DelegateTypeType"}, allEntries=true) void assignPermissionToRole(String permissionId, String roleId) throws RiceIllegalArgumentException
RiceIllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |