info.magnolia.cms.i18n
Class DefaultMessagesImpl

java.lang.Object
  extended by info.magnolia.cms.i18n.AbstractMessagesImpl
      extended by info.magnolia.cms.i18n.DefaultMessagesImpl
All Implemented Interfaces:
Messages

public class DefaultMessagesImpl
extends AbstractMessagesImpl

Loads the message from properties files accessed as classpath resources.

Version:
$Revision: 41137 $ ($Author: gjoseph $)
Author:
Philipp Bracher

Field Summary
 
Fields inherited from class info.magnolia.cms.i18n.AbstractMessagesImpl
basename, bundle, JS_OBJECTNAME, locale, log
 
Constructor Summary
protected DefaultMessagesImpl(String basename, Locale locale)
           
 
Method Summary
 String get(String key)
          Get the message from the bundle.
protected  ResourceBundle getBundle()
          Returns the bundle for the current basename.
 Iterator keys()
          Iterate over the keys.
 void reload()
          Reload the messages.
 
Methods inherited from class info.magnolia.cms.i18n.AbstractMessagesImpl
equals, get, getBasename, getLocale, getWithDefault, getWithDefault, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultMessagesImpl

protected DefaultMessagesImpl(String basename,
                              Locale locale)
Method Detail

get

public String get(String key)
Get the message from the bundle.

Parameters:
key - the key
Returns:
message

getBundle

protected ResourceBundle getBundle()
Returns the bundle for the current basename.


reload

public void reload()
            throws Exception
Description copied from interface: Messages
Reload the messages.

Throws:
Exception

keys

public Iterator keys()
Iterate over the keys.

Returns:
iterator


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.