org.apache.velocity.context
Interface InternalHousekeepingContext
- InternalContextAdapter
- AbstractContext, InternalContextAdapterImpl, InternalContextBase, VelocityContext, VMContext
(package private) interface InternalHousekeepingContext
interface to encapsulate the 'stuff' for internal operation of velocity.
We use the context as a thread-safe storage : we take advantage of the
fact that it's a visitor of sorts to all nodes (that matter) of the
AST during init() and render().
Currently, it carries the template name for namespace
support, as well as node-local context data introspection caching.
Version:
- Geir Magnusson Jr.
- Christoph Reck
getCurrentResource
public Resource getCurrentResource()
temporary fix to enable #include() to figure out
current encoding.
getCurrentTemplateName
public String getCurrentTemplateName()
get the current template name
- String current template name
getTemplateNameStack
public Object[] getTemplateNameStack()
Returns the template name stack in form of an array.
- Object[] with the template name stack contents.
icacheGet
public IntrospectionCacheData icacheGet(Object key)
returns an IntrospectionCache Data (@see IntrospectionCacheData)
object if exists for the key
key
- key to find in cache
- cache object
icachePut
public void icachePut(Object key,
IntrospectionCacheData o)
places an IntrospectionCache Data (@see IntrospectionCacheData)
element in the cache for specified key
key
- keyo
- IntrospectionCacheData object to place in cache
popCurrentTemplateName
public void popCurrentTemplateName()
remove the current template name from stack
pushCurrentTemplateName
public void pushCurrentTemplateName(String s)
set the current template name on top of stack
s
- current template name
setCurrentResource
public void setCurrentResource(Resource r)
Copyright © 2003 Apache Software Foundation. All Rights Reserved.