|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.core.MapContext
public class MapContext
A simple Context that can be used for testing. A SessionContext and an ApplicationContext can be mocked with this class.
| Constructor Summary | |
|---|---|
MapContext()
|
|
MapContext(Map<String,Object> values)
|
|
| Method Summary | |
|---|---|
Object |
getAttribute(String name)
Gets an attribute value associated with the given name. |
boolean |
hasAttribute(String name)
Returns true is an attribute exists with this name. |
Iterator<String> |
keys()
Return an iterator with all the attribute names in this context. |
void |
removeAttribute(String name)
Removes an attribute associated with the given name. |
void |
reset()
Resets this context. |
void |
setAttribute(String name,
Object value)
Sets an attribute value associated with the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapContext()
public MapContext(Map<String,Object> values)
| Method Detail |
|---|
public Object getAttribute(String name)
Context
getAttribute in interface Contextname - The name of the attribute.
public void setAttribute(String name,
Object value)
Context
setAttribute in interface Contextname - The name of the attribute.value - The value of the attribute.public void removeAttribute(String name)
Context
removeAttribute in interface Contextname - The name of the attribute.public Iterator<String> keys()
Context
keys in interface Contextpublic void reset()
Context
reset in interface Contextpublic boolean hasAttribute(String name)
Context
hasAttribute in interface Contextname - The name of the attribute.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||