org.apache.commons.scxml.model
Class TransitionTarget

java.lang.Object
  extended by org.apache.commons.scxml.model.TransitionTarget
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
History, Initial, Parallel, State

public abstract class TransitionTarget
extends Object
implements Serializable

An abstract base class for elements in SCXML that can serve as a <target> for a <transition>, such as State or Parallel.

See Also:
Serialized Form

Constructor Summary
TransitionTarget()
          Constructor.
 
Method Summary
 void addHistory(History h)
          This method is used by XML digester.
 void addTransition(Transition transition)
          Add a transition to the map of all outgoing transitions for this transition target.
 Datamodel getDatamodel()
          Get the data model for this transition target.
 List getHistory()
          Get the list of history pseudo states for this state.
 String getId()
          Get the identifier for this transition target (may be null).
 OnEntry getOnEntry()
          Get the onentry property.
 OnExit getOnExit()
          Get the onexit property.
 TransitionTarget getParent()
          Get the parent TransitionTarget.
 State getParentState()
          Deprecated. Will be removed in v1.0
 Map getTransitions()
          Deprecated. Use getTransitionsList() instead
 List getTransitionsList()
          Get the outgoing transitions for this target as a java.util.List.
 List getTransitionsList(String event)
          Get the list of all outgoing transitions from this target, that will be candidates for being fired on the given event.
 boolean hasHistory()
          Does this state have a history pseudo state.
 void setDatamodel(Datamodel datamodel)
          Set the data model for this transition target.
 void setId(String id)
          Set the identifier for this transition target.
 void setOnEntry(OnEntry onEntry)
          Set the onentry property.
 void setOnExit(OnExit onExit)
          Set the onexit property.
 void setParent(TransitionTarget parent)
          Set the parent TransitionTarget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransitionTarget

public TransitionTarget()
Constructor.

Method Detail

getId

public final String getId()
Get the identifier for this transition target (may be null).

Returns:
Returns the id.

setId

public final void setId(String id)
Set the identifier for this transition target.

Parameters:
id - The id to set.

getOnEntry

public final OnEntry getOnEntry()
Get the onentry property.

Returns:
Returns the onEntry.

setOnEntry

public final void setOnEntry(OnEntry onEntry)
Set the onentry property.

Parameters:
onEntry - The onEntry to set.

getOnExit

public final OnExit getOnExit()
Get the onexit property.

Returns:
Returns the onExit.

setOnExit

public final void setOnExit(OnExit onExit)
Set the onexit property.

Parameters:
onExit - The onExit to set.

getDatamodel

public final Datamodel getDatamodel()
Get the data model for this transition target.

Returns:
Returns the data model.

setDatamodel

public final void setDatamodel(Datamodel datamodel)
Set the data model for this transition target.

Parameters:
datamodel - The Datamodel to set.

getParent

public final TransitionTarget getParent()
Get the parent TransitionTarget.

Returns:
Returns the parent state (null if parent is <scxml> element)

setParent

public final void setParent(TransitionTarget parent)
Set the parent TransitionTarget.

Parameters:
parent - The parent state to set

getParentState

public final State getParentState()
Deprecated. Will be removed in v1.0

Get the parent State.

Returns:
The parent State

getTransitions

public final Map getTransitions()
Deprecated. Use getTransitionsList() instead

Get the map of all outgoing transitions from this state.

Returns:
Map Returns the transitions Map.

getTransitionsList

public final List getTransitionsList(String event)
Get the list of all outgoing transitions from this target, that will be candidates for being fired on the given event.

Parameters:
event - The event
Returns:
List Returns the candidate transitions for given event

addTransition

public final void addTransition(Transition transition)
Add a transition to the map of all outgoing transitions for this transition target.

Parameters:
transition - The transitions to set.

getTransitionsList

public final List getTransitionsList()
Get the outgoing transitions for this target as a java.util.List.

Returns:
List Returns the transitions list.

addHistory

public final void addHistory(History h)
This method is used by XML digester.

Parameters:
h - History pseudo state
Since:
0.7

hasHistory

public final boolean hasHistory()
Does this state have a history pseudo state.

Returns:
boolean true if a given state contains at least one history pseudo state
Since:
0.7

getHistory

public final List getHistory()
Get the list of history pseudo states for this state.

Returns:
a list of all history pseudo states contained by a given state (can be empty)
Since:
0.7
See Also:
hasHistory()


Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.