|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.event.InvalidationEventHubImpl org.apache.tapestry5.internal.services.ComponentTemplateSourceImpl
public final class ComponentTemplateSourceImpl
Service implementation that manages a cache of parsed component templates.
Constructor Summary | |
---|---|
ComponentTemplateSourceImpl(boolean productionMode,
TemplateParser parser,
ComponentResourceLocator locator,
ClasspathURLConverter classpathURLConverter)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class org.apache.tapestry5.internal.event.InvalidationEventHubImpl |
---|
addInvalidationListener, fireInvalidationEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentTemplateSourceImpl(@Inject@Symbol(value="tapestry.production-mode") boolean productionMode, TemplateParser parser, ComponentResourceLocator locator, ClasspathURLConverter classpathURLConverter)
Method Detail |
---|
@PostInjection public void registerAsUpdateListener(UpdateListenerHub hub)
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 template
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |