com.ibm.commerce.accesscontrol.policyeditor.util
Class Resource

java.lang.Object
  |
  +--com.ibm.commerce.accesscontrol.policyeditor.util.Resource

public class Resource
extends java.lang.Object

Contains a table of resource bundles for PolicyEditor. When the resources for a particular locale are requested for the fist time it will be loaded into the table. Creation date: (6/15/01 10:09:24 AM)


Constructor Summary
Resource()
          Resource constructor comment.
 
Method Summary
static java.lang.String getMessage(java.lang.String id)
          get the nls message for the key
static java.lang.String getMessage(java.lang.String id, java.util.Locale locale)
          get the nls message for the key for the given locale.
static java.lang.String getMessage(java.lang.String id, java.lang.Object p1)
          get the nls message for the key after replacing $$1%% with the string value of object p1.
static java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.util.Locale locale)
          get the nls message for the key for the given locale after replacing $$1%% with the string value of object p1.
static java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2)
          get the nls message for the key after replacing $$1%% with the string value of object p1 and $$2%% with the String value of object p2.
static java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2, java.util.Locale locale)
          get the nls message for the key for the given locale after replacing $$1%% with the string value of object p1 and $$2%% with the String valueof object p2.
static java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
          get the nls message for the key after replacing $$1%% with the string value of object p1 and $$2%% with the String value of object p2 and so on.
static java.lang.String getMessage(java.lang.String id, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.util.Locale locale)
          get the nls message for the key for the given locale after replacing $$1%% with the string value of object p1 and $$2%% with the String valueof object p2 etc.
static void initialize(java.util.Locale l)
          Initialize the resource table.
static void main(java.lang.String[] args)
          main entry point of the program.
static void setLocale(java.lang.String language)
          Set the current locale of the resource bundle and initialize the resource table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Resource constructor comment.
Method Detail

getMessage

public static java.lang.String getMessage(java.lang.String id)
get the nls message for the key
Parameters:
String - key for the nls message
Returns:
String nls message if resource is available. else the key itself

getMessage

public static java.lang.String getMessage(java.lang.String id,
                                          java.util.Locale locale)
get the nls message for the key for the given locale.
Parameters:
String - key for the nls message
Returns:
String nls message if resource is available. else the key itself

getMessage

public static java.lang.String getMessage(java.lang.String id,
                                          java.lang.Object p1)
get the nls message for the key after replacing $$1%% with the string value of object p1.
Parameters:
String - key for the nls message
Object - p1
Returns:
String nls message if resource is available. else the key itself

getMessage

public static java.lang.String getMessage(java.lang.String id,
                                          java.lang.Object p1,
                                          java.util.Locale locale)
get the nls message for the key for the given locale after replacing $$1%% with the string value of object p1.
Parameters:
String - key for the nls message
Object - p1
Locale - locale
Returns:
String nls message if resource is available. else the key itself

getMessage

public static java.lang.String getMessage(java.lang.String id,
                                          java.lang.Object p1,
                                          java.lang.Object p2)
get the nls message for the key after replacing $$1%% with the string value of object p1 and $$2%% with the String value of object p2.
Parameters:
String - key for the nls message
Object - p1
Object - p2
Returns:
String nls message if resource is available. else the key itself

getMessage

public static java.lang.String getMessage(java.lang.String id,
                                          java.lang.Object p1,
                                          java.lang.Object p2,
                                          java.util.Locale locale)
get the nls message for the key for the given locale after replacing $$1%% with the string value of object p1 and $$2%% with the String valueof object p2.
Parameters:
String - key for the nls message
Object - p1
Object - p2
Locale - locale
Returns:
String nls message if resource is available. else the key itself

getMessage

public static java.lang.String getMessage(java.lang.String id,
                                          java.lang.Object p1,
                                          java.lang.Object p2,
                                          java.lang.Object p3)
get the nls message for the key after replacing $$1%% with the string value of object p1 and $$2%% with the String value of object p2 and so on.
Parameters:
String - key for the nls message
Object - p1
Object - p2
Object - p3
Returns:
String nls message if resource is available. else the key itself

getMessage

public static java.lang.String getMessage(java.lang.String id,
                                          java.lang.Object p1,
                                          java.lang.Object p2,
                                          java.lang.Object p3,
                                          java.util.Locale locale)
get the nls message for the key for the given locale after replacing $$1%% with the string value of object p1 and $$2%% with the String valueof object p2 etc.
Parameters:
String - key for the nls message
Object - p1
Object - p2
Object - p3
Locale - locale
Returns:
String nls message if resource is available. else the key itself

initialize

public static void initialize(java.util.Locale l)
Initialize the resource table. Set the current locale of the resource bundle and loads the properties messages for that locale.
Parameters:
Locale - new locale
Returns:
void

main

public static void main(java.lang.String[] args)
main entry point of the program. used for unit testing only...

setLocale

public static void setLocale(java.lang.String language)
Set the current locale of the resource bundle and initialize the resource table.
Parameters:
String - representing locale
Returns:
void