public class MutableResourceBundleMessageSource extends org.springframework.context.support.ReloadableResourceBundleMessageSource implements MutableMessageSource
| Constructor and Description |
|---|
MutableResourceBundleMessageSource() |
| 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()
Returns all available messages.
|
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 |
removePresentation(PresentationMessage message)
Removes a presentation message from the source.
|
void |
setBasename(String basename)
Override to obtain a local reference to the basenames.
|
void |
setBasenames(String... basenames)
Override to obtain a local reference to the basenames.
|
void |
setCacheSeconds(int cacheSeconds) |
calculateAllFilenames, calculateFilenamesForLocale, clearCache, clearCacheIncludingAncestors, getMergedProperties, getProperties, loadProperties, newProperties, refreshProperties, resolveCode, resolveCodeWithoutArguments, setConcurrentRefresh, setFileEncodings, setPropertiesPersister, setResourceLoader, toStringaddBasenames, getBasenameSet, getCacheMillis, getDefaultEncoding, getDefaultLocale, isFallbackToSystemLocale, setCacheMillis, setDefaultEncoding, setDefaultLocale, setFallbackToSystemLocalegetCommonMessages, getDefaultMessage, getDefaultMessage, getMessage, getMessage, getMessage, getMessageFromParent, getMessageInternal, getParentMessageSource, isUseCodeAsDefaultMessage, resolveArguments, setCommonMessages, setParentMessageSource, setUseCodeAsDefaultMessagecreateMessageFormat, formatMessage, isAlwaysUseMessageFormat, renderDefaultMessage, setAlwaysUseMessageFormatclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic Collection<Locale> getLocales()
MutableMessageSourcegetLocales in interface MutableMessageSourceMutableMessageSource.getLocales()public void setCacheSeconds(int cacheSeconds)
setCacheSeconds in class org.springframework.context.support.AbstractResourceBasedMessageSourcepublic Collection<PresentationMessage> getPresentations()
getPresentations in interface MutableMessageSourceMutableMessageSource.getPresentations()public void setBasename(String basename)
setBasename in class org.springframework.context.support.AbstractResourceBasedMessageSourceAbstractResourceBasedMessageSource.setBasename(java.lang.String)public void setBasenames(String... basenames)
setBasenames in class org.springframework.context.support.AbstractResourceBasedMessageSourceAbstractResourceBasedMessageSource.setBasenames(java.lang.String[])public void addPresentation(PresentationMessage message)
MutableMessageSourceaddPresentation in interface MutableMessageSourcemessage - message to add to the sourceMutableMessageSource.addPresentation(org.openmrs.messagesource.PresentationMessage)public void removePresentation(PresentationMessage message)
MutableMessageSourceremovePresentation in interface MutableMessageSourcemessage - the message to removeMutableMessageSource.removePresentation(org.openmrs.messagesource.PresentationMessage)public void merge(MutableMessageSource fromSource, boolean overwrite)
MutableMessageSourcemerge in interface MutableMessageSourcefromSource - message source from which messages should be mergeoverwrite - whether to overwrite existing messagesMutableMessageSource.merge(MutableMessageSource, boolean)public 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)Copyright © 2024 OpenMRS Inc.. All rights reserved.