public class TemplateSourceImpl extends java.lang.Object implements TemplateSource, ResetEventListener, ReportStatusListener
TemplateSource
. Templates, once parsed,
stay in memory until explicitly cleared.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TEMPLATE_ENCODING_PROPERTY_NAME |
TEMPLATE_ASSET_NAME, TEMPLATE_TAG_PARAMETER_NAME
Constructor and Description |
---|
TemplateSourceImpl() |
Modifier and Type | Method and Description |
---|---|
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 |
setComponentSpecificationResolver(ComponentSpecificationResolver resolver) |
void |
setContextRoot(org.apache.hivemind.Resource contextRoot) |
void |
setDelegate(ITemplateSourceDelegate delegate) |
void |
setLocalizer(ResourceLocalizer localizer) |
void |
setLog(org.apache.commons.logging.Log log) |
void |
setParser(ITemplateParser parser) |
void |
setServiceId(java.lang.String serviceId) |
public static final java.lang.String TEMPLATE_ENCODING_PROPERTY_NAME
public TemplateSourceImpl()
public void resetEventDidOccur()
resetEventDidOccur
in interface ResetEventListener
public void reportStatus(ReportStatusEvent event)
reportStatus
in interface ReportStatusListener
public ComponentTemplate getTemplate(IRequestCycle cycle, IComponent component)
getTemplate
in interface TemplateSource
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.public void setParser(ITemplateParser parser)
public void setLog(org.apache.commons.logging.Log log)
public void setDelegate(ITemplateSourceDelegate delegate)
public void setComponentSpecificationResolver(ComponentSpecificationResolver resolver)
public void setContextRoot(org.apache.hivemind.Resource contextRoot)
public void setComponentPropertySource(ComponentPropertySource componentPropertySource)
public void setServiceId(java.lang.String serviceId)
public void setLocalizer(ResourceLocalizer localizer)