org.jbpm.model
Interface CompositeElement

All Superinterfaces:
ObservableElement
All Known Subinterfaces:
Activity, ClientProcessDefinition, OpenProcessDefinition

public interface CompositeElement
extends ObservableElement

activity container base class for OpenProcessDefinition and Activity.

Author:
Tom Baeyens

Method Summary
 Activity findActivity(java.lang.String activityName)
          searches for the given activity in this element recursively, including this activity and all child activities.
 java.util.List<Activity> getActivities()
          the list of direct composite activities.
 java.util.Map<java.lang.String,Activity> getActivitiesMap()
          the composite activities, keyed by activity name.
 Activity getActivity(java.lang.String activityName)
          the first composite activity with the given name or null of no such activity exists.
 boolean hasActivities()
          indicates if this processDefinition has activities.
 boolean hasActivity(java.lang.String activityName)
          indicates if an activity with the given name exists directly in this element.
 
Methods inherited from interface org.jbpm.model.ObservableElement
getDbid, getName, getParent, getProcessDefinition, getProperty, getPropertyKeys, hasEvent
 

Method Detail

hasActivities

boolean hasActivities()
indicates if this processDefinition has activities.


getActivities

java.util.List<Activity> getActivities()
the list of direct composite activities. Recursively contained activities are not included in the list. Beware: the actual member is returned. No copy is made.


hasActivity

boolean hasActivity(java.lang.String activityName)
indicates if an activity with the given name exists directly in this element. Only the direct contained activities are searched. No recursive search is made.


getActivity

Activity getActivity(java.lang.String activityName)
the first composite activity with the given name or null of no such activity exists. Only the direct contained activities are searched. No recursive search is made.


findActivity

Activity findActivity(java.lang.String activityName)
searches for the given activity in this element recursively, including this activity and all child activities. The search is done depth-first. A null value for activityName matches a activity without a name.


getActivitiesMap

java.util.Map<java.lang.String,Activity> getActivitiesMap()
the composite activities, keyed by activity name. If an activity with the same name occurs mutltiple times, the first in the list is included in the map. Activities with a null value for their name are not included in the map. Beware: the actual member is returned. No copy is made. In fact, the returned map is maintained as a cache. So updates to the map will influence subsequent retrievals of activities by name.



Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.