| |
|
| java.lang.Object xflow.common.Node
Node | public class Node implements Serializable(Code) | | The Node class represents a node in a directed graph.
A directed graph is used to represent a workflow model.
|
Node | public Node(int nodeId)(Code) | | Constructs a new node
int nodeId |
addDestination | public void addDestination(Node node, String rule)(Code) | | Adds a destination and a rule to evaluate a workflowobject's
transition to this destination.
Parameters: Node - node The destination node Parameters: String - rule The rule for reaching this destination |
addFromNode | public void addFromNode(Node n)(Code) | | Adds a fromNode to this node
Parameters: Node - node The from node |
detectCycle | public boolean detectCycle()(Code) | | Detects if the graph contains cycles.
|
expand | public void expand(int gid, Connection con)(Code) | | Recursively loads this node and all nodes reachable from this node
from database.
int gid The graph ID |
getContainee | public String getContainee()(Code) | | Returns the node's containee graph name. Only valid if node's type is CONTAINER
containee |
getContaineeVersion | public int getContaineeVersion()(Code) | | Returns the node's containee graph version. Only valid if node's type is CONTAINER
containeeVersion |
getDescription | public String getDescription()(Code) | | Returns node description
description |
getDestinations | public Vector getDestinations()(Code) | | Vector - this node's list of destinations |
getFromNodes | public Vector getFromNodes()(Code) | | Vector - this node's list of from nodes |
getNode | public Node getNode(int nodeId)(Code) | | Finds and returns a node within a graph given a node ID
int nodeId The node ID for finding Node the result, null if not found |
getNode | public Node getNode(String name)(Code) | | Finds and returns a node within a graph given a node name
Parameters: String - name The node name for finding Node the result, null if not found |
getNodeId | public int getNodeId()(Code) | | Returns the node ID
int nodeId |
getNodeIdAsInteger | public Integer getNodeIdAsInteger()(Code) | | Returns the node ID
Integer nodeId |
getNodeName | public String getNodeName()(Code) | | Returns the node name
String node name |
getNodeType | public String getNodeType()(Code) | | Returns the node type
String node type |
getNodes | public Vector getNodes(String nodeType)(Code) | | Vector - all descendant nodes of specified type |
getNodes | public Vector getNodes()(Code) | | Vector - all descendant nodes |
getProperty | public Object getProperty(String key)(Code) | | Gets a node's property
Parameters: key - the property name the property value |
getTimeoutHandler | public String getTimeoutHandler()(Code) | | Gets the timeout handler for a Process node
the timeout handler name |
getTimeoutMinutes | public int getTimeoutMinutes()(Code) | | Gets the timeout for a Process node
the timeout in minutes |
print | public void print()(Code) | | Prints out node id and description of node.
Useful for debugging.
|
saveDB | public void saveDB(int gid, Connection con)(Code) | | Recursively saves a node, its destinations and all links
between nodes to the database.
int gid The graph ID |
setContainee | public void setContainee(String graphName)(Code) | | Sets the node's containee graph name. Only valid if node's type is CONTAINER
Parameters: String - grapghName |
setContaineeVersion | public void setContaineeVersion(int i)(Code) | | Sets the node's containee graph version. Only valid if node's type is CONTAINER
int version |
setDescription | public void setDescription(String d)(Code) | | Sets the node description
Parameters: String - d |
setProperty | public void setProperty(String key, Object value)(Code) | | Sets a property on a node
Parameters: key - the property name Parameters: value - the property value - must be serializable |
setTimeoutHandler | public void setTimeoutHandler(String handler)(Code) | | Sets the timeout handler for a Process node
Parameters: timeoutHandler - the name of the timeout handler (a workflow name) |
setTimeoutMinutes | public void setTimeoutMinutes(int tout)(Code) | | Sets the timeout value for a Process node
Parameters: timeoutMinutes - the timeout in minutes |
traverse | public void traverse()(Code) | | Recursively traverses all the nodes of a graph.
Useful for debugging.
|
|
|
|