org.apache.geronimo.gshell.i18n
Class ResourceBundleMessageSource

java.lang.Object
  extended by org.apache.geronimo.gshell.i18n.ResourceBundleMessageSource
All Implemented Interfaces:
MessageSource

public class ResourceBundleMessageSource
extends Object
implements MessageSource

Message source backed up by one or more ResourceBundle instances for simple i18n support.

Version:
$Rev: 572585 $ $Date: 2007-09-04 01:52:44 -0700 (Tue, 04 Sep 2007) $

Nested Class Summary
 class ResourceBundleMessageSource.ResourceNotFoundException
           
 
Constructor Summary
ResourceBundleMessageSource(Class type)
           
ResourceBundleMessageSource(Class[] types)
           
ResourceBundleMessageSource(String name)
           
ResourceBundleMessageSource(String[] names)
           
 
Method Summary
 String format(String code, Object... args)
          Format a message (based on MessageFormat using the message from the resource bundles using the given code as a pattern and the given objects as arguments.
 String getMessage(String code)
          Get a raw message from the resource bundles using the given code.
 Object getProperty(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleMessageSource

public ResourceBundleMessageSource(String[] names)

ResourceBundleMessageSource

public ResourceBundleMessageSource(String name)

ResourceBundleMessageSource

public ResourceBundleMessageSource(Class[] types)

ResourceBundleMessageSource

public ResourceBundleMessageSource(Class type)
Method Detail

getMessage

public String getMessage(String code)
Get a raw message from the resource bundles using the given code.

Specified by:
getMessage in interface MessageSource

format

public String format(String code,
                     Object... args)
Format a message (based on MessageFormat using the message from the resource bundles using the given code as a pattern and the given objects as arguments.

Specified by:
format in interface MessageSource

getProperty

public Object getProperty(String name)
See Also:
getMessage(String)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.