org.slim3.commons.message
Class MessageResourceBundleFactory

java.lang.Object
  extended by org.slim3.commons.message.MessageResourceBundleFactory

public final class MessageResourceBundleFactory
extends Object

A factory class for MessageResourceBundle.

Since:
3.0
Author:
higa

Method Summary
protected static MessageResourceBundle createBundle(String path)
          Creates a message bundle.
static MessageResourceBundle getBundle(Locale locale, String messageBundleName)
          Returns the message bundle.
protected static MessageResourceBundle getBundle(String messageBundleName)
          Returns the message bundle.
protected static File getFile(String path)
          Returns a file for the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBundle

public static MessageResourceBundle getBundle(Locale locale,
                                              String messageBundleName)
                                       throws NullPointerException
Returns the message bundle. If message bundle is not found, returns null.

Parameters:
locale - the locale
messageBundleName - the message bundle name such as aaa.foo(WEB-INF/classes/aaa/foo.properties)
Returns:
a message bundle
Throws:
NullPointerException - if the locale parameter is null or if the messageBundleName parameter is null

getBundle

protected static MessageResourceBundle getBundle(String messageBundleName)
Returns the message bundle.

Parameters:
messageBundleName - the message bundle name
Returns:
the message bundle

getFile

protected static File getFile(String path)
Returns a file for the path.

Parameters:
path - the path
Returns:
a file for the path

createBundle

protected static MessageResourceBundle createBundle(String path)
Creates a message bundle.

Parameters:
path - the path
Returns:
a message bundle


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.