Interface ComponentMessagesSource
-
- All Known Implementing Classes:
ComponentMessagesSourceImpl
@UsesOrderedConfiguration(Resource.class) public interface ComponentMessagesSource
Used to connect a Tapestry component to its message catalog, or to obtain the application catalog (that all component message catalogs extend from). The application catalog is defined by the collection ofResource
s contributed to the service. In general, component libraries will contribute a Resource before the "AppCatalog" resource (representing the application message catalog, WEB-INF/app.properties) so that the application can override messages of the component library.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Messages
getApplicationCatalog(Locale locale)
Gets the Messages derived from the application's message catalog.InvalidationEventHub
getInvalidationEventHub()
Returns the event hub that allows listeners to be notified when any underlying message catalog file is changed.Messages
getMessages(ComponentModel componentModel, Locale locale)
Deprecated.Deprecated in 5.3; usegetMessages(ComponentModel, ComponentResourceSelector)
instead.Messages
getMessages(ComponentModel componentModel, ComponentResourceSelector selector)
Used to obtain aMessages
instance for a particular component, using a particular selector.
-
-
-
Method Detail
-
getMessages
Messages getMessages(ComponentModel componentModel, Locale locale)
Deprecated.Deprecated in 5.3; usegetMessages(ComponentModel, ComponentResourceSelector)
instead.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).- Parameters:
componentModel
-locale
-- Returns:
- the message catalog for the component, in the indicated locale
-
getMessages
Messages getMessages(ComponentModel componentModel, ComponentResourceSelector selector)
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).- Parameters:
componentModel
-selector
- determined correct version of messages to obtain- Returns:
- the message catalog for the component, in the indicated selector
- Since:
- 5.3
-
getApplicationCatalog
Messages getApplicationCatalog(Locale locale)
Gets the Messages derived from the application's message catalog.- Since:
- 5.2.0
-
getInvalidationEventHub
@NotLazy InvalidationEventHub getInvalidationEventHub()
Returns the event hub that allows listeners to be notified when any underlying message catalog file is changed.- Since:
- 5.1.0.0
-
-