|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HierarchicalContext
A context which participates in a context hierarchy (i.e. - a context that has one or more parents). Hierarchical contexts lookup property values first in the current context, and then through in any parent context(s). This allows properties in child context to override properties in parent contexts.
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.String propertyName)
Retrieve the property named propertyName from this
context, or if it's not found, from the nearest ancestor context. |
Context |
getParentContext()
Retrieves this context's parent context. |
java.lang.String[] |
getPropertyNames()
Gets the names of the properties which are currently defined for this context and all parents of this context. |
void |
set(java.lang.String propertyName,
java.lang.Object propertyValue)
Sets propertyName to propertyValue in the
current context. |
void |
setParentContext(Context context)
Sets this context's parent context. |
Method Detail |
---|
java.lang.String[] getPropertyNames() throws ContextException
getPropertyNames
in interface Context
ContextException
- if the properties could not be retieved for some reasonjava.lang.Object get(java.lang.String propertyName) throws ContextException
propertyName
from this
context, or if it's not found, from the nearest ancestor context.
get
in interface Context
propertyName
- the name of the property to be retrieved
ContextException
- if propertyName
is empty or void set(java.lang.String propertyName, java.lang.Object propertyValue) throws ContextException
propertyName
to propertyValue
in the
current context. No change will be made to the property values in any
ancestor contexts.
set
in interface Context
propertyName
- the name of the property to setpropertyValue
- the new value for the property
ContextExcception
- if propertyName
is empty or ContextException
- if propertyName
is empty or Context getParentContext()
void setParentContext(Context context)
context
- this context's parent context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |