public class CompositeMessageSource extends AbstractMessageSource implements MessageSource
MessageProviders in
the application context. The resolved messages are cached by default. The caching can be turned off.| Modifier and Type | Field and Description |
|---|---|
static String |
ENV_PROP_MESSAGE_FORMAT_CACHE_ENABLED |
logger| Constructor and Description |
|---|
CompositeMessageSource(ApplicationContext applicationContext)
Creates a new
CompositeMessageSource. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearMessageProviderCaches()
Clears the caches of all message providers.
|
boolean |
isMessageFormatCacheEnabled()
Returns whether the resolved messages are cached or not.
|
protected MessageFormat |
resolveCode(String s,
Locale locale) |
void |
setMessageFormatCacheEnabled(boolean messageFormatCacheEnabled)
Enables or disables caching of resolved messages.
|
getCommonMessages, getDefaultMessage, getDefaultMessage, getMessage, getMessage, getMessage, getMessageFromParent, getMessageInternal, getParentMessageSource, isUseCodeAsDefaultMessage, resolveArguments, resolveCodeWithoutArguments, setCommonMessages, setParentMessageSource, setUseCodeAsDefaultMessagecreateMessageFormat, formatMessage, isAlwaysUseMessageFormat, renderDefaultMessage, setAlwaysUseMessageFormatclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMessage, getMessage, getMessagepublic static final String ENV_PROP_MESSAGE_FORMAT_CACHE_ENABLED
public CompositeMessageSource(ApplicationContext applicationContext)
CompositeMessageSource.applicationContext - the application context to use when looking up
MessageProviders, must not be null.public void clearMessageProviderCaches()
MessageProvider.clearCache()public boolean isMessageFormatCacheEnabled()
public void setMessageFormatCacheEnabled(boolean messageFormatCacheEnabled)
"vaadin4spring.i18n.message-format-cache.enabled"
environment property.protected MessageFormat resolveCode(String s, Locale locale)
resolveCode in class AbstractMessageSourceCopyright © 2017. All rights reserved.