public class XPathQualifierResolver extends Object implements QualifierResolver, XmlConfiguredAttribute
An example of the xml processed by this attribute follows:
/xmlData/chartOrg ./chart ./org
There are 2 different types of qualifier resolvers, those that resolve compound attribute sets and those that resolve simple attribute sets. A simple attribute set is one which includes only a single "qualifier" specification. The example above is compound because it includes both chart and org.
When dealing with compound attribute sets, the baseXPathExpression is used to define grouping for these compound sets. It is therefore required that inside each resulting element retrieved from the baseXPathExpression, there is only a single instance of each qualifier. If this is not the case, an error will be thrown. For the example above, the following XML would be evaluated successfully:
BL BUS IN MED
This would return 2 attributes sets, each with a chart and org in it. The following XML would cause the XPathQualifierResolver to throw an exception during processing.
BL BUS IN MED
In this case the resolver has no knowledge of how to group chart and org together. What follows is an example of a resolver using a simple attribute set:
/xmlData/accountNumbers ./accountNumber
In this example, the following XML would return a List containing an Map The baseXPathExpression is optional and defaults to the root of the document if not specified.
Constructor and Description |
---|
XPathQualifierResolver() |
Modifier and Type | Method and Description |
---|---|
protected void |
handleCompoundMap(Node baseNode,
List<Map<String,String>> maps,
org.kuali.rice.kew.role.XPathQualifierResolver.ResolverConfig config,
XPath xPath) |
protected void |
handleSimpleMap(Node baseNode,
List<Map<String,String>> maps,
org.kuali.rice.kew.role.XPathQualifierResolver.ResolverConfig config,
XPath xPath) |
protected org.kuali.rice.kew.role.XPathQualifierResolver.ResolverConfig |
parseResolverConfig() |
List<Map<String,String>> |
resolve(RouteContext context) |
void |
setExtensionDefinition(ExtensionDefinition ruleAttribute) |
public XPathQualifierResolver()
public List<Map<String,String>> resolve(RouteContext context)
resolve
in interface QualifierResolver
protected void handleCompoundMap(Node baseNode, List<Map<String,String>> maps, org.kuali.rice.kew.role.XPathQualifierResolver.ResolverConfig config, XPath xPath) throws XPathExpressionException
XPathExpressionException
protected void handleSimpleMap(Node baseNode, List<Map<String,String>> maps, org.kuali.rice.kew.role.XPathQualifierResolver.ResolverConfig config, XPath xPath) throws XPathExpressionException
XPathExpressionException
protected org.kuali.rice.kew.role.XPathQualifierResolver.ResolverConfig parseResolverConfig()
public void setExtensionDefinition(ExtensionDefinition ruleAttribute)
setExtensionDefinition
in interface XmlConfiguredAttribute
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.