@OpenApiAll public class VelocityContext extends java.lang.Object implements IContext
IContext
interface for use. This implementation uses a
org.apache.velocity.VelocityContext
for data storage.
org.apache.velocity.VelocityContext
is not synchronized. If you need to share a Context between
threads with simultaneous access for some reason, please create your own and extend the interface ContextConstructor and Description |
---|
VelocityContext()
Creates a new instance (with no inner context).
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<java.lang.String> |
contextKeys()
Finds all the keys of the entry in this context.
|
java.lang.String[] |
contextKeysArray()
Finds all the keys of the entry in this context as array.
|
org.apache.velocity.VelocityContext |
createContext()
Create a velocity context from template context.
|
java.lang.Object |
get(java.lang.String key)
Gets the value corresponding to the provided key from the context.
|
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.String key)
Removes the value associated with the specified key from the context.
|
void |
removeAll()
Removes all items from this context.
|
public VelocityContext()
public java.lang.Object get(java.lang.String key)
public java.lang.Object remove(java.lang.String key)
public java.lang.Object put(java.lang.String key, java.lang.Object value)
public void removeAll()
public java.util.Iterator<java.lang.String> contextKeys()
contextKeys
in interface IContext
public java.lang.String[] contextKeysArray()
contextKeysArray
in interface IContext
public org.apache.velocity.VelocityContext createContext()
Copyright © 2010 - No Magic Asia