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 191743 2005-06-21 23:22:20Z dlr $
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
 
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.


setCurrentResource

void setCurrentResource(Resource 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.



Copyright © 2002 Apache Software Foundation. All Rights Reserved.