RoleTypeService

Name RoleType
Version
Included Services KimTypeService
Java Package org.kuali.rice.kim.framework.role

A {@link KimTypeService} with specific methods for Roles.

Operations
Main Message Structures

Method doesRoleQualifierMatchQualification
Description Gets whether a role assignment with the given qualifier is applicable for the given qualification.

For example, the qualifier for a role could be as follows:
chartOfAccountsCode = BL
organizationCode = ARSC
descendsHierarchy = true

The qualification could be:
chartOfAccountsCode = BL
organizationCode = PSY (reports to BL-ARSC)

This method would return true for this set of arguments. This would require a query of
the KFS organization hierarchy, so an implementation of this sort must be done by
a service which lives within KFS and will be called remotely by KIM.

The contents of the passed in attribute sets should not be modified as they may be used in future calls by
the role service.
Parameters Map qualification the qualification. cannot be null.
Map roleQualifier the role qualifier. cannot be null.
Return boolean true if the qualifications match
Errors RiceIllegalArgumentException if the qualification or roleQualifier is null

Back to Operations

Method getMatchingRoleMemberships
Description Gets whether a role membership with the given details is applicable for the given qualification.
Parameters Map qualification the qualification. cannot be null.
RoleMembershipList roleMemberships the list of roleMemberships to check for matches. cannot be null.
Return RoleMembershipList an immutable list of matched roleMemberships. will not return null.
Errors RiceIllegalArgumentException if the qualification or roleMemberships is null.

Back to Operations

Method isDerivedRoleType
Description Returns true if this role type represents a "derived" role type. That is, the members of the
role are known to the host application, not to KIM. This is needed for cases like the KFS
Fiscal Officer, where the members of the role are in the Account table in the KFS database.
Parameters None None No Parameters
Return boolean true if derived type
Errors NONE No Errors

Back to Operations

Method hasDerivedRole
Description This method can be used to check if the given principal has this derived role. It is designed to be used in case
there is a more efficient way to check for whether a principal is in a role rather than retrieving all the
members of the role and checking against that.

The groupIds parameter is intended to be the complete list of groups to which the principal belongs. If either the
principalId or the groupIds parameters are blank/empty, that parameter should be ignored.
Parameters String principalId the principalId. cannot be null or blank.
StringList groupIds the groupIds the principal is a member of. cannot be null.
String namespaceCode the namespace code the role is in. cannot be blank or null.
String roleName the name of the role. cannot be blank or null.
Map qualification the qualification. cannot be null.
Return boolean if the principal has a derived role.
Errors RiceIllegalArgumentException if the principalId, namespaceCode, roleName is blank or null.

Back to Operations

Method getRoleMembersFromDerivedRole
Description ???
Parameters String namespaceCode ???
String roleName ???
Map qualification ???
Return RoleMembershipList ???
Errors RiceIllegalArgumentException ???

Back to Operations

Method sortRoleMembers
Description For roles where the order of members returned may be meaningful,
this method provides a hook to sort the results before they
are returned from getRoleMembers on the RoleService.

This method may alter the passed in list directly and return it rather than
allocating a new list.

This is also the place where the roleSortingCode property on the RoleMembershipInfo objects can be
populated in preparation for routing if not all members of this role should be group as separate
units for routing.
Parameters RoleMembershipList roleMembers ???
Return RoleMembershipList an immutable list of matched roleMemberships. will not return null.
Errors RiceIllegalArgumentException if the roleMemberships is null.

Back to Operations

Method convertQualificationForMemberRoles
Description Takes the passed in qualifications and converts them, if necessary, for any downstream roles which may be present.
Parameters String namespaceCode the namespace code the role is in. cannot be blank or null.
String roleName the name of the role. cannot be blank or null.
String memberRoleNamespaceCode the namespace code the member role is in. cannot be blank or null.
String memberRoleName the name of the member role. cannot be blank or null.
Map qualification the qualification. cannot be null.
Return Map an immutable map of qualifiers. Will never return null.
Errors RiceIllegalArgumentException if the namespaceCode, roleName, memberRoleNamespaceCode, memberRoleName is blank or null.

Back to Operations

Method dynamicRoleMembership
Description Determines if the role specified by the given namespace and role name has a dynamic role membership.

A dynamic role membership means that a role membership may be changed over time and cannot be safely cached.
Parameters String namespaceCode the namespace code of the role. cannot be null or blank
String roleName the name of the role. cannot be null or blank.
Return boolean true if the membership results of the Role are dynamic, false otherwise
Errors RiceIllegalArgumentException ???

Back to Operations

Method getQualifiersForExactMatch
Description Roles whose memberships may be matched exactly by qualifiers,
this method returns the list of such qualifier names.
Parameters None None No Parameters
Return StringList immutable list of qualifier names that can be used for exact match. Will never return null.
Errors NONE No Errors

Back to Operations