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, Serializable

public class DefaultMessagesImpl
extends AbstractMessagesImpl
implements Serializable

Loads the message from properties files accessed as classpath resources.

Version:
$Revision$ ($Author$)
Author:
Philipp Bracher
See Also:
Serialized Form

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<String> 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.

Specified by:
get in interface Messages
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.

Specified by:
reload in interface Messages
Throws:
Exception

keys

public Iterator<String> keys()
Iterate over the keys.

Specified by:
keys in interface Messages
Returns:
iterator


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