站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss JBPM 3.0.4 API 英文版文档

NodeCollection (jbpm-3.0.4) - JBoss JBPM 3.0.4 API 英文版文档


org.jbpm.graph.def
Interface NodeCollection

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ProcessDefinition, SuperState

public interface NodeCollection
extends java.io.Serializable

is a common supertype for a ProcessDefinition and a SuperState.


Method Summary
 Node addNode(Node node)
          adds the given node to this node-collection.
 Node findNode(java.lang.String hierarchicalName)
          finds the node by the given hierarchical name.
 java.lang.String generateNodeName()
          generates a new name for a node to be added to this collection.
 Node getNode(java.lang.String name)
          retrieves a node by name.
 java.util.List getNodes()
          is the ordered list of nodes.
 java.util.Map getNodesMap()
          maps node-names to nodes.
 boolean hasNode(java.lang.String name)
          is true if this node-collection contains a node with the given name, false otherwise.
 Node removeNode(Node node)
          removes the given node from this node-collection.
 void reorderNode(int oldIndex, int newIndex)
          changes the order of the nodes : the node on oldIndex is removed and inserted in the newIndex.
 

Method Detail

getNodes

public java.util.List getNodes()
is the ordered list of nodes.


getNodesMap

public java.util.Map getNodesMap()
maps node-names to nodes. returns an empty map if no nodes are contained.


getNode

public Node getNode(java.lang.String name)
retrieves a node by name.

Returns:
the node or null if no such node is present.

hasNode

public boolean hasNode(java.lang.String name)
is true if this node-collection contains a node with the given name, false otherwise.


addNode

public Node addNode(Node node)
adds the given node to this node-collection.

Returns:
the added node.
Throws:
java.lang.IllegalArgumentException - if node is null.

removeNode

public Node removeNode(Node node)
removes the given node from this node-collection.

Returns:
the removed node or null if the node was not present in this collection.
Throws:
java.lang.IllegalArgumentException - if node is null or if the node is not contained in this nodecollection.

reorderNode

public void reorderNode(int oldIndex,
                        int newIndex)
changes the order of the nodes : the node on oldIndex is removed and inserted in the newIndex. All nodes inbetween the old and the new index shift one index position.

Throws:
java.lang.IndexOutOfBoundsException

generateNodeName

public java.lang.String generateNodeName()
generates a new name for a node to be added to this collection.


findNode

public Node findNode(java.lang.String hierarchicalName)
finds the node by the given hierarchical name. use .. for the parent, use slashes '/' to separate the node names.



Version : jbpm-3.0.4