|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.context.support.MessageSourceSupport
org.springframework.context.support.AbstractMessageSource
org.openmrs.messagesource.impl.CachedMessageSource
public class CachedMessageSource
A MutableMessageSource backed by a localized map of PresentationMessageCollections, providing in-memory storage of PresentationMessages. Useful for temporary storage, as a cache for other sources, and for testing.
| Field Summary |
|---|
| Fields inherited from class org.springframework.context.support.MessageSourceSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
CachedMessageSource()
|
|
| Method Summary | |
|---|---|
void |
addPresentation(PresentationMessage message)
Adds a presentation message to the source. |
java.util.Collection<java.util.Locale> |
getLocales()
Gets the locales for which messages are available from this source. |
PresentationMessage |
getPresentation(java.lang.String key,
java.util.Locale forLocale)
Gets the PresentationMessage for a particular locale. |
java.util.Collection<PresentationMessage> |
getPresentations()
Gets all of the available messages, packaged as PresentationMessages. |
java.util.Collection<PresentationMessage> |
getPresentationsInLocale(java.util.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(java.util.Properties arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
Deprecated. use merge(MutableMessageSource, boolean) |
void |
removePresentation(PresentationMessage message)
Removes a presentation message from the source. |
protected java.text.MessageFormat |
resolveCode(java.lang.String code,
java.util.Locale locale)
|
| Methods inherited from class org.springframework.context.support.AbstractMessageSource |
|---|
getDefaultMessage, getMessage, getMessage, getMessage, getMessageFromParent, getMessageInternal, getParentMessageSource, isUseCodeAsDefaultMessage, renderDefaultMessage, resolveArguments, resolveCodeWithoutArguments, setParentMessageSource, setUseCodeAsDefaultMessage |
| Methods inherited from class org.springframework.context.support.MessageSourceSupport |
|---|
createMessageFormat, formatMessage, isAlwaysUseMessageFormat, setAlwaysUseMessageFormat |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.context.HierarchicalMessageSource |
|---|
getParentMessageSource, setParentMessageSource |
| Methods inherited from interface org.springframework.context.MessageSource |
|---|
getMessage, getMessage, getMessage |
| Constructor Detail |
|---|
public CachedMessageSource()
| Method Detail |
|---|
public void addPresentation(PresentationMessage message)
MutableMessageSource
addPresentation in interface MutableMessageSourcemessage - message to add to the sourcepublic java.util.Collection<java.util.Locale> getLocales()
MutableMessageSource
getLocales in interface MutableMessageSourceMutableMessageSource.getLocales()public java.util.Collection<PresentationMessage> getPresentations()
MutableMessageSource
getPresentations in interface MutableMessageSource
public void publishProperties(java.util.Properties arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
MutableMessageSource
publishProperties 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)
MutableMessageSource
removePresentation in interface MutableMessageSourcemessage - the message to remove
public void merge(MutableMessageSource fromSource,
boolean overwrite)
MutableMessageSource
merge in interface MutableMessageSourcefromSource - message source from which messages should be mergeoverwrite - whether to overwrite existing messages
public PresentationMessage getPresentation(java.lang.String key,
java.util.Locale forLocale)
MutableMessageSource
getPresentation in interface MutableMessageSourcekey - textual key for the messageforLocale - locale for which to get the message
MutableMessageSource.getPresentation(java.lang.String,
java.util.Locale)public java.util.Collection<PresentationMessage> getPresentationsInLocale(java.util.Locale locale)
MutableMessageSource
getPresentationsInLocale in interface MutableMessageSourcelocale - locale for which to get the messages
MutableMessageSource.getPresentationsInLocale(java.util.Locale)
protected java.text.MessageFormat resolveCode(java.lang.String code,
java.util.Locale locale)
resolveCode in class org.springframework.context.support.AbstractMessageSourceAbstractMessageSource.resolveCode(java.lang.String,
java.util.Locale)
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||