|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbpm.pvm.impl.ProcessElementImpl org.jbpm.pvm.impl.ObservableElementImpl org.jbpm.pvm.impl.CompositeElementImpl org.jbpm.pvm.impl.NodeImpl
public class NodeImpl
Field Summary | |
---|---|
protected ObjectReference<Activity> |
behaviourReference
|
protected TransitionImpl |
defaultTransition
|
protected java.util.List<TransitionImpl> |
incomingTransitions
|
protected boolean |
isExecutionAsync
|
protected boolean |
isLeaveAsync
|
protected boolean |
isPreviousNeeded
|
protected boolean |
isSignalAsync
|
protected java.util.List<TransitionImpl> |
outgoingTransitions
|
protected java.util.Map<java.lang.String,TransitionImpl> |
outgoingTransitionsMap
|
protected NodeImpl |
parentNode
|
Fields inherited from class org.jbpm.pvm.impl.CompositeElementImpl |
---|
hasVariableDefinitions, nodes, nodesMap, variableDefinitions |
Fields inherited from class org.jbpm.pvm.impl.ObservableElementImpl |
---|
description, events, name |
Fields inherited from class org.jbpm.pvm.impl.ProcessElementImpl |
---|
dbid, dbversion, exceptionHandlers, processDefinition, properties |
Fields inherited from interface org.jbpm.pvm.Node |
---|
EVENT_NODE_ENTER, EVENT_NODE_LEAVE |
Constructor Summary | |
---|---|
NodeImpl()
Use CompositeElementImpl.createNode() or CompositeElementImpl.createNode() instead. |
Method Summary | |
---|---|
Transition |
addIncomingTransition(TransitionImpl transition)
adds the given transition as an arriving transition to this node. |
NodeImpl |
addNode(NodeImpl node)
|
Transition |
addOutgoingTransition(TransitionImpl transition)
adds the given transition as a leaving transition to this node. |
Transition |
createOutgoingTransition(NodeImpl destination)
creates a transition from this node to the given destination node. |
TransitionImpl |
createOutgoingTransition(NodeImpl destination,
java.lang.String transitionName)
creates a transition with the given name from this node to the given destination node. |
TransitionImpl |
findDefaultTransition()
searches for the default transition in this node and then up the parent chain. |
Node |
findNode(java.lang.String nodeName)
searches for the given node in this node, including this node and all child nodes recursively. |
TransitionImpl |
findOutgoingTransition(java.lang.String transitionName)
searches for the given transitionName in this node and then up the parent chain. |
Activity |
getBehaviour()
|
ObjectReference<Activity> |
getBehaviourReference()
|
TransitionImpl |
getDefaultTransition()
the default outgoing transition. |
java.util.List<Transition> |
getIncomingTransitions()
the list of arriving transitions. |
java.lang.String |
getName()
the short display name given to this element. |
TransitionImpl |
getOutgoingTransition(java.lang.String transitionName)
the first leaving transition with the given name or null of no such leaving transition exists. |
java.util.List<Transition> |
getOutgoingTransitions()
the list of leaving transitions. |
java.util.Map<java.lang.String,Transition> |
getOutgoingTransitionsMap()
the leaving transitions, keyed by transition name. |
ObservableElementImpl |
getParent()
by default, this implementation returns null, but this is overwritten in Node and Transition to represent the parent in the
hierarchical structure of the process. |
java.util.List<ObservableElementImpl> |
getParentChain()
collects the full stack of parent in a list. |
NodeImpl |
getParentNode()
retrieve the parent node in the composite node structure. |
boolean |
hasIncomingTransitions()
indicates if this node has arriving transitions |
boolean |
hasOutgoingTransition(java.lang.String transitionName)
indicates if a leaving transition with the given transitionName exists. |
boolean |
hasOutgoingTransitions()
indicates if this node has leaving transitions |
boolean |
isExecutionAsync()
indicates if this node should be executed asynchronously. |
boolean |
isLeaveAsync()
indicates if execution should proceed asynchronously when this node is left over any of the outgoing transitions. |
boolean |
isPreviousNeeded()
indicates if this node behaviour needs to know the previous node or
previous transition . |
boolean |
isSignalAsync()
indicates if signals should be processed asynchronously. |
boolean |
removeIncomingTransition(TransitionImpl transition)
removes the given transition if it is contained in the arriving transitions of this node. |
boolean |
removeOutgoingTransition(TransitionImpl transition)
removes the given transition from the leaving transitions. |
void |
setBehaviour(Activity activity)
sets the given activity as the behaviour for this node. |
void |
setBehaviour(Descriptor descriptor)
sets the activity that can be created from the given descriptor as the behaviour for this node. |
void |
setBehaviour(java.lang.String expression)
sets the expression behaviour for this node. |
void |
setBehaviourReference(ObjectReference<Activity> behaviourReference)
|
void |
setDefaultTransition(TransitionImpl defaultTransition)
|
void |
setExecutionAsync(boolean isExecutionAsync)
|
void |
setIncomingTransitions(java.util.List<TransitionImpl> incomingTransitions)
sets the incomingTransitions to the given list of incomingTransitions. |
void |
setLeaveAsync(boolean isLeaveAsync)
|
void |
setName(java.lang.String name)
|
void |
setOutgoingTransitions(java.util.List<TransitionImpl> outgoingTransitions)
sets the outgoingTransitions to the given list of outgoingTransitions. |
void |
setParentNode(NodeImpl parentNode)
|
void |
setPreviousNeeded(boolean isPreviousNeeded)
|
void |
setSignalAsync(boolean isSignalAsync)
|
java.lang.String |
toString()
|
Methods inherited from class org.jbpm.pvm.impl.CompositeElementImpl |
---|
createNode, createNode, getNode, getNodes, getNodesMap, getVariableDefinitions, hasNode, hasNodes, removeNode, setVariableDefinitions |
Methods inherited from class org.jbpm.pvm.impl.ObservableElementImpl |
---|
addEvent, createEvent, getDescription, getEvent, getEvents, hasEvent, setDescription, setEvents |
Methods inherited from class org.jbpm.pvm.impl.ProcessElementImpl |
---|
addExceptionHandler, addProperty, createExceptionHandler, getDbid, getExceptionHandlers, getProcessDefinition, getProperties, getProperty, getPropertyKeys, setExceptionHandlers, setProcessDefinition, setProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jbpm.pvm.Node |
---|
getVariableDefinitions |
Methods inherited from interface org.jbpm.pvm.CompositeElement |
---|
getNode, getNodes, getNodesMap, hasNode, hasNodes |
Methods inherited from interface org.jbpm.pvm.ObservableElement |
---|
getDescription, getEvent, getEvents, hasEvent |
Methods inherited from interface org.jbpm.pvm.ProcessElement |
---|
getDbid, getExceptionHandlers, getProcessDefinition, getProperty, getPropertyKeys |
Field Detail |
---|
protected ObjectReference<Activity> behaviourReference
protected java.util.List<TransitionImpl> outgoingTransitions
protected java.util.List<TransitionImpl> incomingTransitions
protected TransitionImpl defaultTransition
protected NodeImpl parentNode
protected boolean isExecutionAsync
protected boolean isSignalAsync
protected boolean isLeaveAsync
protected boolean isPreviousNeeded
protected transient java.util.Map<java.lang.String,TransitionImpl> outgoingTransitionsMap
Constructor Detail |
---|
public NodeImpl()
CompositeElementImpl.createNode()
or CompositeElementImpl.createNode()
instead.
Method Detail |
---|
public NodeImpl addNode(NodeImpl node)
addNode
in class CompositeElementImpl
public Node findNode(java.lang.String nodeName)
CompositeElement
findNode
in interface CompositeElement
findNode
in class CompositeElementImpl
public Transition createOutgoingTransition(NodeImpl destination)
java.lang.NullPointerException
- if destination is null.public TransitionImpl createOutgoingTransition(NodeImpl destination, java.lang.String transitionName)
transitionName
- may be null.
java.lang.NullPointerException
- if destination is null.public Transition addOutgoingTransition(TransitionImpl transition)
java.lang.NullPointerException
- if transition is null.public boolean removeOutgoingTransition(TransitionImpl transition)
public TransitionImpl getOutgoingTransition(java.lang.String transitionName)
getOutgoingTransition
in interface Node
transitionName
- is the name of the transition to take. A null value will
match the first unnamed transition.public TransitionImpl findOutgoingTransition(java.lang.String transitionName)
findOutgoingTransition
in interface Node
public TransitionImpl findDefaultTransition()
public java.util.List<Transition> getOutgoingTransitions()
getOutgoingTransitions
in interface Node
public boolean hasOutgoingTransition(java.lang.String transitionName)
hasOutgoingTransition
in interface Node
public boolean hasOutgoingTransitions()
hasOutgoingTransitions
in interface Node
public void setOutgoingTransitions(java.util.List<TransitionImpl> outgoingTransitions)
public java.util.Map<java.lang.String,Transition> getOutgoingTransitionsMap()
getOutgoingTransitionsMap
in interface Node
public Transition addIncomingTransition(TransitionImpl transition)
java.lang.NullPointerException
- if transition is null.public boolean removeIncomingTransition(TransitionImpl transition)
public java.util.List<Transition> getIncomingTransitions()
getIncomingTransitions
in interface Node
public boolean hasIncomingTransitions()
hasIncomingTransitions
in interface Node
public void setIncomingTransitions(java.util.List<TransitionImpl> incomingTransitions)
public void setBehaviour(Activity activity)
public void setBehaviour(Descriptor descriptor)
Activity
An object reference for the given descriptor is created.
public void setBehaviour(java.lang.String expression)
Activity's execute method
.
An object reference for the given descriptor is created.
public ObjectReference<Activity> getBehaviourReference()
public void setBehaviourReference(ObjectReference<Activity> behaviourReference)
public Activity getBehaviour()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<ObservableElementImpl> getParentChain()
public ObservableElementImpl getParent()
ObservableElement
Node
and Transition
to represent the parent in the
hierarchical structure of the process. This hierarchical structure is
used for event propagation.
getParent
in interface ObservableElement
getParent
in class ObservableElementImpl
public java.lang.String getName()
ObservableElement
getName
in interface ObservableElement
getName
in class ObservableElementImpl
public void setName(java.lang.String name)
setName
in class ObservableElementImpl
public TransitionImpl getDefaultTransition()
Node
getDefaultTransition
in interface Node
public void setDefaultTransition(TransitionImpl defaultTransition)
public NodeImpl getParentNode()
Node
ObservableElement.getParent()
in that it is restricted
to the parent nodes. It doesn't take into account the process definition.
getParentNode
in interface Node
public void setParentNode(NodeImpl parentNode)
public boolean isExecutionAsync()
Node
isExecutionAsync
in interface Node
public boolean isSignalAsync()
Node
isSignalAsync
in interface Node
public void setSignalAsync(boolean isSignalAsync)
public void setExecutionAsync(boolean isExecutionAsync)
public boolean isLeaveAsync()
Node
isLeaveAsync
in interface Node
public void setLeaveAsync(boolean isLeaveAsync)
public boolean isPreviousNeeded()
Node
the previous node
or
previous transition
.
If this property is set to true, the properties Execution.getPreviousNode()
and Execution.getPreviousTransition()
will be available to the
node behaviour when it is executed or signalled.
isPreviousNeeded
in interface Node
public void setPreviousNeeded(boolean isPreviousNeeded)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |