org.kuali.rice.kew.engine.node.service
Interface RouteNodeService

All Known Implementing Classes:
RouteNodeServiceImpl

public interface RouteNodeService

A service which provides data access for RouteNode, RouteNodeInstance, NodeState, and Branch objects.

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

Method Summary
 void deleteByRouteNodeInstance(RouteNodeInstance routeNodeInstance)
           
 void deleteNodeStateById(Long nodeStateId)
           
 void deleteNodeStates(List statesToBeDeleted)
           
 List<RouteNode> findFinalApprovalRouteNodes(String documentTypeId)
           
 List<String> findFutureNodeNames(String documentId)
          Returns a List of the distinct node names through which this document might pass in it's future routing.
 List findNextRouteNodesInPath(RouteNodeInstance nodeInstance, String nodeName)
           
 NodeState findNodeState(Long nodeInstanceId, String key)
           
 List<String> findPreviousNodeNames(String documentId)
           
 List findProcessNodeInstances(RouteNodeInstance process)
           
 RouteNode findRouteNodeById(String nodeId)
           
 RouteNode findRouteNodeByName(String documentTypeId, String name)
           
 RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId)
           
 RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId, DocumentRouteHeaderValue document)
          This method looks though the passed in DocumentRouteHeaderValue and retrieves a nodeInstance that matches the ID passed in.
 List findRouteNodeInstances(String documentId)
           
 List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document)
           
 List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document, String nodeName)
          Returns a list of active node instances associated with the document that are active
 List<RouteNodeInstance> getActiveNodeInstances(String documentId)
          Retrieves the active node instances of the given Document.
 List<RouteNodeInstance> getCurrentNodeInstances(String documentId)
          Returns the node instances representing the most recent node instances in the document.
 List<RouteNodeInstance> getFlattenedNodeInstances(DocumentRouteHeaderValue document, boolean includeProcesses)
          Returns a flattened list of RouteNodeInstances on the given document.
 List<RouteNode> getFlattenedNodes(DocumentType documentType, boolean climbHierarchy)
          Flatten all the document types route nodes into a single List.
 List<RouteNode> getFlattenedNodes(ProcessDefinitionBo process)
           
 List getInitialNodeInstances(String documentId)
          Retrieves the initial node instances of the given document.
 List getRevokedNodeInstances(DocumentRouteHeaderValue document)
          Returns a List of the revoked RouteNodeInstances on the given Document.
 List<RouteNodeInstance> getTerminalNodeInstances(String documentId)
          Retrieves the terminal node instances of the given Document.
 boolean isNodeInPath(DocumentRouteHeaderValue document, String nodeName)
           
 void revokeNodeInstance(DocumentRouteHeaderValue document, RouteNodeInstance nodeInstance)
          Record that the given RouteNodeInstance on the Document was revoked.
 void save(Branch branch)
           
 void save(NodeState nodeState)
           
 void save(RouteNode node)
           
 void save(RouteNodeInstance nodeInstance)
           
 NodeGraphSearchResult searchNodeGraph(NodeGraphSearchCriteria criteria)
           
 

Method Detail

save

void save(RouteNode node)

save

void save(RouteNodeInstance nodeInstance)

save

void save(NodeState nodeState)

save

void save(Branch branch)

findRouteNodeById

RouteNode findRouteNodeById(String nodeId)

findRouteNodeInstanceById

RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId)

findRouteNodeInstanceById

RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId,
                                            DocumentRouteHeaderValue document)
This method looks though the passed in DocumentRouteHeaderValue and retrieves a nodeInstance that matches the ID passed in.

Parameters:
nodeInstanceId -
document -
Returns:

getInitialNodeInstances

List getInitialNodeInstances(String documentId)
Retrieves the initial node instances of the given document. The initial node instances are those node instances which are at the very beginning of the route. Usually, this will just be a single node instance.


getActiveNodeInstances

List<RouteNodeInstance> getActiveNodeInstances(String documentId)
Retrieves the active node instances of the given Document. The active node instances represent where in the route path the document is currently located.

Parameters:
documentId - of the document
Returns:
list of route node instances

getActiveNodeInstances

List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document)

getTerminalNodeInstances

List<RouteNodeInstance> getTerminalNodeInstances(String documentId)
Retrieves the terminal node instances of the given Document. The terminal node instances are nodes in the route path which are both inactive and complete and have no next nodes in their path. Terminal node instances will typically only exist on documents which are no longer Enroute.

Parameters:
documentId - for the given Document
Returns:
list of terminal node instances

getCurrentNodeInstances

List<RouteNodeInstance> getCurrentNodeInstances(String documentId)
Returns the node instances representing the most recent node instances in the document. The algorithm for locating the current nodes is as follows: If the document has active node instances, return those, otherwise return it's terminal node instances.


findNodeState

NodeState findNodeState(Long nodeInstanceId,
                        String key)

findRouteNodeByName

RouteNode findRouteNodeByName(String documentTypeId,
                              String name)

findFinalApprovalRouteNodes

List<RouteNode> findFinalApprovalRouteNodes(String documentTypeId)

findNextRouteNodesInPath

List findNextRouteNodesInPath(RouteNodeInstance nodeInstance,
                              String nodeName)

isNodeInPath

boolean isNodeInPath(DocumentRouteHeaderValue document,
                     String nodeName)

findRouteNodeInstances

List findRouteNodeInstances(String documentId)

findProcessNodeInstances

List findProcessNodeInstances(RouteNodeInstance process)

findPreviousNodeNames

List<String> findPreviousNodeNames(String documentId)

findFutureNodeNames

List<String> findFutureNodeNames(String documentId)
Returns a List of the distinct node names through which this document might pass in it's future routing. In certain cases this will be an approximation based on what the system knows at the time of execution.


getFlattenedNodes

List<RouteNode> getFlattenedNodes(DocumentType documentType,
                                  boolean climbHierarchy)
Flatten all the document types route nodes into a single List. This includes all processes on the DocumentType.

Parameters:
documentType - DocumentType who's nodes will be flattened.
climbHierarchy - whether to include the parents nodes if the passed in DocumentType contains no nodes
Returns:
List or empty List

getFlattenedNodes

List<RouteNode> getFlattenedNodes(ProcessDefinitionBo process)

getFlattenedNodeInstances

List<RouteNodeInstance> getFlattenedNodeInstances(DocumentRouteHeaderValue document,
                                                  boolean includeProcesses)
Returns a flattened list of RouteNodeInstances on the given document. If the includeProcesses flag is true than this method includes process RouteNodeInstances, otherwise they are excluded. which are processes.

Parameters:
document - route header value
includeProcesses - flag
Returns:
list of routeNodeInstances

searchNodeGraph

NodeGraphSearchResult searchNodeGraph(NodeGraphSearchCriteria criteria)

getActiveNodeInstances

List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document,
                                               String nodeName)
Returns a list of active node instances associated with the document that are active

Parameters:
document -
nodeName -
Returns:

deleteByRouteNodeInstance

void deleteByRouteNodeInstance(RouteNodeInstance routeNodeInstance)

deleteNodeStateById

void deleteNodeStateById(Long nodeStateId)

deleteNodeStates

void deleteNodeStates(List statesToBeDeleted)

revokeNodeInstance

void revokeNodeInstance(DocumentRouteHeaderValue document,
                        RouteNodeInstance nodeInstance)
Record that the given RouteNodeInstance on the Document was revoked. This will happen when an action such as Return to Previous or Move Document bypasses the given RouteNodeInstance on it's path back to a previous point in the history of the document's route path.


getRevokedNodeInstances

List getRevokedNodeInstances(DocumentRouteHeaderValue document)
Returns a List of the revoked RouteNodeInstances on the given Document.

See Also:
revokeNodeInstance


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