org.apache.commons.scxml.model
Class Transition

java.lang.Object
  extended byorg.apache.commons.scxml.model.Executable
      extended byorg.apache.commons.scxml.model.Transition

public class Transition
extends Executable

The class in this SCXML object model that corresponds to the <transition> SCXML element. Transition rules are triggered by "events" and conditionalized via "guard-conditions".


Constructor Summary
Transition()
          Constructor.
 
Method Summary
 String getCond()
          Get the guard condition (may be null).
 String getEvent()
          Get the event that will trigger this transition (pending evaluation of the guard condition in favor).
 String getNext()
          Get the ID of the transition target (may be null, if, for example, the target is specified inline).
 Path getPath()
          Get the path of this transiton.
 TransitionTarget getRuntimeTarget()
          Get the runtime transition target, which always resolves to a TransitionTarget instance.
 TransitionTarget getTarget()
          Get the transition target (may be null).
 void setCond(String cond)
          Set the guard condition.
 void setEvent(String event)
          Set the event that will trigger this transition (pending evaluation of the guard condition in favor).
 void setNext(String next)
          Set the transition target by specifying its ID.
 void setTarget(TransitionTarget target)
          Set the transition target.
 
Methods inherited from class org.apache.commons.scxml.model.Executable
addAction, getActions, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transition

public Transition()
Constructor.

Method Detail

getCond

public final String getCond()
Get the guard condition (may be null).

Returns:
Returns the cond.

setCond

public final void setCond(String cond)
Set the guard condition.

Parameters:
cond - The cond to set.

getEvent

public final String getEvent()
Get the event that will trigger this transition (pending evaluation of the guard condition in favor).

Returns:
Returns the event.

setEvent

public final void setEvent(String event)
Set the event that will trigger this transition (pending evaluation of the guard condition in favor).

Parameters:
event - The event to set.

getTarget

public final TransitionTarget getTarget()
Get the transition target (may be null).

Returns:
Returns the target as specified in SCXML markup.

Remarks: Is null for "stay" transitions. Returns parent (the source node) for "self" transitions.


getRuntimeTarget

public final TransitionTarget getRuntimeTarget()
Get the runtime transition target, which always resolves to a TransitionTarget instance.

Returns:
Returns the actual target of a transition at runtime.

Remarks: For both the "stay" and "self" transitions it returns parent (the source node). This method should never return null.


setTarget

public final void setTarget(TransitionTarget target)
Set the transition target.

Parameters:
target - The target to set.

getNext

public final String getNext()
Get the ID of the transition target (may be null, if, for example, the target is specified inline).

Returns:
String Returns the transition target ID (used by SCXML Digester only).
See Also:
getTarget()

setNext

public final void setNext(String next)
Set the transition target by specifying its ID.

Parameters:
next - The the transition target ID (used by SCXML Digester only).
See Also:
setTarget(TransitionTarget)

getPath

public final Path getPath()
Get the path of this transiton.

Returns:
Path returns the transition path
See Also:
Path


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