Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2013 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.kuali.rice.kew.engine.node.hierarchyrouting;
 
 import java.util.List;
 
HierarchyProvider is responsible for exposing the hierarchy that the HierarchyRoutingNode climbs/descends.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
 
 public interface HierarchyProvider {
    
Marker interface for objects the represent a "stop" or "node" in a hierarchy. E.g. "unit"
 
     public interface Stop { }

    
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)
 
     public void init(RouteNodeInstance nodeInstanceRouteContext 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
 
     public List<StopgetLeafStops(RouteContext context);

    

Parameters:
nodeInstance the node instance
Returns:
whether stop state is associated with the specified node instance
 
     public boolean hasStop(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
 
     public Stop getStop(RouteNodeInstance nodeInstance);

    
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
 
     public void setStop(RouteNodeInstance requestNodeInstanceStop 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
 
     public String getStopIdentifier(Stop stop);

    

Parameters:
stopId the stop identifier
Returns:
the Stop by stop identifier
 
     public Stop getStopByIdentifier(String stopId);
    

    

Parameters:
stop a stop
Returns:
the parent stop of the specified stop
 
     public Stop getParent(Stop stop);

    

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

Parameters:
a one stop
b another stop
Returns:
whether stops are equivalent
    public boolean equals(Stop aStop b);

    
Configures the single request node definition/prototype used for all node instances

Parameters:
hiearchyNodeInstance the hierarchy node instance
node the request node definition/prototype
    public void configureRequestNode(RouteNodeInstance hiearchyNodeInstanceRouteNode node);
New to GrepCode? Check out our FAQ X