org.apache.tapestry.services.impl
Class TemplateSourceImpl

java.lang.Object
  extended by org.apache.tapestry.services.impl.TemplateSourceImpl
All Implemented Interfaces:
EventListener, ReportStatusListener, ResetEventListener, TemplateSource

public class TemplateSourceImpl
extends Object
implements TemplateSource, ResetEventListener, ReportStatusListener

Implementation of TemplateSource. Templates, once parsed, stay in memory until explicitly cleared.

Author:
Howard Lewis Ship

Field Summary
static String TEMPLATE_ENCODING_PROPERTY_NAME
           
 
Fields inherited from interface org.apache.tapestry.services.TemplateSource
TEMPLATE_ASSET_NAME, TEMPLATE_TAG_PARAMETER_NAME
 
Constructor Summary
TemplateSourceImpl()
           
 
Method Summary
 ComponentTemplate getTemplate(IRequestCycle cycle, IComponent component)
          Reads the template for the component.
 void reportStatus(ReportStatusEvent event)
           
 void resetEventDidOccur()
          Clears the template cache.
 void setComponentPropertySource(ComponentPropertySource componentPropertySource)
           
 void setComponentResourceResolver(IComponentResourceResolver resourceResolver)
           
 void setComponentSpecificationResolver(ComponentSpecificationResolver resolver)
           
 void setContextRoot(org.apache.hivemind.Resource contextRoot)
           
 void setDelegate(ITemplateSourceDelegate delegate)
           
 void setLocalizer(ResourceLocalizer localizer)
           
 void setLog(Log log)
           
 void setParser(ITemplateParser parser)
           
 void setServiceId(String serviceId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE_ENCODING_PROPERTY_NAME

public static final String TEMPLATE_ENCODING_PROPERTY_NAME
See Also:
Constant Field Values
Constructor Detail

TemplateSourceImpl

public TemplateSourceImpl()
Method Detail

resetEventDidOccur

public void resetEventDidOccur()
Clears the template cache. This is used during debugging.

Specified by:
resetEventDidOccur in interface ResetEventListener

reportStatus

public void reportStatus(ReportStatusEvent event)
Specified by:
reportStatus in interface ReportStatusListener

getTemplate

public ComponentTemplate getTemplate(IRequestCycle cycle,
                                     IComponent component)
Reads the template for the component.

Specified by:
getTemplate in interface TemplateSource
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.

setParser

public void setParser(ITemplateParser parser)
Since:
4.0

setLog

public void setLog(Log log)
Since:
4.0

setDelegate

public void setDelegate(ITemplateSourceDelegate delegate)
Since:
4.0

setComponentSpecificationResolver

public void setComponentSpecificationResolver(ComponentSpecificationResolver resolver)
Since:
4.0

setContextRoot

public void setContextRoot(org.apache.hivemind.Resource contextRoot)
Since:
4.0

setComponentPropertySource

public void setComponentPropertySource(ComponentPropertySource componentPropertySource)
Since:
4.0

setServiceId

public void setServiceId(String serviceId)
Since:
4.0

setLocalizer

public void setLocalizer(ResourceLocalizer localizer)
Since:
4.0

setComponentResourceResolver

public void setComponentResourceResolver(IComponentResourceResolver resourceResolver)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.