|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.context.DefaultContext
Default implementation of Context. This implementation is a static hierarchial store.
Constructor Summary | |
DefaultContext()
Create a Context with no parent. |
|
DefaultContext(Context parent)
Create a Context with specified parent. |
|
DefaultContext(java.util.Map contextData)
Create a Context with specified data. |
|
DefaultContext(java.util.Map contextData,
Context parent)
Create a Context with specified data and parent. |
Method Summary | |
protected void |
checkWriteable()
|
java.lang.Object |
get(java.lang.Object key)
Retrieve an item from the Context. |
protected java.util.Map |
getContextData()
Utility method to retrieve context data. |
protected Context |
getParent()
Gte parent context if any. |
void |
makeReadOnly()
|
void |
put(java.lang.Object key,
java.lang.Object value)
Helper method fo adding items to Context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultContext(java.util.Map contextData, Context parent)
contextData
- the context dataparent
- the parent Context (may be null)public DefaultContext(java.util.Map contextData)
contextData
- the context datapublic DefaultContext(Context parent)
parent
- the parent Context (may be null)public DefaultContext()
Method Detail |
public java.lang.Object get(java.lang.Object key) throws ContextException
get
in interface Context
key
- the key of itemContextException
- if item not presentpublic void put(java.lang.Object key, java.lang.Object value)
key
- the items keyvalue
- the itemprotected final java.util.Map getContextData()
protected final Context getParent()
public void makeReadOnly()
protected final void checkWriteable() throws java.lang.IllegalStateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |