InternalContextAdapter (Velocity 1.7 API)
Keywords: org.apache.velocity.context.InternalContextAdapter interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.context
Interface InternalContextAdapter

All Superinterfaces:
  Context, InternalEventContext, org.apache.velocity.context.InternalHousekeepingContext, InternalWrapperContext

All Known Implementing Classes:
  ChainedInternalContextAdapter, InternalContextAdapterImpl

public interface InternalContextAdapter
extends org.apache.velocity.context.InternalHousekeepingContext, 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
`int` | `getCurrentMacroCallDepth()` get the current macro call depth
`String` | `getCurrentMacroName()` get the current macro name
`Resource` | `getCurrentResource()` temporary fix to enable #include() to figure out current encoding.
`String` | `getCurrentTemplateName()` get the current template name
`List` | `getMacroLibraries()` Get the macro library list for the current template.
`Object[]` | `getMacroNameStack()` Returns the macro name stack in form of an array.
`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` | `popCurrentMacroName()` remove the current macro name from stack
`void` | `popCurrentTemplateName()` remove the current template name from stack
`void` | `pushCurrentMacroName(String s)` set the current macro name on top of stack
`void` | `pushCurrentTemplateName(String s)` set the current template name on top of stack
`void` | `setCurrentResource(Resource r)`
`void` | `setMacroLibraries(List macroLibraries)` Set the macro library list for the current template.

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

    public void pushCurrentTemplateName(String s)

  set the current template name on top of stack

  Parameters:
    `s` - current template name

### popCurrentTemplateName

    public void popCurrentTemplateName()

  remove the current template name from stack

### getCurrentTemplateName

    public String getCurrentTemplateName()

  get the current template name

  Returns:
    String current template name

### getTemplateNameStack

    public Object[] getTemplateNameStack()

  Returns the template name stack in form of an array.

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

### pushCurrentMacroName

    public void pushCurrentMacroName(String s)

  set the current macro name on top of stack

  Parameters:
    `s` - current macro name

### popCurrentMacroName

    public void popCurrentMacroName()

  remove the current macro name from stack

### getCurrentMacroName

    public String getCurrentMacroName()

  get the current macro name

  Returns:
    String current macro name

### getCurrentMacroCallDepth

    public int getCurrentMacroCallDepth()

  get the current macro call depth

  Returns:
    int current macro call depth

### getMacroNameStack

    public Object[] getMacroNameStack()

  Returns the macro name stack in form of an array.

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

### icacheGet

    public 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

    public 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

    public Resource getCurrentResource()

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

  Returns:
    The current resource.

### setCurrentResource

    public void setCurrentResource(Resource r)

  Parameters:
    `r` -

### setMacroLibraries

    public void setMacroLibraries(List macroLibraries)

  Set the macro library list for the current template.

  Parameters:
    `macroLibraries` - list of macro libraries to set

### getMacroLibraries

    public List getMacroLibraries()

  Get the macro library list for the current template.

  Returns:
    List of macro library names

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.