JPF 1.5.1

org.java.plugin.util
Class ResourceManager

java.lang.Object
  extended by org.java.plugin.util.ResourceManager

public final class ResourceManager
extends java.lang.Object

Utility class to manage localization resources. This class is not for public usage but mainly for custom implementations developers to provide them uniform access and organization of locale specific data.
Class usage is very simple. Put your locale sensible data into Resources.properties files and save them near classes that you are going to get localized. For Locale to file mapping details see ResourceBundle documentation.

Version:
$Id$

Method Summary
static java.lang.String getMessage(java.lang.String packageName, java.lang.String messageKey)
           
static java.lang.String getMessage(java.lang.String packageName, java.lang.String messageKey, java.util.Locale locale)
           
static java.lang.String getMessage(java.lang.String packageName, java.lang.String messageKey, java.util.Locale locale, java.lang.Object data)
           
static java.lang.String getMessage(java.lang.String packageName, java.lang.String messageKey, java.lang.Object data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMessage

public static java.lang.String getMessage(java.lang.String packageName,
                                          java.lang.String messageKey)
Parameters:
packageName - package name, used for Resources.properties file look-up
messageKey - message key
Returns:
message for default locale

getMessage

public static java.lang.String getMessage(java.lang.String packageName,
                                          java.lang.String messageKey,
                                          java.lang.Object data)
Parameters:
packageName - package name, used for Resources.properties file look-up
messageKey - message key
data - data for parameter placeholders substitution, may be Object, array or Collection.
Returns:
message for default locale

getMessage

public static java.lang.String getMessage(java.lang.String packageName,
                                          java.lang.String messageKey,
                                          java.util.Locale locale)
Parameters:
packageName - package name, used for Resources.properties file look-up
messageKey - message key
locale - locale to get message for
Returns:
message for given locale

getMessage

public static java.lang.String getMessage(java.lang.String packageName,
                                          java.lang.String messageKey,
                                          java.util.Locale locale,
                                          java.lang.Object data)
Parameters:
packageName - package name, used for Resources.properties file look-up
messageKey - message key
locale - locale to get message for
data - data for parameter placeholders substitution, may be Object, array or Collection.
Returns:
message for given locale

JPF 1.5.1

Copyright © 2004-2007 Dmitry Olshansky. All Rights Reserved.