Class ComponentMessagesSourceImpl
- java.lang.Object
-
- org.apache.tapestry5.internal.services.ComponentMessagesSourceImpl
-
- All Implemented Interfaces:
UpdateListener,ComponentMessagesSource
public class ComponentMessagesSourceImpl extends java.lang.Object implements ComponentMessagesSource, UpdateListener
-
-
Constructor Summary
Constructors Constructor Description ComponentMessagesSourceImpl(boolean productionMode, boolean multipleClassLoaders, java.util.List<Resource> appCatalogResources, PropertiesFileParser parser, ComponentResourceLocator resourceLocator, ClasspathURLConverter classpathURLConverter, ComponentRequestSelectorAnalyzer componentRequestSelectorAnalyzer, ThreadLocale threadLocale, ComponentClassResolver componentClassResolver, org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckForUpdates()Invoked to force the receiver to check for updates to whatever underlying resources it makes use of.MessagesgetApplicationCatalog(java.util.Locale locale)Gets the Messages derived from the application's message catalog.InvalidationEventHubgetInvalidationEventHub()Returns the event hub that allows listeners to be notified when any underlying message catalog file is changed.MessagesgetMessages(ComponentModel componentModel, java.util.Locale locale)Used to obtain aMessagesinstance for a particular component, within a particular locale.MessagesgetMessages(ComponentModel componentModel, ComponentResourceSelector selector)Used to obtain aMessagesinstance for a particular component, using a particular selector.voidsetupReload(ReloadHelper reloadHelper)
-
-
-
Constructor Detail
-
ComponentMessagesSourceImpl
public ComponentMessagesSourceImpl(@Symbol("tapestry.production-mode") boolean productionMode, @Symbol("tapestry.multiple-classloaders") boolean multipleClassLoaders, java.util.List<Resource> appCatalogResources, PropertiesFileParser parser, ComponentResourceLocator resourceLocator, ClasspathURLConverter classpathURLConverter, ComponentRequestSelectorAnalyzer componentRequestSelectorAnalyzer, ThreadLocale threadLocale, ComponentClassResolver componentClassResolver, org.slf4j.Logger logger)
-
-
Method Detail
-
setupReload
@PostInjection public void setupReload(ReloadHelper reloadHelper)
-
checkForUpdates
public void checkForUpdates()
Description copied from interface:UpdateListenerInvoked to force the receiver to check for updates to whatever underlying resources it makes use of.- Specified by:
checkForUpdatesin interfaceUpdateListener
-
getMessages
public Messages getMessages(ComponentModel componentModel, java.util.Locale locale)
Description copied from interface:ComponentMessagesSourceUsed to obtain aMessagesinstance for a particular component, within a particular locale. If the component extends from another component, then its localized properties will merge with its parent's properties (with the subclass overriding the super class on any conflicts).- Specified by:
getMessagesin interfaceComponentMessagesSource- Returns:
- the message catalog for the component, in the indicated locale
-
getMessages
public Messages getMessages(ComponentModel componentModel, ComponentResourceSelector selector)
Description copied from interface:ComponentMessagesSourceUsed to obtain aMessagesinstance for a particular component, using a particular selector. If the component extends from another component, then its localized properties will merge with its parent's properties (with the subclass overriding the super class on any conflicts).- Specified by:
getMessagesin interfaceComponentMessagesSourceselector- determined correct version of messages to obtain- Returns:
- the message catalog for the component, in the indicated selector
-
getApplicationCatalog
public Messages getApplicationCatalog(java.util.Locale locale)
Description copied from interface:ComponentMessagesSourceGets the Messages derived from the application's message catalog.- Specified by:
getApplicationCatalogin interfaceComponentMessagesSource
-
getInvalidationEventHub
public InvalidationEventHub getInvalidationEventHub()
Description copied from interface:ComponentMessagesSourceReturns the event hub that allows listeners to be notified when any underlying message catalog file is changed.- Specified by:
getInvalidationEventHubin interfaceComponentMessagesSource
-
-