public abstract class ChainedInternalContextAdapter extends java.lang.Object implements InternalContextAdapter
Modifier and Type | Field and Description |
---|---|
protected InternalContextAdapter |
wrappedContext
the parent context
|
Constructor and Description |
---|
ChainedInternalContextAdapter(InternalContextAdapter inner)
CTOR, wraps an ICA
|
Modifier and Type | Method and Description |
---|---|
EventCartridge |
attachEventCartridge(EventCartridge ec) |
boolean |
containsKey(java.lang.String key)
Indicates whether the specified key is in the context.
|
java.lang.Object |
get(java.lang.String key)
Retrieves from parent context.
|
InternalContextAdapter |
getBaseContext()
Returns the base full context impl.
|
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() |
Context |
getInternalUserContext()
Return the inner / user context.
|
java.lang.String[] |
getKeys()
Get all the keys for the values in the context.
|
java.util.List<Template> |
getMacroLibraries()
Get the macro library list for the current template.
|
java.lang.String[] |
getMacroNameStack()
Returns the macro name stack in form of an array.
|
java.lang.String[] |
getTemplateNameStack()
Returns the template name stack in form of an array.
|
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 |
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)
Put method also stores values in parent context
|
java.lang.Object |
remove(java.lang.String key)
Removes the value associated with the specified key from the context.
|
void |
setCurrentResource(Resource r) |
void |
setMacroLibraries(java.util.List<Template> macroLibraries)
Set the macro library list for the current template.
|
protected InternalContextAdapter wrappedContext
public ChainedInternalContextAdapter(InternalContextAdapter inner)
inner
- contextpublic Context getInternalUserContext()
getInternalUserContext
in interface InternalWrapperContext
public InternalContextAdapter getBaseContext()
InternalWrapperContext
getBaseContext
in interface InternalWrapperContext
InternalWrapperContext.getBaseContext()
public java.lang.Object get(java.lang.String key)
get
in interface Context
get
in interface InternalWrapperContext
key
- name of item to getpublic java.lang.Object put(java.lang.String key, java.lang.Object value)
put
in interface Context
put
in interface InternalWrapperContext
key
- name of item to setvalue
- object to set to keypublic boolean containsKey(java.lang.String key)
Context
containsKey
in interface Context
containsKey
in interface InternalWrapperContext
key
- The key to look for.Context.containsKey(java.lang.String)
public java.lang.String[] getKeys()
Context
getKeys
in interface Context
Context.getKeys()
public java.lang.Object remove(java.lang.String key)
Context
remove
in interface Context
key
- The name of the value to remove.null
if unmapped.Context.remove(java.lang.String)
public void pushCurrentTemplateName(java.lang.String s)
InternalHousekeepingContext
pushCurrentTemplateName
in interface InternalHousekeepingContext
s
- current template nameInternalHousekeepingContext.pushCurrentTemplateName(java.lang.String)
public void popCurrentTemplateName()
InternalHousekeepingContext
popCurrentTemplateName
in interface InternalHousekeepingContext
InternalHousekeepingContext.popCurrentTemplateName()
public java.lang.String getCurrentTemplateName()
InternalHousekeepingContext
getCurrentTemplateName
in interface InternalHousekeepingContext
InternalHousekeepingContext.getCurrentTemplateName()
public java.lang.String[] getTemplateNameStack()
InternalHousekeepingContext
getTemplateNameStack
in interface InternalHousekeepingContext
InternalHousekeepingContext.getTemplateNameStack()
public void pushCurrentMacroName(java.lang.String s)
InternalHousekeepingContext
pushCurrentMacroName
in interface InternalHousekeepingContext
s
- current macro nameInternalHousekeepingContext.pushCurrentMacroName(java.lang.String)
public void popCurrentMacroName()
InternalHousekeepingContext
popCurrentMacroName
in interface InternalHousekeepingContext
InternalHousekeepingContext.popCurrentMacroName()
public java.lang.String getCurrentMacroName()
InternalHousekeepingContext
getCurrentMacroName
in interface InternalHousekeepingContext
InternalHousekeepingContext.getCurrentMacroName()
public int getCurrentMacroCallDepth()
InternalHousekeepingContext
getCurrentMacroCallDepth
in interface InternalHousekeepingContext
InternalHousekeepingContext.getCurrentMacroCallDepth()
public java.lang.String[] getMacroNameStack()
InternalHousekeepingContext
getMacroNameStack
in interface InternalHousekeepingContext
InternalHousekeepingContext.getMacroNameStack()
public IntrospectionCacheData icacheGet(java.lang.Object key)
InternalHousekeepingContext
icacheGet
in interface InternalHousekeepingContext
key
- key to find in cacheInternalHousekeepingContext.icacheGet(java.lang.Object)
public void icachePut(java.lang.Object key, IntrospectionCacheData o)
InternalHousekeepingContext
icachePut
in interface InternalHousekeepingContext
key
- keyo
- IntrospectionCacheData object to place in cacheInternalHousekeepingContext.icachePut(java.lang.Object, org.apache.velocity.util.introspection.IntrospectionCacheData)
public void setMacroLibraries(java.util.List<Template> macroLibraries)
InternalHousekeepingContext
setMacroLibraries
in interface InternalHousekeepingContext
macroLibraries
- list of macro libraries to setInternalHousekeepingContext.setMacroLibraries(List)
public java.util.List<Template> getMacroLibraries()
InternalHousekeepingContext
getMacroLibraries
in interface InternalHousekeepingContext
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()
public void setCurrentResource(Resource r)
setCurrentResource
in interface InternalHousekeepingContext
InternalHousekeepingContext.setCurrentResource(org.apache.velocity.runtime.resource.Resource)
public Resource getCurrentResource()
InternalHousekeepingContext
getCurrentResource
in interface InternalHousekeepingContext
InternalHousekeepingContext.getCurrentResource()