|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VelocityContext
Context used to provide named objects to Velocity templates as they are they are used to render output. Objects stored in context are available to templates as they are rendered using variable references like '$variable'. See http://velocity.apache.org/ for more information on using Velocity.
Method Summary | |
---|---|
boolean |
containsKey(java.lang.Object key)
Indicates whether a named object exists in this context for a given key. |
java.lang.Object |
get(java.lang.String key)
Gets the named object associated with a given key. |
java.lang.Object[] |
getKeys()
Obtains an array of all keys for this context. |
boolean |
isPermitOverrides()
Indicates whether a call to put will update this context
if a value already exists in the context by the specified key. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
Adds a named object to this context. |
java.lang.Object |
remove(java.lang.Object key)
Removes the value associated with the specified key from the context. |
Method Detail |
---|
boolean isPermitOverrides()
put
will update this context
if a value already exists in the context by the specified key.
java.lang.Object put(java.lang.String key, java.lang.Object value)
key
- The key which which to store the object in context.
Keys prefixed with a '_' are reserved for internal use.
Attempting to set a named object using a key prefixed with
'_' will throw a runtime exception. Likewise attempting to
put a named object in this context with a previously used
key in which overrides are not permitted with throw a
runtime exception.value
- The context value.
java.lang.Object get(java.lang.String key)
key
- associated with the named object.
null
if no object exists for the given key.boolean containsKey(java.lang.Object key)
key
- to use for checking whether an associated object exists in
this context.
java.lang.Object[] getKeys()
java.lang.Object remove(java.lang.Object key)
key
- The name of the value to remove.
null
the key
was not previously associated with any named object in this
context.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |