public abstract class AbstractContext extends java.lang.Object implements Context
| 构造器和说明 |
|---|
AbstractContext()
default CTOR
|
AbstractContext(Context inner)
Chaining constructor accepts a Context argument.
|
| 限定符和类型 | 方法和说明 |
|---|---|
EventCartridge |
attachEventCartridge(EventCartridge ec) |
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
|
int |
getCurrentMacroCallDepth()
get the current macro call depth
|
java.lang.String |
getCurrentMacroName()
get the current macro name
|
Resource |
getCurrentResource()
temporary fix to enable #include() to figure out
current encoding.
|
java.lang.String |
getCurrentTemplateName()
get the current template name
|
EventCartridge |
getEventCartridge() |
java.lang.Object[] |
getKeys()
Get all the keys for the values in the context
|
java.util.List |
getMacroLibraries()
Get the macro library list for the current template.
|
java.lang.Object[] |
getMacroNameStack()
get the current macro name stack
|
java.lang.Object[] |
getTemplateNameStack()
get the current template name stack
|
IntrospectionCacheData |
icacheGet(java.lang.Object key)
returns an IntrospectionCache Data (@see IntrospectionCacheData)
object if exists for the key
|
void |
icachePut(java.lang.Object key,
IntrospectionCacheData o)
places an IntrospectionCache Data (@see IntrospectionCacheData)
element in the cache for specified key
|
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.
|
void |
popCurrentMacroName()
remove the current macro name from stack
|
void |
popCurrentTemplateName()
remove the current template name from stack
|
void |
pushCurrentMacroName(java.lang.String s)
set the current macro name on top of stack
|
void |
pushCurrentTemplateName(java.lang.String s)
set the current template name on top of stack
|
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.
|
void |
setCurrentResource(Resource r) |
void |
setMacroLibraries(java.util.List macroLibraries)
Set the macro library list for the current template.
|
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 在接口中 Contextkey - The key to look for.public java.lang.Object[] getKeys()
public java.lang.Object remove(java.lang.Object key)
public Context getChainedContext()
null if notpublic void pushCurrentTemplateName(java.lang.String s)
s - current template namepublic void popCurrentTemplateName()
public java.lang.String getCurrentTemplateName()
public java.lang.Object[] getTemplateNameStack()
public void pushCurrentMacroName(java.lang.String s)
s - current macro namepublic void popCurrentMacroName()
public java.lang.String getCurrentMacroName()
public int getCurrentMacroCallDepth()
public java.lang.Object[] getMacroNameStack()
public IntrospectionCacheData icacheGet(java.lang.Object key)
key - key to find in cachepublic void icachePut(java.lang.Object key,
IntrospectionCacheData o)
key - keyo - IntrospectionCacheData object to place in cachepublic void setCurrentResource(Resource r)
InternalHousekeepingContext.setCurrentResource(bboss.org.apache.velocity.runtime.resource.Resource)public Resource getCurrentResource()
InternalHousekeepingContext.getCurrentResource()public void setMacroLibraries(java.util.List macroLibraries)
macroLibraries - list of macro libraries to setInternalHousekeepingContext.setMacroLibraries(List)public java.util.List getMacroLibraries()
InternalHousekeepingContext.getMacroLibraries()public EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge 在接口中 InternalEventContextInternalEventContext.attachEventCartridge(bboss.org.apache.velocity.app.event.EventCartridge)public EventCartridge getEventCartridge()
getEventCartridge 在接口中 InternalEventContextInternalEventContext.getEventCartridge()