Class XPathHelper

java.lang.Object
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 Details

    • XPathHelper

      public XPathHelper()
  • Method Details

    • 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.