org.apache.velocity.context
public abstract class AbstractContext extends InternalContextBase implements Context, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Context |
innerContext
the chained Context if any
|
Constructor and Description |
---|
AbstractContext()
default CTOR
|
AbstractContext(Context inner)
Chaining constructor accepts a Context argument.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(java.lang.Object key)
Indicates whether the specified key is in the context.
|
java.lang.Object |
get(java.lang.String key)
Gets the value corresponding to the provided key from the context.
|
Context |
getChainedContext()
returns innerContext if one is chained
|
java.lang.Object[] |
getKeys()
Get all the keys for the values in the context
|
abstract boolean |
internalContainsKey(java.lang.Object key)
Implement to determine if a key is in the storage.
|
abstract java.lang.Object |
internalGet(java.lang.String key)
Implement to return a value from the context storage.
|
abstract java.lang.Object[] |
internalGetKeys()
Implement to return an object array of key
strings from your storage.
|
abstract java.lang.Object |
internalPut(java.lang.String key,
java.lang.Object value)
Implement to put a value into the context storage.
|
abstract java.lang.Object |
internalRemove(java.lang.Object key)
I mplement to remove an item from your storage.
|
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Adds a name/value pair to the context.
|
java.lang.Object |
remove(java.lang.Object key)
Removes the value associated with the specified key from the context.
|
attachEventCartridge, getCurrentResource, getCurrentTemplateName, getEventCartridge, getTemplateNameStack, icacheGet, icachePut, popCurrentTemplateName, pushCurrentTemplateName, setCurrentResource
private Context innerContext
public AbstractContext()
public AbstractContext(Context inner)
inner
- context to be chainedpublic abstract java.lang.Object internalGet(java.lang.String key)
key
- key whose associated value is to be returnedpublic abstract java.lang.Object internalPut(java.lang.String key, java.lang.Object value)
key
- key with which to associate the valuevalue
- value to be associated with the keypublic abstract boolean internalContainsKey(java.lang.Object key)
key
- key to test for existancepublic abstract java.lang.Object[] internalGetKeys()
public abstract java.lang.Object internalRemove(java.lang.Object key)
key
- key to removepublic java.lang.Object put(java.lang.String key, java.lang.Object value)
public java.lang.Object get(java.lang.String key)
public boolean containsKey(java.lang.Object key)
containsKey
in interface Context
key
- The key to look for.public java.lang.Object[] getKeys()
public java.lang.Object remove(java.lang.Object key)
public Context getChainedContext()
null
if notCopyright ? 2002 Apache Software Foundation. All Rights Reserved.