Package org.kuali.rice.kew.rule
Class UnqualifiedRoleAttribute
java.lang.Object
org.kuali.rice.kew.rule.AbstractWorkflowAttribute
org.kuali.rice.kew.rule.AbstractRoleAttribute
org.kuali.rice.kew.rule.UnqualifiedRoleAttribute
- All Implemented Interfaces:
Serializable,RoleAttribute,WorkflowRuleAttribute
- Direct Known Subclasses:
RoutedByUserRoleAttribute
A simple base RoleAttribute implementation for roles that do not need to be qualified
prior to resolution.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsFields inherited from class org.kuali.rice.kew.rule.AbstractWorkflowAttribute
required -
Constructor Summary
ConstructorsConstructorDescriptionNo-arg constructor for subclasses that will overridegetRoleNames()to provide their own roles listUnqualifiedRoleAttribute(List<RoleName> roles) Constructor for subclasses that can provide a role list at construction time -
Method Summary
Modifier and TypeMethodDescriptiongetQualifiedRoleNames(String roleName, DocumentContent documentContent) Returns a List<String> containing only the roleName parameter; i.e. no qualification occursList ofRoleNames this RoleAttribute supportsprotected booleanisValidRoleName(String roleName) protected StringparseRoleNameFromClassAndRole(String classAndRole) Helper method for parsing the actual role name out from the class/rolename combination as Role class combines the two and does expose the original role nameresolveQualifiedRole(RouteContext routeContext, String roleName, String qualifiedRole) Returns a List of Workflow Users which are members of the given qualified role.protected abstract ResolvedQualifiedRoleresolveRole(RouteContext routeContext, String roleName) Template method for subclasses to implementMethods inherited from class org.kuali.rice.kew.rule.AbstractRoleAttribute
isMatchMethods inherited from class org.kuali.rice.kew.rule.AbstractWorkflowAttribute
getDocContent, getIdFieldName, getLockFieldName, getRoutingDataRows, getRuleExtensionValues, getRuleRows, isRequired, setRequired, validateRoutingData, validateRuleDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.kew.rule.WorkflowRuleAttribute
getDocContent, getRoutingDataRows, getRuleExtensionValues, getRuleRows, isRequired, setRequired, validateRoutingData, validateRuleData
-
Field Details
-
roles
-
-
Constructor Details
-
UnqualifiedRoleAttribute
public UnqualifiedRoleAttribute()No-arg constructor for subclasses that will overridegetRoleNames()to provide their own roles list -
UnqualifiedRoleAttribute
Constructor for subclasses that can provide a role list at construction time
-
-
Method Details
-
getRoleNames
Description copied from interface:RoleAttributeList ofRoleNames this RoleAttribute supports- Returns:
- list of
RoleNames this RoleAttribute supports
-
getQualifiedRoleNames
Returns a List<String> containing only the roleName parameter; i.e. no qualification occurs- Parameters:
roleName- the role name (without class prefix)documentContent- the document content
-
parseRoleNameFromClassAndRole
Helper method for parsing the actual role name out from the class/rolename combination as Role class combines the two and does expose the original role name- Parameters:
classAndRole- the class and role string (e.g. org.blah.MyRoleAttribute!SOME_ROLE_NAME)- Returns:
- the role name portion of the class and role string (e.g. SOME_ROLE_NAME);
-
isValidRoleName
- Parameters:
roleName- roleName to test- Returns:
- whether the roleName specifies a role that this attribute can resolve
-
resolveQualifiedRole
public ResolvedQualifiedRole resolveQualifiedRole(RouteContext routeContext, String roleName, String qualifiedRole) Description copied from interface:RoleAttributeReturns a List of Workflow Users which are members of the given qualified role.- Parameters:
routeContext- the RouteContextroleName- the roleName (without class prefix)qualifiedRole- one of the the qualified role names returned from theRoleAttribute.getQualifiedRoleNames(String, DocumentContent)method- Returns:
- ResolvedQualifiedRole containing recipients, role label (most likely the roleName), and an annotation
-
resolveRole
Template method for subclasses to implement- Parameters:
routeContext- the RouteContextroleName- the role name- Returns:
- a ResolvedQualifiedRole
-