Package org.jbpm.workflow.core.impl
Class NodeImpl
- java.lang.Object
-
- org.jbpm.workflow.core.impl.NodeImpl
-
- All Implemented Interfaces:
Serializable,Contextable,ContextResolver,Node,org.kie.api.definition.process.Node
- 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
Fields Modifier and Type Field Description protected Map<ConnectionRef,Constraint>constraintsprotected static NodeImpl[]EMPTY_NODE_ARRAY-
Fields inherited from interface org.jbpm.workflow.core.Node
CONNECTION_DEFAULT_TYPE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConstraint(ConnectionRef connectionRef, Constraint constraint)voidaddIncomingConnection(String type, org.kie.api.definition.process.Connection connection)voidaddOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)voidclearIncomingConnection()voidclearOutgoingConnection()ConstraintgetConstraint(org.kie.api.definition.process.Connection connection)Map<ConnectionRef,Constraint>getConstraints()ContextgetContext(String contextId)List<org.kie.api.definition.process.Connection>getDefaultIncomingConnections()Helper method for nodes that have multiple default incoming connectionsList<org.kie.api.definition.process.Connection>getDefaultOutgoingConnections()Helper method for nodes that have multiple default outgoing connectionsorg.kie.api.definition.process.ConnectiongetFrom()Helper method for nodes that have at most one default incoming connectionlonggetId()Map<String,List<org.kie.api.definition.process.Connection>>getIncomingConnections()List<org.kie.api.definition.process.Connection>getIncomingConnections(String type)Map<String,Object>getMetaData()ObjectgetMetaData(String name)StringgetName()org.kie.api.definition.process.NodeContainergetNodeContainer()org.kie.api.definition.process.NodeTypegetNodeType()StringgetNodeUniqueId()Map<String,List<org.kie.api.definition.process.Connection>>getOutgoingConnections()List<org.kie.api.definition.process.Connection>getOutgoingConnections(String type)org.kie.api.definition.process.ConnectiongetTo()Helper method for nodes that have at most one default outgoing connectionStringgetUniqueId()ConstraintinternalGetConstraint(ConnectionRef ref)voidremoveIncomingConnection(String type, org.kie.api.definition.process.Connection connection)voidremoveOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)ContextresolveContext(String contextId, Object param)voidsetConstraint(org.kie.api.definition.process.Connection connection, Constraint constraint)voidsetContext(String contextId, Context context)voidsetId(long id)Method for setting the id of the nodevoidsetMetaData(String name, Object value)voidsetMetaData(Map<String,Object> metaData)voidsetName(String name)Method for setting the name of the nodevoidsetNodeContainer(org.kie.api.definition.process.NodeContainer nodeContainer)protected voidsetNodeType(org.kie.api.definition.process.NodeType nodeType)voidvalidateAddIncomingConnection(String type, org.kie.api.definition.process.Connection connection)voidvalidateAddOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)voidvalidateRemoveIncomingConnection(String type, org.kie.api.definition.process.Connection connection)voidvalidateRemoveOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)
-
-
-
Field Detail
-
EMPTY_NODE_ARRAY
protected static final NodeImpl[] EMPTY_NODE_ARRAY
-
constraints
protected Map<ConnectionRef,Constraint> constraints
-
-
Method Detail
-
getId
public long getId()
- Specified by:
getIdin interfaceorg.kie.api.definition.process.Node
-
getNodeType
public org.kie.api.definition.process.NodeType getNodeType()
- Specified by:
getNodeTypein interfaceorg.kie.api.definition.process.Node
-
setNodeType
protected void setNodeType(org.kie.api.definition.process.NodeType nodeType)
-
getNodeUniqueId
public String getNodeUniqueId()
- Specified by:
getNodeUniqueIdin interfaceorg.kie.api.definition.process.Node
-
getUniqueId
public String getUniqueId()
- Specified by:
getUniqueIdin interfaceNode
-
setId
public void setId(long id)
Description copied from interface:NodeMethod for setting the id of the node
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.kie.api.definition.process.Node
-
setName
public void setName(String name)
Description copied from interface:NodeMethod for setting the name of the node
-
getIncomingConnections
public Map<String,List<org.kie.api.definition.process.Connection>> getIncomingConnections()
- Specified by:
getIncomingConnectionsin interfaceorg.kie.api.definition.process.Node
-
getOutgoingConnections
public Map<String,List<org.kie.api.definition.process.Connection>> getOutgoingConnections()
- Specified by:
getOutgoingConnectionsin interfaceorg.kie.api.definition.process.Node
-
addIncomingConnection
public void addIncomingConnection(String type, org.kie.api.definition.process.Connection connection)
- Specified by:
addIncomingConnectionin interfaceNode
-
validateAddIncomingConnection
public void validateAddIncomingConnection(String type, org.kie.api.definition.process.Connection connection)
-
getIncomingConnections
public List<org.kie.api.definition.process.Connection> getIncomingConnections(String type)
- Specified by:
getIncomingConnectionsin interfaceorg.kie.api.definition.process.Node
-
addOutgoingConnection
public void addOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)
- Specified by:
addOutgoingConnectionin interfaceNode
-
validateAddOutgoingConnection
public void validateAddOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)
-
getOutgoingConnections
public List<org.kie.api.definition.process.Connection> getOutgoingConnections(String type)
- Specified by:
getOutgoingConnectionsin interfaceorg.kie.api.definition.process.Node
-
removeIncomingConnection
public void removeIncomingConnection(String type, org.kie.api.definition.process.Connection connection)
- Specified by:
removeIncomingConnectionin interfaceNode
-
clearIncomingConnection
public void clearIncomingConnection()
-
clearOutgoingConnection
public void clearOutgoingConnection()
-
validateRemoveIncomingConnection
public void validateRemoveIncomingConnection(String type, org.kie.api.definition.process.Connection connection)
-
removeOutgoingConnection
public void removeOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)
- Specified by:
removeOutgoingConnectionin interfaceNode
-
validateRemoveOutgoingConnection
public void validateRemoveOutgoingConnection(String type, org.kie.api.definition.process.Connection connection)
-
getFrom
public org.kie.api.definition.process.Connection getFrom()
Helper method for nodes that have at most one default incoming connection
-
getTo
public org.kie.api.definition.process.Connection getTo()
Helper method for nodes that have at most one default outgoing connection
-
getDefaultIncomingConnections
public List<org.kie.api.definition.process.Connection> getDefaultIncomingConnections()
Helper method for nodes that have multiple default incoming connections
-
getDefaultOutgoingConnections
public List<org.kie.api.definition.process.Connection> getDefaultOutgoingConnections()
Helper method for nodes that have multiple default outgoing connections
-
getNodeContainer
public org.kie.api.definition.process.NodeContainer getNodeContainer()
- Specified by:
getNodeContainerin interfaceorg.kie.api.definition.process.Node
-
setNodeContainer
public void setNodeContainer(org.kie.api.definition.process.NodeContainer nodeContainer)
- Specified by:
setNodeContainerin interfaceNode
-
setContext
public void setContext(String contextId, Context context)
- Specified by:
setContextin interfaceContextable
-
getContext
public Context getContext(String contextId)
- Specified by:
getContextin interfaceContextable
-
resolveContext
public Context resolveContext(String contextId, Object param)
- Specified by:
resolveContextin interfaceContextResolver
-
setMetaData
public void setMetaData(String name, Object value)
- Specified by:
setMetaDatain interfaceNode
-
getMetaData
public Map<String,Object> getMetaData()
- Specified by:
getMetaDatain interfaceorg.kie.api.definition.process.Node
-
getConstraint
public Constraint getConstraint(org.kie.api.definition.process.Connection connection)
-
internalGetConstraint
public Constraint internalGetConstraint(ConnectionRef ref)
-
setConstraint
public void setConstraint(org.kie.api.definition.process.Connection connection, Constraint constraint)
-
addConstraint
public void addConstraint(ConnectionRef connectionRef, Constraint constraint)
-
getConstraints
public Map<ConnectionRef,Constraint> getConstraints()
-
-