org.jamon
Class TemplateManagerSource

java.lang.Object
  extended by org.jamon.TemplateManagerSource

public abstract class TemplateManagerSource
extends java.lang.Object

The source for obtaining a default TemplateManager. This class is used to find a TemplateManager when a template is instantiated without supplying a TemplateManager, e.g.

     MyFooTemplate template = new MyFooTemplate();
  
Note that this is an abstract class instead of an interface in order to allow static methods.


Constructor Summary
TemplateManagerSource()
           
 
Method Summary
static TemplateManager getTemplateManagerFor(java.lang.String p_path)
          Get the TemplateManager for the specified path.
abstract  TemplateManager getTemplateManagerForPath(java.lang.String p_path)
          Get a TemplateManager for a specified template path.
static void setTemplateManager(TemplateManager p_manager)
          Set the TemplateManagerSource by supplying a single TemplateManager which will be supplied by getTemplateManagerFor(java.lang.String) for all paths.
static void setTemplateManagerSource(TemplateManagerSource p_source)
          Set the TemplateManagerSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateManagerSource

public TemplateManagerSource()
Method Detail

getTemplateManagerForPath

public abstract TemplateManager getTemplateManagerForPath(java.lang.String p_path)
Get a TemplateManager for a specified template path.

Parameters:
p_path - the template path
Returns:
a TemplateManager appropriate for that path

getTemplateManagerFor

public static TemplateManager getTemplateManagerFor(java.lang.String p_path)
Get the TemplateManager for the specified path.

Parameters:
p_path - the template path
Returns:
a TemplateManager appropriate for that path

setTemplateManagerSource

public static void setTemplateManagerSource(TemplateManagerSource p_source)
Set the TemplateManagerSource.

Parameters:
p_source - the TemplateManagerSource

setTemplateManager

public static void setTemplateManager(TemplateManager p_manager)
Set the TemplateManagerSource by supplying a single TemplateManager which will be supplied by getTemplateManagerFor(java.lang.String) for all paths.

Parameters:
p_manager - the TemplateManager


jamon