public final class ComponentTemplateSourceImpl extends InvalidationEventHubImpl implements ComponentTemplateSource, UpdateListener
Constructor and Description |
---|
ComponentTemplateSourceImpl(boolean productionMode,
TemplateParser parser,
ComponentResourceLocator locator,
ClasspathURLConverter classpathURLConverter) |
Modifier and Type | Method and Description |
---|---|
void |
checkForUpdates()
Checks to see if any parsed resource has changed.
|
InvalidationEventHub |
getInvalidationEventHub()
Event hub used to notify listeners that underlying component template files have changed.
|
ComponentTemplate |
getTemplate(ComponentModel componentModel,
ComponentResourceSelector selector)
Provides access to a template.
|
ComponentTemplate |
getTemplate(ComponentModel componentModel,
Locale locale)
Resolves the component name to a localized
Resource (using the ComponentTemplateLocator chain of
command service). |
void |
registerAsUpdateListener(UpdateListenerHub hub) |
void |
setupReload(ReloadHelper helper) |
addInvalidationCallback, addInvalidationListener, clearOnInvalidation, fireInvalidationEvent
public ComponentTemplateSourceImpl(@Inject@Symbol(value="tapestry.production-mode") boolean productionMode, TemplateParser parser, ComponentResourceLocator locator, ClasspathURLConverter classpathURLConverter)
@PostInjection public void registerAsUpdateListener(UpdateListenerHub hub)
@PostInjection public void setupReload(ReloadHelper helper)
public ComponentTemplate getTemplate(ComponentModel componentModel, ComponentResourceSelector selector)
ComponentTemplateSource
getTemplate
in interface ComponentTemplateSource
componentModel
- model for the component whose template is to be accessedselector
- defines locale and other information needed to locate templatepublic ComponentTemplate getTemplate(ComponentModel componentModel, Locale locale)
Resource
(using the ComponentTemplateLocator
chain of
command service). The localized resource is used as the key to a cache of ComponentTemplate
s.
If a template doesn't exist, then the missing ComponentTemplate is returned.public void checkForUpdates()
checkForUpdates
in interface UpdateListener
public InvalidationEventHub getInvalidationEventHub()
ComponentTemplateSource
getInvalidationEventHub
in interface ComponentTemplateSource
ComponentTemplates
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.