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(java.lang.String basename, java.util.Locale locale)
           
 
Method Summary
 java.lang.String get(java.lang.String key)
          Get the message from the bundle.
protected  java.util.ResourceBundle getBundle()
          Returns the bundle for the current basename.
 java.util.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(java.lang.String basename,
                              java.util.Locale locale)
Method Detail

get

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

Parameters:
key - the key
Returns:
message

getBundle

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


reload

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

Throws:
java.lang.Exception

keys

public java.util.Iterator keys()
Iterate over the keys.

Returns:
iterator


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