org.apache.avalon.framework.context
public class DefaultContext extends Object implements Context
Version: CVS $Revision: 1.25 $ $Date: 2003/02/11 15:58:40 $
Constructor Summary | |
---|---|
DefaultContext(Map contextData, Context parent)
Create a Context with specified data and parent.
| |
DefaultContext(Map contextData)
Create a Context with specified data.
| |
DefaultContext(Context parent)
Create a Context with specified parent.
| |
DefaultContext()
Create a Context with no parent.
|
Method Summary | |
---|---|
protected void | checkWriteable()
Utility method to check if context is writeable and if not throw exception.
|
Object | get(Object key)
Retrieve an item from the Context.
|
protected Map | getContextData()
Utility method to retrieve context data.
|
protected Context | getParent()
Get parent context if any.
|
void | hide(Object key)
Hides the item in the context.
|
void | makeReadOnly()
Make the context read-only.
|
void | put(Object key, Object value)
Helper method fo adding items to Context.
|
Parameters: contextData the context data parent the parent Context (may be null)
Parameters: contextData the context data
Parameters: parent the parent Context (may be null)
Throws: IllegalStateException if context is read only
Parameters: key the key of item
Returns: the item stored in context
Throws: ContextException if item not present
Returns: the context data
Returns: the parent Context (may be null)
Parameters: key the items key
Throws: IllegalStateException if context is read only
Parameters: key the items key value the item
Throws: IllegalStateException if context is read only