org.jbpm.workflow.core.impl
Class NodeImpl

java.lang.Object
  extended by org.jbpm.workflow.core.impl.NodeImpl
All Implemented Interfaces:
Serializable, Node, Contextable, ContextResolver
Direct Known Subclasses:
CompositeNode.CompositeNodeEnd, CompositeNode.CompositeNodeStart, ExtendedNodeImpl, Join, Split

public abstract class NodeImpl
extends Object
implements Node, Serializable, ContextResolver

Default implementation of a node.

See Also:
Serialized Form

Field Summary
protected static NodeImpl[] EMPTY_NODE_ARRAY
           
 
Fields inherited from interface org.jbpm.workflow.core.Node
CONNECTION_DEFAULT_TYPE
 
Constructor Summary
NodeImpl()
           
 
Method Summary
 void addIncomingConnection(String type, Connection connection)
           
 void addOutgoingConnection(String type, Connection connection)
           
 Context getContext(String contextId)
           
 List<Connection> getDefaultIncomingConnections()
          Helper method for nodes that have multiple default incoming connections
 List<Connection> getDefaultOutgoingConnections()
          Helper method for nodes that have multiple default outgoing connections
 Connection getFrom()
          Helper method for nodes that have at most one default incoming connection
 long getId()
           
 Map<String,List<Connection>> getIncomingConnections()
           
 List<Connection> getIncomingConnections(String type)
           
 Map<String,Object> getMetaData()
           
 Object getMetaData(String name)
           
 String getName()
           
 NodeContainer getNodeContainer()
           
 Map<String,List<Connection>> getOutgoingConnections()
           
 List<Connection> getOutgoingConnections(String type)
           
 Connection getTo()
          Helper method for nodes that have at most one default outgoing connection
 String getUniqueId()
           
 void removeIncomingConnection(String type, Connection connection)
           
 void removeOutgoingConnection(String type, Connection connection)
           
 Context resolveContext(String contextId, Object param)
           
 void setContext(String contextId, Context context)
           
 void setId(long id)
          Method for setting the id of the node
 void setMetaData(Map<String,Object> metaData)
           
 void setMetaData(String name, Object value)
           
 void setName(String name)
          Method for setting the name of the node
 void setNodeContainer(NodeContainer nodeContainer)
           
 void validateAddIncomingConnection(String type, Connection connection)
           
 void validateAddOutgoingConnection(String type, Connection connection)
           
 void validateRemoveIncomingConnection(String type, Connection connection)
           
 void validateRemoveOutgoingConnection(String type, Connection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_NODE_ARRAY

protected static final NodeImpl[] EMPTY_NODE_ARRAY
Constructor Detail

NodeImpl

public NodeImpl()
Method Detail

getId

public long getId()
Specified by:
getId in interface Node

getUniqueId

public String getUniqueId()

setId

public void setId(long id)
Description copied from interface: Node
Method for setting the id of the node

Parameters:
id - the id of the node

getName

public String getName()
Specified by:
getName in interface Node

setName

public void setName(String name)
Description copied from interface: Node
Method for setting the name of the node

Parameters:
name - the name of the node

getIncomingConnections

public Map<String,List<Connection>> getIncomingConnections()
Specified by:
getIncomingConnections in interface Node

getOutgoingConnections

public Map<String,List<Connection>> getOutgoingConnections()
Specified by:
getOutgoingConnections in interface Node

addIncomingConnection

public void addIncomingConnection(String type,
                                  Connection connection)

validateAddIncomingConnection

public void validateAddIncomingConnection(String type,
                                          Connection connection)

getIncomingConnections

public List<Connection> getIncomingConnections(String type)
Specified by:
getIncomingConnections in interface Node

addOutgoingConnection

public void addOutgoingConnection(String type,
                                  Connection connection)

validateAddOutgoingConnection

public void validateAddOutgoingConnection(String type,
                                          Connection connection)

getOutgoingConnections

public List<Connection> getOutgoingConnections(String type)
Specified by:
getOutgoingConnections in interface Node

removeIncomingConnection

public void removeIncomingConnection(String type,
                                     Connection connection)

validateRemoveIncomingConnection

public void validateRemoveIncomingConnection(String type,
                                             Connection connection)

removeOutgoingConnection

public void removeOutgoingConnection(String type,
                                     Connection connection)

validateRemoveOutgoingConnection

public void validateRemoveOutgoingConnection(String type,
                                             Connection connection)

getFrom

public Connection getFrom()
Helper method for nodes that have at most one default incoming connection


getTo

public Connection getTo()
Helper method for nodes that have at most one default outgoing connection


getDefaultIncomingConnections

public List<Connection> getDefaultIncomingConnections()
Helper method for nodes that have multiple default incoming connections


getDefaultOutgoingConnections

public List<Connection> getDefaultOutgoingConnections()
Helper method for nodes that have multiple default outgoing connections


getNodeContainer

public NodeContainer getNodeContainer()
Specified by:
getNodeContainer in interface Node

setNodeContainer

public void setNodeContainer(NodeContainer nodeContainer)

setContext

public void setContext(String contextId,
                       Context context)
Specified by:
setContext in interface Contextable

getContext

public Context getContext(String contextId)
Specified by:
getContext in interface Contextable

resolveContext

public Context resolveContext(String contextId,
                              Object param)
Specified by:
resolveContext in interface ContextResolver

setMetaData

public void setMetaData(String name,
                        Object value)

getMetaData

public Object getMetaData(String name)
Specified by:
getMetaData in interface Node

getMetaData

public Map<String,Object> getMetaData()
Specified by:
getMetaData in interface Node

setMetaData

public void setMetaData(Map<String,Object> metaData)


Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.