org.kuali.rice.kew.engine
Class CompatUtils

java.lang.Object
  extended by org.kuali.rice.kew.engine.CompatUtils

public final class CompatUtils
extends Object

Provides utility methods for handling backwards compatibility between KEW releases. Currently, it's primary function is to handle backward compatability between the deprecated "route level" concept and the "node" concept which was introduced in KEW 2.1.

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

Method Summary
static Integer getLevelForNode(DocumentType documentType, String nodeName)
           
static int getMaxRouteLevel(DocumentType documentType)
           
static RouteNode getNodeForLevel(DocumentType documentType, Integer routeLevel)
          Returns the RouteNode at the given numerical route level for the given document type.
static List<RouteNode> getRouteLevelCompatibleNodeList(DocumentType documentType)
          Returns a list of RouteNodes in a flat list which is equivalent to the route level concept of Workflow <= version 2.0.
static boolean isNodalDocument(DocumentRouteHeaderValue document)
           
static boolean isNodalRequest(ActionRequestValue request)
           
static boolean isRouteLevelCompatible(DocumentRouteHeaderValue document)
           
static boolean isRouteLevelCompatible(DocumentType documentType)
           
static boolean isRouteLevelDocument(DocumentRouteHeaderValue document)
           
static boolean isRouteLevelRequest(ActionRequestValue request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLevelForNode

public static Integer getLevelForNode(DocumentType documentType,
                                      String nodeName)

getNodeForLevel

public static RouteNode getNodeForLevel(DocumentType documentType,
                                        Integer routeLevel)
Returns the RouteNode at the given numerical route level for the given document type. This currently throws a WorkflowException if the document has parallel routing structures because the route level as a number becomes arbitrary in that case.


isRouteLevelCompatible

public static boolean isRouteLevelCompatible(DocumentType documentType)

isRouteLevelCompatible

public static boolean isRouteLevelCompatible(DocumentRouteHeaderValue document)

isNodalDocument

public static boolean isNodalDocument(DocumentRouteHeaderValue document)

isNodalRequest

public static boolean isNodalRequest(ActionRequestValue request)

isRouteLevelDocument

public static boolean isRouteLevelDocument(DocumentRouteHeaderValue document)

isRouteLevelRequest

public static boolean isRouteLevelRequest(ActionRequestValue request)

getRouteLevelCompatibleNodeList

public static List<RouteNode> getRouteLevelCompatibleNodeList(DocumentType documentType)
Returns a list of RouteNodes in a flat list which is equivalent to the route level concept of Workflow <= version 2.0. If the document type is not route level compatible, then this method will throw an error.


getMaxRouteLevel

public static int getMaxRouteLevel(DocumentType documentType)


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