|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.MessageSourceSupport org.springframework.context.support.AbstractMessageSource org.springframework.context.support.ReloadableResourceBundleMessageSource org.openmrs.messagesource.impl.MutableResourceBundleMessageSource
public class MutableResourceBundleMessageSource
ResourceBundleMessageSource extends ReloadableResourceBundleMessageSource to provide the additional features of a MutableMessageSource.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.springframework.context.support.ReloadableResourceBundleMessageSource |
---|
org.springframework.context.support.ReloadableResourceBundleMessageSource.PropertiesHolder |
Field Summary |
---|
Fields inherited from class org.springframework.context.support.MessageSourceSupport |
---|
logger |
Constructor Summary | |
---|---|
MutableResourceBundleMessageSource()
|
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()
Returns all available messages. |
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 props,
java.lang.String locale,
java.lang.String namespace,
java.lang.String name,
java.lang.String version)
Deprecated. use merge(MutableMessageSource, boolean) |
void |
removePresentation(PresentationMessage message)
Removes a presentation message from the source. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
void |
setBasename(java.lang.String basename)
Override to obtain a local reference to the basenames. |
void |
setBasenames(java.lang.String[] basenames)
Override to obtain a local reference to the basenames. |
void |
setCacheSeconds(int cacheSeconds)
|
Methods inherited from class org.springframework.context.support.ReloadableResourceBundleMessageSource |
---|
calculateAllFilenames, calculateFilenamesForLocale, clearCache, clearCacheIncludingAncestors, getMergedProperties, getProperties, loadProperties, refreshProperties, resolveCode, resolveCodeWithoutArguments, setDefaultEncoding, setFallbackToSystemLocale, setFileEncodings, setPropertiesPersister, setResourceLoader, toString |
Methods inherited from class org.springframework.context.support.AbstractMessageSource |
---|
getDefaultMessage, getMessage, getMessage, getMessage, getMessageFromParent, getMessageInternal, getParentMessageSource, isUseCodeAsDefaultMessage, renderDefaultMessage, resolveArguments, 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, 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 MutableResourceBundleMessageSource()
Method Detail |
---|
public java.util.Collection<java.util.Locale> getLocales()
MutableMessageSource
getLocales
in interface MutableMessageSource
MutableMessageSource.getLocales()
public void setCacheSeconds(int cacheSeconds)
setCacheSeconds
in class org.springframework.context.support.ReloadableResourceBundleMessageSource
@Deprecated public void publishProperties(java.util.Properties props, java.lang.String locale, java.lang.String namespace, java.lang.String name, java.lang.String version)
publishProperties
in interface MutableMessageSource
props
- key/value properties for the messageslocale
- locale in which the messages are expressednamespace
- namespace within which the properties are valid ("" for generic, "module"
for modules, etc)name
- unique name for the properties within the namespaceversion
- version of the propertiesMutableMessageSource.publishProperties(java.util.Properties,
java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext)
public java.util.Collection<PresentationMessage> getPresentations()
getPresentations
in interface MutableMessageSource
MutableMessageSource.getPresentations()
public void setBasename(java.lang.String basename)
setBasename
in class org.springframework.context.support.ReloadableResourceBundleMessageSource
ReloadableResourceBundleMessageSource.setBasename(java.lang.String)
public void setBasenames(java.lang.String[] basenames)
setBasenames
in class org.springframework.context.support.ReloadableResourceBundleMessageSource
ReloadableResourceBundleMessageSource.setBasenames(java.lang.String[])
public void addPresentation(PresentationMessage message)
MutableMessageSource
addPresentation
in interface MutableMessageSource
message
- message to add to the sourceMutableMessageSource.addPresentation(org.openmrs.messagesource.PresentationMessage)
public void removePresentation(PresentationMessage message)
MutableMessageSource
removePresentation
in interface MutableMessageSource
message
- the message to removeMutableMessageSource.removePresentation(org.openmrs.messagesource.PresentationMessage)
public void merge(MutableMessageSource fromSource, boolean overwrite)
MutableMessageSource
merge
in interface MutableMessageSource
fromSource
- message source from which messages should be mergeoverwrite
- whether to overwrite existing messagesMutableMessageSource.merge(MutableMessageSource, boolean)
public PresentationMessage getPresentation(java.lang.String key, java.util.Locale forLocale)
MutableMessageSource
getPresentation
in interface MutableMessageSource
key
- 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 MutableMessageSource
locale
- locale for which to get the messages
MutableMessageSource.getPresentationsInLocale(java.util.Locale)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |