|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.i18n.MessagesManager info.magnolia.cms.i18n.DefaultMessagesManager
public class DefaultMessagesManager
Default MessagesManager implementation.
Nested Class Summary | |
---|---|
static class |
DefaultMessagesManager.MessagesID
Used as the key in the Map. |
Field Summary |
---|
Fields inherited from class info.magnolia.cms.i18n.MessagesManager |
---|
DEFAULT_BASENAME, FALLBACK_LOCALE, FALLBACK_NODEDATA, I18N_CONFIG_PATH, LANGUAGES_NODE_NAME |
Constructor Summary | |
---|---|
DefaultMessagesManager()
|
Method Summary | |
---|---|
Collection |
getAvailableLocales()
|
Locale |
getDefaultLocale()
|
Messages |
getMessagesInternal(String basename,
Locale locale)
|
void |
init()
Called through the initialization process. |
protected void |
initMap()
The lazy Map creates messages objects with a fall back to the default locale. |
protected void |
load()
Load i18n configuration. |
protected Messages |
newMessages(DefaultMessagesManager.MessagesID messagesID)
Initializes a new Messages instances for the given MessagesID. |
void |
reload()
Reload i18n configuration. |
void |
setDefaultLocale(String defaultLocale)
Deprecated. since 4.0 - not used and should not be. Use setLocale() on the SystemContext instead. --note: do not remove the method, make it private. applicationLocale field is still needed. --and/or remove duplication with SystemContext.locale |
void |
setMessages(Map messages)
|
Methods inherited from class info.magnolia.cms.i18n.MessagesManager |
---|
get, get, getInstance, getMessages, getMessages, getMessages, getMessages, getWithDefault, getWithDefault |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMessagesManager()
Method Detail |
---|
public void init()
init
in class MessagesManager
protected void initMap()
protected Messages newMessages(DefaultMessagesManager.MessagesID messagesID)
protected void load()
public void reload()
reload
in class MessagesManager
public Messages getMessagesInternal(String basename, Locale locale)
getMessagesInternal
in class MessagesManager
public Locale getDefaultLocale()
getDefaultLocale
in class MessagesManager
public void setDefaultLocale(String defaultLocale)
defaultLocale
- The defaultLocale to set.public Collection getAvailableLocales()
getAvailableLocales
in class MessagesManager
public void setMessages(Map messages)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |