public class CachedMessageSource extends org.springframework.context.support.AbstractMessageSource implements MutableMessageSource
| Constructor and Description |
|---|
CachedMessageSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPresentation(PresentationMessage message)
Adds a presentation message to the source.
|
Collection<Locale> |
getLocales()
Gets the locales for which messages are available from this source.
|
PresentationMessage |
getPresentation(String key,
Locale forLocale)
Gets the PresentationMessage for a particular locale.
|
Collection<PresentationMessage> |
getPresentations()
Gets all of the available messages, packaged as PresentationMessages.
|
Collection<PresentationMessage> |
getPresentationsInLocale(Locale locale)
Gets alll the available messages in a particular locale, packaged as PresentationMessages.
|
void |
merge(MutableMessageSource fromSource,
boolean overwrite)
Merge messages from another source into this source.
|
void |
publishProperties(Properties arg0,
String arg1,
String arg2,
String arg3,
String arg4)
Deprecated.
|
void |
removePresentation(PresentationMessage message)
Removes a presentation message from the source.
|
protected MessageFormat |
resolveCode(String code,
Locale locale) |
getDefaultMessage, getMessage, getMessage, getMessage, getMessageFromParent, getMessageInternal, getParentMessageSource, isUseCodeAsDefaultMessage, resolveArguments, resolveCodeWithoutArguments, setParentMessageSource, setUseCodeAsDefaultMessagecreateMessageFormat, formatMessage, isAlwaysUseMessageFormat, renderDefaultMessage, setAlwaysUseMessageFormatclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic void addPresentation(PresentationMessage message)
MutableMessageSourceaddPresentation in interface MutableMessageSourcemessage - message to add to the sourcepublic Collection<Locale> getLocales()
MutableMessageSourcegetLocales in interface MutableMessageSourceMutableMessageSource.getLocales()public Collection<PresentationMessage> getPresentations()
MutableMessageSourcegetPresentations in interface MutableMessageSourcepublic void publishProperties(Properties arg0, String arg1, String arg2, String arg3, String arg4)
MutableMessageSourcepublishProperties in interface MutableMessageSourcearg0 - key/value properties for the messagesarg1 - locale in which the messages are expressedarg2 - namespace within which the properties are valid ("" for generic, "module"
for modules, etc)arg3 - unique name for the properties within the namespacearg4 - version of the propertiesMutableMessageSource.publishProperties(java.util.Properties,
java.lang.String, java.lang.String, java.lang.String, java.lang.String)public void removePresentation(PresentationMessage message)
MutableMessageSourceremovePresentation in interface MutableMessageSourcemessage - the message to removepublic void merge(MutableMessageSource fromSource, boolean overwrite)
MutableMessageSourcemerge in interface MutableMessageSourcefromSource - message source from which messages should be mergeoverwrite - whether to overwrite existing messagespublic PresentationMessage getPresentation(String key, Locale forLocale)
MutableMessageSourcegetPresentation in interface MutableMessageSourcekey - textual key for the messageforLocale - locale for which to get the messageMutableMessageSource.getPresentation(java.lang.String,
java.util.Locale)public Collection<PresentationMessage> getPresentationsInLocale(Locale locale)
MutableMessageSourcegetPresentationsInLocale in interface MutableMessageSourcelocale - locale for which to get the messagesMutableMessageSource.getPresentationsInLocale(java.util.Locale)protected MessageFormat resolveCode(String code, Locale locale)
resolveCode in class org.springframework.context.support.AbstractMessageSourceAbstractMessageSource.resolveCode(java.lang.String,
java.util.Locale)Copyright © 2018 OpenMRS LLC.. All Rights Reserved.