org.kuali.rice.kew.engine.node.service.impl
Class RouteNodeServiceImpl

java.lang.Object
  extended by org.kuali.rice.kew.engine.node.service.impl.RouteNodeServiceImpl
All Implemented Interfaces:
RouteNodeService

public class RouteNodeServiceImpl
extends Object
implements RouteNodeService


Field Summary
protected  org.apache.log4j.Logger LOG
           
static String REVOKED_NODE_INSTANCES_STATE_KEY
           
 
Constructor Summary
RouteNodeServiceImpl()
           
 
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<String> getActiveRouteNodeNames(String documentId)
          Retrieves the names of active node instances for the document with the given id.
 List<RouteNodeInstance> getCurrentNodeInstances(String documentId)
          Returns the node instances representing the most recent node instances in the document.
 List<String> getCurrentRouteNodeNames(String documentId)
          Retrieves the names of the route node instances where the document is currently located for the document with the given id.
 DataObjectService getDataObjectService()
           
 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)
          Queries the list of revoked node instances from the root BranchState of the Document and returns a List of revoked RouteNodeInstances.
 List<RouteNodeInstance> getTerminalNodeInstances(String documentId)
          Retrieves the terminal node instances of the given Document.
 List<String> getTerminalRouteNodeNames(String documentId)
          Retrieves the names of terminal node instances for the document with the given id.
 boolean isNodeInPath(DocumentRouteHeaderValue document, String nodeName)
           
 void revokeNodeInstance(DocumentRouteHeaderValue document, RouteNodeInstance nodeInstance)
          Records the revocation in the root BranchState of the document.
 Branch save(Branch branch)
           
 void save(NodeState nodeState)
           
 RouteNode save(RouteNode node)
           
 RouteNodeInstance save(RouteNodeInstance nodeInstance)
           
 NodeGraphSearchResult searchNodeGraph(NodeGraphSearchCriteria criteria)
           
 void setDataObjectService(DataObjectService dataObjectService)
           
 void setRouteNodeDAO(RouteNodeDAO dao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected final org.apache.log4j.Logger LOG

REVOKED_NODE_INSTANCES_STATE_KEY

public static final String REVOKED_NODE_INSTANCES_STATE_KEY
See Also:
Constant Field Values
Constructor Detail

RouteNodeServiceImpl

public RouteNodeServiceImpl()
Method Detail

save

public RouteNode save(RouteNode node)
Specified by:
save in interface RouteNodeService

save

public RouteNodeInstance save(RouteNodeInstance nodeInstance)
Specified by:
save in interface RouteNodeService

save

public void save(NodeState nodeState)
Specified by:
save in interface RouteNodeService

save

public Branch save(Branch branch)
Specified by:
save in interface RouteNodeService

findRouteNodeById

public RouteNode findRouteNodeById(String nodeId)
Specified by:
findRouteNodeById in interface RouteNodeService

findRouteNodeInstanceById

public RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId)
Specified by:
findRouteNodeInstanceById in interface RouteNodeService

findRouteNodeInstanceById

public RouteNodeInstance findRouteNodeInstanceById(String nodeInstanceId,
                                                   DocumentRouteHeaderValue document)
Description copied from interface: RouteNodeService
This method looks though the passed in DocumentRouteHeaderValue and retrieves a nodeInstance that matches the ID passed in.

Specified by:
findRouteNodeInstanceById in interface RouteNodeService
Returns:

getCurrentNodeInstances

public List<RouteNodeInstance> getCurrentNodeInstances(String documentId)
Description copied from interface: RouteNodeService
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.

Specified by:
getCurrentNodeInstances in interface RouteNodeService

getActiveNodeInstances

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

Specified by:
getActiveNodeInstances in interface RouteNodeService
Parameters:
documentId - of the document
Returns:
list of route node instances

getActiveNodeInstances

public List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document)
Specified by:
getActiveNodeInstances in interface RouteNodeService

getCurrentRouteNodeNames

public List<String> getCurrentRouteNodeNames(String documentId)
Description copied from interface: RouteNodeService
Retrieves the names of the route node instances where the document is currently located for the document with the given id. This could be active nodes in the document if it is in the middle of the routing process or it could be the names of the terminal nodes if the document has completed routing.

Specified by:
getCurrentRouteNodeNames in interface RouteNodeService
Parameters:
documentId - of the document
Returns:
list of names of the current route node instances

getActiveRouteNodeNames

public List<String> getActiveRouteNodeNames(String documentId)
Description copied from interface: RouteNodeService
Retrieves the names of active node instances for the document with the given id. The active node instances represent where in the route path the document is currently located.

Specified by:
getActiveRouteNodeNames in interface RouteNodeService
Parameters:
documentId - of the document
Returns:
list of names of route node instances

getTerminalNodeInstances

public List<RouteNodeInstance> getTerminalNodeInstances(String documentId)
Description copied from interface: RouteNodeService
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.

Specified by:
getTerminalNodeInstances in interface RouteNodeService
Parameters:
documentId - for the given Document
Returns:
list of terminal node instances

getTerminalRouteNodeNames

public List<String> getTerminalRouteNodeNames(String documentId)
Description copied from interface: RouteNodeService
Retrieves the names of terminal node instances for the document with the given id. 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.

Specified by:
getTerminalRouteNodeNames in interface RouteNodeService
Parameters:
documentId - for the given Document
Returns:
list of terminal node instances

getInitialNodeInstances

public List getInitialNodeInstances(String documentId)
Description copied from interface: RouteNodeService
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.

Specified by:
getInitialNodeInstances in interface RouteNodeService

findNodeState

public NodeState findNodeState(Long nodeInstanceId,
                               String key)
Specified by:
findNodeState in interface RouteNodeService

findRouteNodeByName

public RouteNode findRouteNodeByName(String documentTypeId,
                                     String name)
Specified by:
findRouteNodeByName in interface RouteNodeService

findFinalApprovalRouteNodes

public List<RouteNode> findFinalApprovalRouteNodes(String documentTypeId)
Specified by:
findFinalApprovalRouteNodes in interface RouteNodeService

findNextRouteNodesInPath

public List findNextRouteNodesInPath(RouteNodeInstance nodeInstance,
                                     String nodeName)
Specified by:
findNextRouteNodesInPath in interface RouteNodeService

isNodeInPath

public boolean isNodeInPath(DocumentRouteHeaderValue document,
                            String nodeName)
Specified by:
isNodeInPath in interface RouteNodeService

findRouteNodeInstances

public List findRouteNodeInstances(String documentId)
Specified by:
findRouteNodeInstances in interface RouteNodeService

setRouteNodeDAO

public void setRouteNodeDAO(RouteNodeDAO dao)

findProcessNodeInstances

public List findProcessNodeInstances(RouteNodeInstance process)
Specified by:
findProcessNodeInstances in interface RouteNodeService

findPreviousNodeNames

public List<String> findPreviousNodeNames(String documentId)
Specified by:
findPreviousNodeNames in interface RouteNodeService

findFutureNodeNames

public List<String> findFutureNodeNames(String documentId)
Description copied from interface: RouteNodeService
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.

Specified by:
findFutureNodeNames in interface RouteNodeService

getFlattenedNodes

public List<RouteNode> getFlattenedNodes(DocumentType documentType,
                                         boolean climbHierarchy)
Description copied from interface: RouteNodeService
Flatten all the document types route nodes into a single List. This includes all processes on the DocumentType.

Specified by:
getFlattenedNodes in interface RouteNodeService
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

public List<RouteNode> getFlattenedNodes(ProcessDefinitionBo process)
Specified by:
getFlattenedNodes in interface RouteNodeService

getFlattenedNodeInstances

public List<RouteNodeInstance> getFlattenedNodeInstances(DocumentRouteHeaderValue document,
                                                         boolean includeProcesses)
Description copied from interface: RouteNodeService
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.

Specified by:
getFlattenedNodeInstances in interface RouteNodeService
Parameters:
document - route header value
includeProcesses - flag
Returns:
list of routeNodeInstances

searchNodeGraph

public NodeGraphSearchResult searchNodeGraph(NodeGraphSearchCriteria criteria)
Specified by:
searchNodeGraph in interface RouteNodeService

getActiveNodeInstances

public List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document,
                                                      String nodeName)
Description copied from interface: RouteNodeService
Returns a list of active node instances associated with the document that are active

Specified by:
getActiveNodeInstances in interface RouteNodeService
Returns:

deleteByRouteNodeInstance

public void deleteByRouteNodeInstance(RouteNodeInstance routeNodeInstance)
Specified by:
deleteByRouteNodeInstance in interface RouteNodeService

deleteNodeStateById

public void deleteNodeStateById(Long nodeStateId)
Specified by:
deleteNodeStateById in interface RouteNodeService

deleteNodeStates

public void deleteNodeStates(List statesToBeDeleted)
Specified by:
deleteNodeStates in interface RouteNodeService

revokeNodeInstance

public void revokeNodeInstance(DocumentRouteHeaderValue document,
                               RouteNodeInstance nodeInstance)
Records the revocation in the root BranchState of the document.

Specified by:
revokeNodeInstance in interface RouteNodeService

getRevokedNodeInstances

public List getRevokedNodeInstances(DocumentRouteHeaderValue document)
Queries the list of revoked node instances from the root BranchState of the Document and returns a List of revoked RouteNodeInstances.

Specified by:
getRevokedNodeInstances in interface RouteNodeService
See Also:
revokeNodeInstance

getDataObjectService

public DataObjectService getDataObjectService()

setDataObjectService

public void setDataObjectService(DataObjectService dataObjectService)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.