@Transactional
public interface MutableMessageSource
extends org.springframework.context.MessageSource, org.springframework.context.HierarchicalMessageSource
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 props,
String locale,
String namespace,
String name,
String version)
Deprecated.
|
void |
removePresentation(PresentationMessage message)
Removes a presentation message from the source.
|
Collection<Locale> getLocales()
void publishProperties(Properties props, String locale, String namespace, String name, String version)
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 propertiesCollection<PresentationMessage> getPresentations()
Collection<PresentationMessage> getPresentationsInLocale(Locale locale)
locale
- locale for which to get the messagesvoid addPresentation(PresentationMessage message)
message
- message to add to the sourcePresentationMessage getPresentation(String key, Locale forLocale)
key
- textual key for the messageforLocale
- locale for which to get the messagevoid removePresentation(PresentationMessage message)
message
- the message to removevoid merge(MutableMessageSource fromSource, boolean overwrite)
fromSource
- message source from which messages should be mergeoverwrite
- whether to overwrite existing messagesCopyright © 2018 OpenMRS LLC.. All Rights Reserved.