|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.kew.engine.node.service.impl.RouteNodeServiceImpl
public class RouteNodeServiceImpl
| Nested Class Summary | |
|---|---|
private static class |
RouteNodeServiceImpl.NodeInstanceIdSorter
|
private static class |
RouteNodeServiceImpl.RouteNodeSorter
Sorts by RouteNodeId or the order the nodes will be evaluated in *roughly*. |
| Field Summary | |
|---|---|
private RouteHelper |
helper
|
protected org.apache.log4j.Logger |
LOG
|
private static Comparator |
NODE_INSTANCE_BACKWARD_SORT
|
private static Comparator |
NODE_INSTANCE_FORWARD_SORT
|
static String |
REVOKED_NODE_INSTANCES_STATE_KEY
|
private RouteNodeDAO |
routeNodeDAO
|
| Constructor Summary | |
|---|---|
RouteNodeServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
deleteByRouteNodeInstance(RouteNodeInstance routeNodeInstance)
|
void |
deleteNodeStateById(Long nodeStateId)
|
void |
deleteNodeStates(List statesToBeDeleted)
|
private void |
determineExactPath(List exactPath,
Map<Long,RouteNodeInstance> visited,
Collection startingNodeInstances,
RouteNodeInstance nodeInstance)
|
private List |
determineExactPath(NodeGraphContext context,
int searchDirection,
Collection startingNodeInstances)
|
List |
findFinalApprovalRouteNodes(Long documentTypeId)
|
List<String> |
findFutureNodeNames(Long 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)
|
private List<RouteNode> |
findNextRouteNodesInPath(String nodeName,
RouteNode node,
Set<Long> inspected)
|
NodeState |
findNodeState(Long nodeInstanceId,
String key)
|
Set |
findPreviousNodeNames(Long documentId)
|
List |
findProcessNodeInstances(RouteNodeInstance process)
|
RouteNode |
findRouteNodeById(Long nodeId)
|
RouteNode |
findRouteNodeByName(Long documentTypeId,
String name)
|
RouteNodeInstance |
findRouteNodeInstanceById(Long nodeInstanceId)
|
RouteNodeInstance |
findRouteNodeInstanceById(Long nodeInstanceId,
DocumentRouteHeaderValue document)
This method looks though the passed in DocumentRouteHeaderValue and retrieves a nodeInstance that matches the ID passed in. |
List |
findRouteNodeInstances(Long documentId)
|
private void |
flattenNodeGraph(Map<String,RouteNode> nodes,
RouteNode node)
Recursively walks the node graph and builds up the map. |
private void |
flattenNodeInstanceGraph(List<RouteNodeInstance> nodeInstances,
Set<Long> visitedNodeInstanceIds,
RouteNodeInstance nodeInstance,
boolean includeProcesses)
|
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(Long documentId)
Retrieves the active node instances of the given Document. |
List |
getCurrentNodeInstances(Long 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(Process process)
|
List |
getInitialNodeInstances(Long 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(Long documentId)
Retrieves the terminal node instances of the given Document. |
boolean |
isNodeInPath(DocumentRouteHeaderValue document,
String nodeName)
|
void |
revokeNodeInstance(DocumentRouteHeaderValue document,
RouteNodeInstance nodeInstance)
Records the revocation in the root BranchState of the document. |
void |
save(Branch branch)
|
void |
save(NodeState nodeState)
|
void |
save(RouteNode node)
|
void |
save(RouteNodeInstance nodeInstance)
|
NodeGraphSearchResult |
searchNodeGraph(NodeGraphSearchCriteria criteria)
|
private void |
searchNodeGraphBackward(NodeGraphContext context,
NodeMatcher matcher)
|
private void |
searchNodeGraphBackward(NodeGraphContext context,
NodeMatcher matcher,
RouteNodeInstance previousNodeInstance,
Collection nodeInstances)
|
void |
setRouteNodeDAO(RouteNodeDAO dao)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.log4j.Logger LOG
public static final String REVOKED_NODE_INSTANCES_STATE_KEY
private static final Comparator NODE_INSTANCE_FORWARD_SORT
private static final Comparator NODE_INSTANCE_BACKWARD_SORT
private RouteHelper helper
private RouteNodeDAO routeNodeDAO
| Constructor Detail |
|---|
public RouteNodeServiceImpl()
| Method Detail |
|---|
public void save(RouteNode node)
save in interface RouteNodeServicepublic void save(RouteNodeInstance nodeInstance)
save in interface RouteNodeServicepublic void save(NodeState nodeState)
save in interface RouteNodeServicepublic void save(Branch branch)
save in interface RouteNodeServicepublic RouteNode findRouteNodeById(Long nodeId)
findRouteNodeById in interface RouteNodeServicepublic RouteNodeInstance findRouteNodeInstanceById(Long nodeInstanceId)
findRouteNodeInstanceById in interface RouteNodeService
public RouteNodeInstance findRouteNodeInstanceById(Long nodeInstanceId,
DocumentRouteHeaderValue document)
RouteNodeService
findRouteNodeInstanceById in interface RouteNodeServicepublic List getCurrentNodeInstances(Long documentId)
RouteNodeService
getCurrentNodeInstances in interface RouteNodeServicepublic List<RouteNodeInstance> getActiveNodeInstances(Long documentId)
RouteNodeService
getActiveNodeInstances in interface RouteNodeServicedocumentId - of the document
public List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document)
getActiveNodeInstances in interface RouteNodeServicepublic List<RouteNodeInstance> getTerminalNodeInstances(Long documentId)
RouteNodeService
getTerminalNodeInstances in interface RouteNodeServicedocumentId - for the given Document
public List getInitialNodeInstances(Long documentId)
RouteNodeService
getInitialNodeInstances in interface RouteNodeService
public NodeState findNodeState(Long nodeInstanceId,
String key)
findNodeState in interface RouteNodeService
public RouteNode findRouteNodeByName(Long documentTypeId,
String name)
findRouteNodeByName in interface RouteNodeServicepublic List findFinalApprovalRouteNodes(Long documentTypeId)
findFinalApprovalRouteNodes in interface RouteNodeService
public List findNextRouteNodesInPath(RouteNodeInstance nodeInstance,
String nodeName)
findNextRouteNodesInPath in interface RouteNodeService
private List<RouteNode> findNextRouteNodesInPath(String nodeName,
RouteNode node,
Set<Long> inspected)
public boolean isNodeInPath(DocumentRouteHeaderValue document,
String nodeName)
isNodeInPath in interface RouteNodeServicepublic List findRouteNodeInstances(Long documentId)
findRouteNodeInstances in interface RouteNodeServicepublic void setRouteNodeDAO(RouteNodeDAO dao)
public List findProcessNodeInstances(RouteNodeInstance process)
findProcessNodeInstances in interface RouteNodeServicepublic Set findPreviousNodeNames(Long documentId)
findPreviousNodeNames in interface RouteNodeServicepublic List<String> findFutureNodeNames(Long documentId)
RouteNodeService
findFutureNodeNames in interface RouteNodeService
public List<RouteNode> getFlattenedNodes(DocumentType documentType,
boolean climbHierarchy)
RouteNodeService
getFlattenedNodes in interface RouteNodeServicedocumentType - DocumentType who's nodes will be flattened.climbHierarchy - whether to include the parents nodes if the passed in DocumentType contains no nodes
public List<RouteNode> getFlattenedNodes(Process process)
getFlattenedNodes in interface RouteNodeService
private void flattenNodeGraph(Map<String,RouteNode> nodes,
RouteNode node)
public List<RouteNodeInstance> getFlattenedNodeInstances(DocumentRouteHeaderValue document,
boolean includeProcesses)
RouteNodeService
getFlattenedNodeInstances in interface RouteNodeServicedocument - route header valueincludeProcesses - flag
private void flattenNodeInstanceGraph(List<RouteNodeInstance> nodeInstances,
Set<Long> visitedNodeInstanceIds,
RouteNodeInstance nodeInstance,
boolean includeProcesses)
public NodeGraphSearchResult searchNodeGraph(NodeGraphSearchCriteria criteria)
searchNodeGraph in interface RouteNodeService
private void searchNodeGraphBackward(NodeGraphContext context,
NodeMatcher matcher,
RouteNodeInstance previousNodeInstance,
Collection nodeInstances)
private void searchNodeGraphBackward(NodeGraphContext context,
NodeMatcher matcher)
public List<RouteNodeInstance> getActiveNodeInstances(DocumentRouteHeaderValue document,
String nodeName)
RouteNodeService
getActiveNodeInstances in interface RouteNodeService
private List determineExactPath(NodeGraphContext context,
int searchDirection,
Collection startingNodeInstances)
private void determineExactPath(List exactPath,
Map<Long,RouteNodeInstance> visited,
Collection startingNodeInstances,
RouteNodeInstance nodeInstance)
public void deleteByRouteNodeInstance(RouteNodeInstance routeNodeInstance)
deleteByRouteNodeInstance in interface RouteNodeServicepublic void deleteNodeStateById(Long nodeStateId)
deleteNodeStateById in interface RouteNodeServicepublic void deleteNodeStates(List statesToBeDeleted)
deleteNodeStates in interface RouteNodeService
public void revokeNodeInstance(DocumentRouteHeaderValue document,
RouteNodeInstance nodeInstance)
revokeNodeInstance in interface RouteNodeServicepublic List getRevokedNodeInstances(DocumentRouteHeaderValue document)
getRevokedNodeInstances in interface RouteNodeServicerevokeNodeInstance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||