edu.sampleu.travel.workflow
Class AccountAttribute
java.lang.Object
org.kuali.rice.kew.rule.AbstractWorkflowAttribute
org.kuali.rice.kew.rule.AbstractRoleAttribute
edu.sampleu.travel.workflow.AccountAttribute
- All Implemented Interfaces:
- Serializable, RoleAttribute, WorkflowRuleAttribute
public class AccountAttribute
- extends AbstractRoleAttribute
Resolves FO's using the accounts associated with the document XPath xpath =
KualiWorkflowUtils.getXPath(documentContent.getDocument()); List qualifiers = new ArrayList(); NodeList
accountNums = (NodeList)xstreamSafeEval(xpath, "//edu.sampleu.travel.workflow.bo.TravelAccount/number",
documentContent.getDocument(), XPathConstants.NODESET); for (int i = 0; i < accountNums.getLength(); i++) { Node accountNum =
accountNums.item(i); String accuntNumVal = accountNum.getNodeValue(); }
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccountAttribute
public AccountAttribute()
getQualifiedRoleNames
public List<String> getQualifiedRoleNames(String roleName,
DocumentContent documentContent)
- Description copied from interface:
RoleAttribute
- Returns a String which represent the qualified role name of this role for the given
roleName and docContent.
- Parameters:
roleName
- the role name (without class prefix)documentContent
- the document content
getRoleNames
public List<RoleName> getRoleNames()
- Description copied from interface:
RoleAttribute
- List of
RoleName
s this RoleAttribute supports
- Returns:
- list of
RoleName
s this RoleAttribute supports
resolveQualifiedRole
public ResolvedQualifiedRole resolveQualifiedRole(RouteContext routeContext,
String roleName,
String qualifiedRole)
- Description copied from interface:
RoleAttribute
- Returns 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 the RoleAttribute.getQualifiedRoleNames(String, DocumentContent)
method
- Returns:
- ResolvedQualifiedRole containing recipients, role label (most likely the roleName), and an annotation
xstreamSafeEval
public static final Object xstreamSafeEval(XPath xpath,
String xpathExpression,
Object item,
QName returnType)
- This method will do a simple XPath.evaluate, while wrapping your xpathExpression with the xstreamSafe function. It assumes a
String result, and will return such. If an XPathExpressionException is thrown, this will be re-thrown within a
RuntimeException.
- Parameters:
xpath
- A correctly initialized XPath instance.xpathExpression
- Your XPath Expression that needs to be wrapped in an xstreamSafe wrapper and run.item
- The document contents you will be searching within.
- Returns:
- The string value of the xpath.evaluate().
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.