org.apache.velocity.context
class InternalContextBase extends java.lang.Object implements InternalHousekeepingContext, InternalEventContext, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private Resource |
currentResource
Current resource - used for carrying encoding and other
information down into the rendering process
|
private EventCartridge |
eventCartridge
EventCartridge we are to carry.
|
private java.util.HashMap |
introspectionCache
cache for node/context specific introspection information
|
private java.util.Stack |
templateNameStack
Template name stack.
|
Constructor and Description |
---|
InternalContextBase() |
Modifier and Type | Method and Description |
---|---|
EventCartridge |
attachEventCartridge(EventCartridge ec) |
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[] |
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
|
void |
popCurrentTemplateName()
remove the current template name from stack
|
void |
pushCurrentTemplateName(java.lang.String s)
set the current template name on top of stack
|
void |
setCurrentResource(Resource r) |
private java.util.HashMap introspectionCache
private java.util.Stack templateNameStack
private EventCartridge eventCartridge
private Resource currentResource
public void pushCurrentTemplateName(java.lang.String s)
pushCurrentTemplateName
in interface InternalHousekeepingContext
s
- current template namepublic void popCurrentTemplateName()
popCurrentTemplateName
in interface InternalHousekeepingContext
public java.lang.String getCurrentTemplateName()
getCurrentTemplateName
in interface InternalHousekeepingContext
public java.lang.Object[] getTemplateNameStack()
getTemplateNameStack
in interface InternalHousekeepingContext
public IntrospectionCacheData icacheGet(java.lang.Object key)
icacheGet
in interface InternalHousekeepingContext
key
- key to find in cachepublic void icachePut(java.lang.Object key, IntrospectionCacheData o)
icachePut
in interface InternalHousekeepingContext
key
- keyo
- IntrospectionCacheData object to place in cachepublic void setCurrentResource(Resource r)
setCurrentResource
in interface InternalHousekeepingContext
public Resource getCurrentResource()
InternalHousekeepingContext
getCurrentResource
in interface InternalHousekeepingContext
public EventCartridge attachEventCartridge(EventCartridge ec)
attachEventCartridge
in interface InternalEventContext
public EventCartridge getEventCartridge()
getEventCartridge
in interface InternalEventContext
Copyright ? 2002 Apache Software Foundation. All Rights Reserved.