Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.scxml.model
Class Transition

    java.lang.Object
      org.apache.commons.scxml.model.Executable
          org.apache.commons.scxml.model.Transition

All Implemented Interfaces:
  NamespacePrefixesHolder, Serializable

public class Transition
extends Executable
implements NamespacePrefixesHolder

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".

See Also:
  Serialized Form

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).
`Map` | `getNamespaces()` Get the XML namespaces at this action node in the SCXML document.
`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` | `setNamespaces(Map namespaces)` Set the XML namespaces at this action node in the SCXML document.
`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.

### getNamespaces

    public final Map getNamespaces()

  Get the XML namespaces at this action node in the SCXML document.

  Specified by:
    `getNamespaces` in interface `NamespacePrefixesHolder`
  Returns:
    Returns the map of namespaces.

### setNamespaces

    public final void setNamespaces(Map namespaces)

  Set the XML namespaces at this action node in the SCXML document.

  Specified by:
    `setNamespaces` in interface `NamespacePrefixesHolder`
  Parameters:
    `namespaces` - The document namespaces.

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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