Class ComponentMessagesSourceImpl
java.lang.Object
org.apache.tapestry5.internal.services.ComponentMessagesSourceImpl
- All Implemented Interfaces:
UpdateListener
,ComponentMessagesSource
public class ComponentMessagesSourceImpl
extends Object
implements ComponentMessagesSource, UpdateListener
-
Constructor Summary
ConstructorsConstructorDescriptionComponentMessagesSourceImpl
(boolean productionMode, boolean multipleClassLoaders, List<Resource> appCatalogResources, PropertiesFileParser parser, ComponentResourceLocator resourceLocator, ClasspathURLConverter classpathURLConverter, ComponentRequestSelectorAnalyzer componentRequestSelectorAnalyzer, ThreadLocale threadLocale, ComponentClassResolver componentClassResolver, org.slf4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked to force the receiver to check for updates to whatever underlying resources it makes use of.getApplicationCatalog
(Locale locale) Gets the Messages derived from the application's message catalog.Returns the event hub that allows listeners to be notified when any underlying message catalog file is changed.getMessages
(ComponentModel componentModel, Locale locale) Used to obtain aMessages
instance for a particular component, within a particular locale.getMessages
(ComponentModel componentModel, ComponentResourceSelector selector) Used to obtain aMessages
instance for a particular component, using a particular selector.void
setupReload
(ReloadHelper reloadHelper)
-
Constructor Details
-
ComponentMessagesSourceImpl
public ComponentMessagesSourceImpl(@Symbol("tapestry.production-mode") boolean productionMode, @Symbol("tapestry.multiple-classloaders") boolean multipleClassLoaders, List<Resource> appCatalogResources, PropertiesFileParser parser, ComponentResourceLocator resourceLocator, ClasspathURLConverter classpathURLConverter, ComponentRequestSelectorAnalyzer componentRequestSelectorAnalyzer, ThreadLocale threadLocale, ComponentClassResolver componentClassResolver, org.slf4j.Logger logger)
-
-
Method Details
-
setupReload
-
checkForUpdates
Description copied from interface:UpdateListener
Invoked to force the receiver to check for updates to whatever underlying resources it makes use of.- Specified by:
checkForUpdates
in interfaceUpdateListener
-
getMessages
Description copied from interface:ComponentMessagesSource
Used to obtain aMessages
instance 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:
getMessages
in interfaceComponentMessagesSource
- Returns:
- the message catalog for the component, in the indicated locale
-
getMessages
Description copied from interface:ComponentMessagesSource
Used to obtain aMessages
instance 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:
getMessages
in interfaceComponentMessagesSource
selector
- determined correct version of messages to obtain- Returns:
- the message catalog for the component, in the indicated selector
-
getApplicationCatalog
Description copied from interface:ComponentMessagesSource
Gets the Messages derived from the application's message catalog.- Specified by:
getApplicationCatalog
in interfaceComponentMessagesSource
-
getInvalidationEventHub
Description copied from interface:ComponentMessagesSource
Returns the event hub that allows listeners to be notified when any underlying message catalog file is changed.- Specified by:
getInvalidationEventHub
in interfaceComponentMessagesSource
-