org.kuali.rice.kew.engine.node.hierarchyrouting
Interface HierarchyProvider


public interface HierarchyProvider

HierarchyProvider is responsible for exposing the hierarchy that the HierarchyRoutingNode climbs/descends.

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

Nested Class Summary
static interface HierarchyProvider.Stop
          Marker interface for objects the represent a "stop" or "node" in a hierarchy.
 
Method Summary
 void configureRequestNode(RouteNodeInstance hiearchyNodeInstance, RouteNode node)
          Configures the single request node definition/prototype used for all node instances
 boolean equals(HierarchyProvider.Stop a, HierarchyProvider.Stop b)
           
 List<HierarchyProvider.Stop> getLeafStops(RouteContext context)
          Find all leaf stops in the xml and convert them into a list of Stop objects
 HierarchyProvider.Stop getParent(HierarchyProvider.Stop stop)
           
 HierarchyProvider.Stop getStop(RouteNodeInstance nodeInstance)
          Returns the Stop at the specified routeNodeInstance, or null if the node instance is not associated with a Stop
 HierarchyProvider.Stop getStopByIdentifier(String stopId)
           
 String getStopIdentifier(HierarchyProvider.Stop stop)
           
 boolean hasStop(RouteNodeInstance nodeInstance)
           
 void init(RouteNodeInstance nodeInstance, RouteContext context)
          Initializer for the hierarchy provider.
 boolean isRoot(HierarchyProvider.Stop stop)
           
 void setStop(RouteNodeInstance requestNodeInstance, HierarchyProvider.Stop stop)
          Set any state necessary on the request node instance for a given stop.
 

Method Detail

init

void init(RouteNodeInstance nodeInstance,
          RouteContext context)
Initializer for the hierarchy provider.

Parameters:
nodeInstance - the HierarchyRouteNode instance
context - the RouteContext (nodeInstance may NOT be the HierarchyRouteNode instance; e.g. when transitioning into)

getLeafStops

List<HierarchyProvider.Stop> getLeafStops(RouteContext context)
Find all leaf stops in the xml and convert them into a list of Stop objects

Parameters:
context - the RouteContext
Returns:
List Stop objects

hasStop

boolean hasStop(RouteNodeInstance nodeInstance)
Parameters:
nodeInstance - the node instance
Returns:
whether stop state is associated with the specified node instance

getStop

HierarchyProvider.Stop getStop(RouteNodeInstance nodeInstance)
Returns the Stop at the specified routeNodeInstance, or null if the node instance is not associated with a Stop

Parameters:
nodeInstance - the node instance to check
Returns:
the Stop at the route node instance

setStop

void setStop(RouteNodeInstance requestNodeInstance,
             HierarchyProvider.Stop stop)
Set any state necessary on the request node instance for a given stop. E.g. for chart/org routing set the org and chart in the node state

Parameters:
requestNodeInstance - the request node instance
stop - the stop for the request node

getStopIdentifier

String getStopIdentifier(HierarchyProvider.Stop stop)
Parameters:
stop - the stop
Returns:
a a string that can be used to uniquely identify the stop. E.g. for chart/org routing, the chart and org

getStopByIdentifier

HierarchyProvider.Stop getStopByIdentifier(String stopId)
Parameters:
stopId - the stop identifier
Returns:
the Stop by stop identifier

getParent

HierarchyProvider.Stop getParent(HierarchyProvider.Stop stop)
Parameters:
stop - a stop
Returns:
the parent stop of the specified stop

isRoot

boolean isRoot(HierarchyProvider.Stop stop)
Parameters:
stop - the stop
Returns:
whether the given stop is the root stop, i.e. has no parents

equals

boolean equals(HierarchyProvider.Stop a,
               HierarchyProvider.Stop b)
Parameters:
a - one stop
b - another stop
Returns:
whether stops are equivalent

configureRequestNode

void configureRequestNode(RouteNodeInstance hiearchyNodeInstance,
                          RouteNode node)
Configures the single request node definition/prototype used for all node instances

Parameters:
hiearchyNodeInstance - the hierarchy node instance
node - the request node definition/prototype


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