org.apache.taglibs.rdc.scxml
Interface Context

All Known Implementing Classes:
ELContext, RootContext

public interface Context

A Context or "scope" for storing variables; usually tied to a SCXML root or State object

Author:
Jaroslav Gergic, Rahul Akolkar

Method Summary
 java.lang.Object get(java.lang.String name)
          Get the value of this variable; delegating to parent
 Context getParent()
          Get the parent Context, may be null
 boolean has(java.lang.String name)
          Check if this variable exists, delegating to parent
 java.util.Iterator iterator()
          Get an Iterator over all variables in this Context
 void reset()
          Clear this Context
 void set(java.lang.String name, java.lang.Object value)
          Assigns a new value to an existing variable or creates a new one.
 void setLocal(java.lang.String name, java.lang.Object value)
          Assigns a new value to an existing variable or creates a new one.
 

Method Detail

set

void set(java.lang.String name,
         java.lang.Object value)
Assigns a new value to an existing variable or creates a new one. The method searches the chain of parent Contexts for variable existence.

Parameters:
name - The variable name
value - The variable value

setLocal

void setLocal(java.lang.String name,
              java.lang.Object value)
Assigns a new value to an existing variable or creates a new one. The method allows to shaddow a variable of the same name up the Context chain.

Parameters:
name - The variable name
value - The variable value

get

java.lang.Object get(java.lang.String name)
Get the value of this variable; delegating to parent

Parameters:
name - The name of the variable
Returns:
The value (or null)

has

boolean has(java.lang.String name)
Check if this variable exists, delegating to parent

Parameters:
name - The name of the variable
Returns:
Whether a variable with the name exists in this Context

iterator

java.util.Iterator iterator()
Get an Iterator over all variables in this Context

Returns:
Local entries iterator (Map.Entry) To get parent entries, call getParent().iterator().
See Also:
getParent()

reset

void reset()
Clear this Context


getParent

Context getParent()
Get the parent Context, may be null

Returns:
The parent Context in a chained Context environment


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.