org.jamon
Class AbstractTemplateManager

java.lang.Object
  extended by org.jamon.AbstractTemplateManager
All Implemented Interfaces:
TemplateManager
Direct Known Subclasses:
BasicTemplateManager

public abstract class AbstractTemplateManager
extends java.lang.Object
implements TemplateManager

An abstract implementation of TemplateManager which handles some of the common tasks surrounding template replacement.


Constructor Summary
protected AbstractTemplateManager()
           
protected AbstractTemplateManager(TemplateReplacer p_templateReplacer)
           
 
Method Summary
 AbstractTemplateProxy.Intf constructImpl(AbstractTemplateProxy p_proxy)
          Given a proxy, return an instance of the executable code for that proxy's template or a suitable replacement.
 AbstractTemplateProxy.Intf constructImpl(AbstractTemplateProxy p_proxy, java.lang.Object p_jamonContext)
          Given a proxy and a jamonContext, return an instance of the executable code for that proxy's template or a suitable replacement, possibly based on the jamonContext.
protected abstract  AbstractTemplateProxy.Intf constructImplFromReplacedProxy(AbstractTemplateProxy p_replacedProxy)
           
protected  TemplateReplacer getTemplateReplacer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jamon.TemplateManager
constructProxy
 

Constructor Detail

AbstractTemplateManager

protected AbstractTemplateManager()

AbstractTemplateManager

protected AbstractTemplateManager(TemplateReplacer p_templateReplacer)
Method Detail

getTemplateReplacer

protected TemplateReplacer getTemplateReplacer()

constructImpl

public AbstractTemplateProxy.Intf constructImpl(AbstractTemplateProxy p_proxy)
Given a proxy, return an instance of the executable code for that proxy's template or a suitable replacement. This implementation simply calls constructImpl(p_proxy, null).

Specified by:
constructImpl in interface TemplateManager
Parameters:
p_proxy - a proxy for the template
Returns:
a Template instance

constructImpl

public AbstractTemplateProxy.Intf constructImpl(AbstractTemplateProxy p_proxy,
                                                java.lang.Object p_jamonContext)
Given a proxy and a jamonContext, return an instance of the executable code for that proxy's template or a suitable replacement, possibly based on the jamonContext. This implementation simply calls
   constructImplFromReplacedProxy(
     getTemplateReplacer().getReplacement(p_proxy, p_jamonContext))
 

Specified by:
constructImpl in interface TemplateManager
Parameters:
p_proxy - a proxy for the template
p_jamonContext - the current jamonContext (can be null)
Returns:
a Template instance

constructImplFromReplacedProxy

protected abstract AbstractTemplateProxy.Intf constructImplFromReplacedProxy(AbstractTemplateProxy p_replacedProxy)


jamon