org.apache.velocity.context
Interface InternalContextAdapter

All Superinterfaces:
Context, InternalEventContext, InternalWrapperContext
All Known Implementing Classes:
Foreach.NullHolderContext, InternalContextAdapterImpl, VMContext

public interface InternalContextAdapter
extends Context, InternalWrapperContext, InternalEventContext

interface to bring all necessary internal and user contexts together. this is what the AST expects to deal with. If anything new comes along, add it here. I will rename soon :)

Version:
$Id: InternalContextAdapter.java 463298 2006-10-12 16:10:32Z henning $
Author:
Geir Magnusson Jr.

Method Summary
 boolean getAllowRendering()
          Checks to see if rendering should be allowed.
 Resource getCurrentResource()
          temporary fix to enable #include() to figure out current encoding.
 String getCurrentTemplateName()
          get the current template name
 Object[] getTemplateNameStack()
          Returns the template name stack in form of an array.
 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
 void popCurrentTemplateName()
          remove the current template name from stack
 void pushCurrentTemplateName(String s)
          set the current template name on top of stack
 void setAllowRendering(boolean v)
          Set whether rendering is allowed.
 void setCurrentResource(Resource r)
           
 
Methods inherited from interface org.apache.velocity.context.Context
containsKey, get, getKeys, put, remove
 
Methods inherited from interface org.apache.velocity.context.InternalWrapperContext
getBaseContext, getInternalUserContext, localPut
 
Methods inherited from interface org.apache.velocity.context.InternalEventContext
attachEventCartridge, getEventCartridge
 

Method Detail

pushCurrentTemplateName

void pushCurrentTemplateName(String s)
set the current template name on top of stack

Parameters:
s - current template name

popCurrentTemplateName

void popCurrentTemplateName()
remove the current template name from stack


getCurrentTemplateName

String getCurrentTemplateName()
get the current template name

Returns:
String current template name

getTemplateNameStack

Object[] getTemplateNameStack()
Returns the template name stack in form of an array.

Returns:
Object[] with the template name stack contents.

icacheGet

IntrospectionCacheData icacheGet(Object key)
returns an IntrospectionCache Data (@see IntrospectionCacheData) object if exists for the key

Parameters:
key - key to find in cache
Returns:
cache object

icachePut

void icachePut(Object key,
               IntrospectionCacheData o)
places an IntrospectionCache Data (@see IntrospectionCacheData) element in the cache for specified key

Parameters:
key - key
o - IntrospectionCacheData object to place in cache

getCurrentResource

Resource getCurrentResource()
temporary fix to enable #include() to figure out current encoding.

Returns:
The current resource.

setCurrentResource

void setCurrentResource(Resource r)
Parameters:
r -

getAllowRendering

boolean getAllowRendering()
Checks to see if rendering should be allowed. Defaults to true but will return false after a #stop directive.

Returns:
true if rendering is allowed, false if no rendering should occur

setAllowRendering

void setAllowRendering(boolean v)
Set whether rendering is allowed. Defaults to true but is set to false after a #stop directive.

Parameters:
v -


Copyright © 2000-2007 The Apache Software Foundation. All Rights Reserved.