Arch4J 1.1

org.arch4j.clientcontroller
Interface StateContext

All Known Implementing Classes:
ContextImpl

public interface StateContext

Specifies state and transition access to the context data.

Version:
1.0
Author:
David Colwell

Method Summary
 boolean containsValue(String aKey)
          Determines if the specified value exists in the context set.
 Object getValue(String aKey)
          Retrieves the value mapped by aKey.
 void removeValue(String aKey)
          Removes the value mapped by aKey.
 void setValue(String aKey, Object aValue)
          Sets the specified key-value under the local context.
 void updateValue(String aKey, Object aValue)
          Updates the value mapped by aKey.
 

Method Detail

getValue

public Object getValue(String aKey)
                throws ValueNotFoundException
Retrieves the value mapped by aKey. If the value is not found in the local context then ancestor contexts are searched including the root context.

Throws:
ValueNotFoundException - if the key-value cannot be found.

setValue

public void setValue(String aKey,
                     Object aValue)
Sets the specified key-value under the local context. This will overwrite any existing value in the local context with the same key.


removeValue

public void removeValue(String aKey)
                 throws ValueNotFoundException
Removes the value mapped by aKey. If the value is not found in the local context, an exception is thrown.

Throws:
ValueNotFoundException - if the key-value cannot be found in the local context.

updateValue

public void updateValue(String aKey,
                        Object aValue)
                 throws ValueNotFoundException
Updates the value mapped by aKey. If the value is not found in the local context then ancestor contexts are searched including the root context. The value will be updated at the context level in which it is found.

Throws:
ValueNotFoundException - if the key-value cannot be found.

containsValue

public boolean containsValue(String aKey)
Determines if the specified value exists in the context set. If the value is not found in the local context, ancestor contexts are searched.

Returns:
true if the value is found, otherwise false.

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.