org.jbpm.pvm.impl
Class ObservableElementImpl

java.lang.Object
  extended by org.jbpm.pvm.impl.ProcessElementImpl
      extended by org.jbpm.pvm.impl.ObservableElementImpl
All Implemented Interfaces:
java.io.Serializable, ObservableElement, ProcessElement
Direct Known Subclasses:
CompositeElementImpl, TransitionImpl

public class ObservableElementImpl
extends ProcessElementImpl
implements ObservableElement

observable and visible process elements.

Author:
Tom Baeyens
See Also:
Serialized Form

Field Summary
protected  java.lang.String description
           
protected  java.util.Map<java.lang.String,EventImpl> events
           
protected  java.lang.String name
           
 
Fields inherited from class org.jbpm.pvm.impl.ProcessElementImpl
dbid, dbversion, exceptionHandlers, processDefinition, properties
 
Constructor Summary
ObservableElementImpl()
           
 
Method Summary
 EventImpl addEvent(EventImpl event)
          add an event to this processDefinition element.
 EventImpl createEvent(java.lang.String eventName)
          event factory method that also establishes the bidirectional relation.
 java.lang.String getDescription()
          the long description.
 EventImpl getEvent(java.lang.String eventName)
          listeners for a specific event.
 java.util.Map<java.lang.String,Event> getEvents()
          listeners, partitioned by event name.
 java.lang.String getName()
          the short display name given to this element.
 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.
 boolean hasEvent(java.lang.String eventName)
          check for presence of a given eventName.
 void setDescription(java.lang.String description)
           
 void setEvents(java.util.Map<java.lang.String,EventImpl> events)
           
 void setName(java.lang.String name)
           
 
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, toString, wait, wait, wait
 
Methods inherited from interface org.jbpm.pvm.ProcessElement
getDbid, getExceptionHandlers, getProcessDefinition, getProperty, getPropertyKeys
 

Field Detail

name

protected java.lang.String name

description

protected java.lang.String description

events

protected java.util.Map<java.lang.String,EventImpl> events
Constructor Detail

ObservableElementImpl

public ObservableElementImpl()
Method Detail

getParent

public ObservableElementImpl getParent()
Description copied from interface: ObservableElement
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. This hierarchical structure is used for event propagation.

Specified by:
getParent in interface ObservableElement

getEvent

public EventImpl getEvent(java.lang.String eventName)
Description copied from interface: ObservableElement
listeners for a specific event.

Specified by:
getEvent in interface ObservableElement

hasEvent

public boolean hasEvent(java.lang.String eventName)
Description copied from interface: ObservableElement
check for presence of a given eventName.

Specified by:
hasEvent in interface ObservableElement

createEvent

public EventImpl createEvent(java.lang.String eventName)
event factory method that also establishes the bidirectional relation.


addEvent

public EventImpl addEvent(EventImpl event)
add an event to this processDefinition element.

Throws:
java.lang.NullPointerException - if event is null.

getName

public java.lang.String getName()
Description copied from interface: ObservableElement
the short display name given to this element.

Specified by:
getName in interface ObservableElement

setName

public void setName(java.lang.String name)

getDescription

public java.lang.String getDescription()
Description copied from interface: ObservableElement
the long description.

Specified by:
getDescription in interface ObservableElement

setDescription

public void setDescription(java.lang.String description)

getEvents

public java.util.Map<java.lang.String,Event> getEvents()
Description copied from interface: ObservableElement
listeners, partitioned by event name. Beware: the actual member is returned. No copy is made.

Specified by:
getEvents in interface ObservableElement

setEvents

public void setEvents(java.util.Map<java.lang.String,EventImpl> events)