org.kuali.rice.kew.engine.node
Class RouteNodeUtils

java.lang.Object
  extended by org.kuali.rice.kew.engine.node.RouteNodeUtils

public final class RouteNodeUtils
extends Object

A simple class for performing operations on RouteNode. In particular, this class provides some convenience methods for processing custom RouteNode XML content fragments.

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

Method Summary
static RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId, DocumentRouteHeaderValue document)
           
static List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document)
           
static Element getCustomRouteNodeElement(RouteNode routeNode, String elementName)
           
static List<Element> getCustomRouteNodeElements(RouteNode routeNode, String elementName)
           
static List<RouteNodeInstance> getFlattenedNodeInstances(DocumentRouteHeaderValue document, boolean includeProcesses)
           
static List<RouteNode> getFlattenedNodes(DocumentType documentType, boolean climbHierarchy)
           
static List<RouteNode> getFlattenedNodes(ProcessDefinitionBo process)
           
static String getValueOfCustomProperty(RouteNode routeNode, String propertyName)
          Searches a RouteNode's "contentFragment" (it's XML definition) for an XML element with the given name and returns it's value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValueOfCustomProperty

public static String getValueOfCustomProperty(RouteNode routeNode,
                                              String propertyName)
Searches a RouteNode's "contentFragment" (it's XML definition) for an XML element with the given name and returns it's value.

For example, in a node with the following definition:


   ...
   propertyValue
 

An invocation of getValueOfCustomProperty(routeNode, "myCustomProperty") would return "propertyValue".

Parameters:
routeNode - RouteNode to examine
propertyName - name of the XML element to search for
Returns:
the value of the XML element, or null if it could not be located

getCustomRouteNodeElements

public static List<Element> getCustomRouteNodeElements(RouteNode routeNode,
                                                       String elementName)

getCustomRouteNodeElement

public static Element getCustomRouteNodeElement(RouteNode routeNode,
                                                String elementName)

getFlattenedNodeInstances

public static List<RouteNodeInstance> getFlattenedNodeInstances(DocumentRouteHeaderValue document,
                                                                boolean includeProcesses)

getFlattenedNodes

public static List<RouteNode> getFlattenedNodes(DocumentType documentType,
                                                boolean climbHierarchy)

getFlattenedNodes

public static List<RouteNode> getFlattenedNodes(ProcessDefinitionBo process)

getActiveNodeInstances

public static List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document)

findRouteNodeInstanceById

public static RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId,
                                                          DocumentRouteHeaderValue document)


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