public class DBContext extends AbstractContext
Modifier and Type | Method and Description |
---|---|
EventCartridge |
attachEventCartridge(EventCartridge ec) |
int |
getCurrentMacroCallDepth()
get the current macro call depth
|
String |
getCurrentMacroName()
get the current macro name
|
Resource |
getCurrentResource()
temporary fix to enable #include() to figure out
current encoding.
|
String |
getCurrentTemplateName()
get the current template name
|
EventCartridge |
getEventCartridge() |
List |
getMacroLibraries()
Get the macro library list for the current template.
|
String[] |
getMacroNameStack()
get the current macro name stack
|
String[] |
getTemplateNameStack()
get the current template name stack
|
IntrospectionCacheData |
icacheGet(Object key)
returns an IntrospectionCache Data (@see IntrospectionCacheData)
object if exists for the key
|
void |
icachePut(Object key,
IntrospectionCacheData o)
places an IntrospectionCache Data (@see IntrospectionCacheData)
element in the cache for specified key
|
boolean |
internalContainsKey(String key)
Not implementing.
|
Object |
internalGet(String key)
retrieves a serialized object from the db
and returns the living instance to the
caller.
|
String[] |
internalGetKeys()
Not implementing.
|
Object |
internalPut(String key,
Object value)
Serializes and stores an object in the database.
|
Object |
internalRemove(String key)
Not implementing.
|
void |
popCurrentMacroName()
remove the current macro name from stack
|
void |
popCurrentTemplateName()
remove the current template name from stack
|
void |
pushCurrentMacroName(String s)
set the current macro name on top of stack
|
void |
pushCurrentTemplateName(String s)
set the current template name on top of stack
|
void |
setCurrentResource(Resource r) |
void |
setMacroLibraries(List macroLibraries)
Set the macro library list for the current template.
|
containsKey, get, getChainedContext, getKeys, put, remove
public DBContext()
public DBContext(Context inner)
public Object internalGet(String key)
internalGet
in class AbstractContext
key
- key whose associated value is to be returnedpublic Object internalPut(String key, Object value)
internalPut
in class AbstractContext
key
- key with which to associate the valuevalue
- value to be associated with the keypublic boolean internalContainsKey(String key)
internalContainsKey
in class AbstractContext
key
- key to test for existencepublic String[] internalGetKeys()
internalGetKeys
in class AbstractContext
public Object internalRemove(String key)
internalRemove
in class AbstractContext
key
- key to removepublic void pushCurrentTemplateName(String s)
s
- current template namepublic void popCurrentTemplateName()
public String getCurrentTemplateName()
public String[] getTemplateNameStack()
public void pushCurrentMacroName(String s)
s
- current macro namepublic void popCurrentMacroName()
public String getCurrentMacroName()
public int getCurrentMacroCallDepth()
public String[] getMacroNameStack()
public IntrospectionCacheData icacheGet(Object key)
key
- key to find in cachepublic void icachePut(Object key, IntrospectionCacheData o)
key
- keyo
- IntrospectionCacheData object to place in cachepublic void setCurrentResource(Resource r)
InternalHousekeepingContext.setCurrentResource(org.apache.velocity.runtime.resource.Resource)
public Resource getCurrentResource()
InternalHousekeepingContext.getCurrentResource()
public void setMacroLibraries(List macroLibraries)
macroLibraries
- list of macro libraries to setInternalHousekeepingContext.setMacroLibraries(List)
public List getMacroLibraries()
InternalHousekeepingContext.getMacroLibraries()
public EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge
in interface InternalEventContext
InternalEventContext.attachEventCartridge(org.apache.velocity.app.event.EventCartridge)
public EventCartridge getEventCartridge()
getEventCartridge
in interface InternalEventContext
InternalEventContext.getEventCartridge()
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.