org.apache.tapestry.engine
Class DefaultTemplateSource
java.lang.Object
|
+--org.apache.tapestry.engine.DefaultTemplateSource
- All Implemented Interfaces:
- IRenderDescription, ITemplateSource
- public class DefaultTemplateSource
- extends Object
- implements ITemplateSource, IRenderDescription
Default implementation of ITemplateSource
. Templates, once parsed,
stay in memory until explicitly cleared.
An instance of this class acts as a singleton shared by all sessions, so it
must be threadsafe.
- Version:
- $Id: DefaultTemplateSource.java,v 1.10 2003/06/29 18:05:41 mindbridge Exp $
- Author:
- Howard Lewis Ship
DefaultTemplateSource
public DefaultTemplateSource()
reset
public void reset()
- Clears the template cache. This is used during debugging.
- Specified by:
reset
in interface ITemplateSource
getTemplate
public ComponentTemplate getTemplate(IRequestCycle cycle,
IComponent component)
- Reads the template for the component.
Returns null if the template can't be found.
- Specified by:
getTemplate
in interface ITemplateSource
- Following copied from interface:
org.apache.tapestry.engine.ITemplateSource
- Parameters:
cycle
- The request cycle loading the template; this is required
in some cases when the template is loaded from an IAsset
.component
- The component for which a template should be loaded.- Throws:
ApplicationRuntimeException
- if the resource cannot be located or loaded.
toString
public String toString()
- Overrides:
toString
in class Object
renderDescription
public void renderDescription(IMarkupWriter writer)
- Description copied from interface:
IRenderDescription
- Object should render a description of itself to the writer.
- Specified by:
renderDescription
in interface IRenderDescription
- Since:
- 1.0.6