org.kuali.rice.kew.rule.xmlrouting
Class XPathHelper

java.lang.Object
  extended by org.kuali.rice.kew.rule.xmlrouting.XPathHelper

public class XPathHelper
extends Object

Provides utilities for obtaining XPath instances which are "good-to-go" with access to the Workflow namespace and custom XPath functions.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
XPathHelper()
           
 
Method Summary
static WorkflowFunctionResolver extractFunctionResolver(XPath xPath)
          A utility to extract the WorkflowFunctionResolver from the given XPath instances.
static boolean hasWorkflowFunctionResolver(XPath xPath)
          Returns true if the given XPath instance has a WorkflowFunctionResolver, false otherwise.
static XPath newXPath()
          Creates a new XPath instance and initializes it with the WorkflowNamespaceContext and the WorkflowFunctionResolver.
static XPath newXPath(Node rootNode)
          Creates a new XPath instances and initializes it with the WorkflowNamespaceContext and the WorkflowFunctionResolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathHelper

public XPathHelper()
Method Detail

newXPath

public static XPath newXPath()
Creates a new XPath instance and initializes it with the WorkflowNamespaceContext and the WorkflowFunctionResolver.


newXPath

public static XPath newXPath(Node rootNode)
Creates a new XPath instances and initializes it with the WorkflowNamespaceContext and the WorkflowFunctionResolver. Also sets the root node on the WorkflowFunctionResolver to the given Node. This is required for some of the functions in the function resolver to perform properly.


extractFunctionResolver

public static WorkflowFunctionResolver extractFunctionResolver(XPath xPath)
A utility to extract the WorkflowFunctionResolver from the given XPath instances. If the XPath instance does not contain a WorkflowFunctionResolver, then this method will throw a WorkflowRuntimeException.

Throws:
WorkflowRuntimeException - if the given XPath instance does not contain a WorklflowFunctionResolver

hasWorkflowFunctionResolver

public static boolean hasWorkflowFunctionResolver(XPath xPath)
Returns true if the given XPath instance has a WorkflowFunctionResolver, false otherwise.



Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.