| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.commerce.gifts.GiftlistUserMessage
public class GiftlistUserMessage
This class encapsulates messages, configurable string constants and message formatting conventions. This class is used for client messages. These are messages displayed to a user when something is not correct. i.e. The user incorrectly types in the wrong information on a form.
This class obtains resource bundles based on a java.util.Locale object.  
 
Usage:
GiftlistUserMessage.getString("MSG1", Locale)
  Object[] params = {"one", "two"};
      GiftlistUserMessage.format("MSG2", params, Locale)
 
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | RESOURCE_BUNDLEName of the resource | 
| Constructor Summary | |
|---|---|
| GiftlistUserMessage() | |
| Method Summary | |
|---|---|
| static java.lang.String | format(java.lang.String pKey,
       java.util.Locale pLocale)Return a String message specific for the given locale. | 
| static java.lang.String | format(java.lang.String pKey,
       java.lang.Object[] pParams,
       java.util.Locale pLocale)Format a set of parameters into a message for a given locale | 
| static java.lang.String | format(java.lang.String pKey,
       java.lang.Object pParam,
       java.util.Locale pLocale)Format a single parameter into a message for a given locale | 
| static java.text.MessageFormat | getFormat(java.lang.String pKey,
          java.util.Locale pLocale)Return a MessageFormat from the resource bundle, for the given locale | 
| static java.util.ResourceBundle | getResourceBundle(java.util.Locale pLocale)Returns a ResourceBundle specific for the given locale | 
| static java.lang.String | getString(java.lang.String pKey,
          java.util.Locale pLocale)Return a String message specific for the given locale | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
public static java.lang.String RESOURCE_BUNDLE
| Constructor Detail | 
|---|
public GiftlistUserMessage()
| Method Detail | 
|---|
public static java.util.ResourceBundle getResourceBundle(java.util.Locale pLocale)
                                                  throws java.util.MissingResourceException
pLocale - the current locale
java.util.MissingResourceException - if the resource bundle is missing
public static java.lang.String getString(java.lang.String pKey,
                                         java.util.Locale pLocale)
pKey - the identifier for the message to retrieve out of the ResourceBundlepLocale - the locale of the user
public static java.text.MessageFormat getFormat(java.lang.String pKey,
                                                java.util.Locale pLocale)
pLocale - the locale of the userpKey - the identifier for the message to retrieve out of the ResourceBundle
public static java.lang.String format(java.lang.String pKey,
                                      java.util.Locale pLocale)
getString
pKey - the identifier for the message to retrieve out of the ResourceBundlepLocale - the locale of the user
public static java.lang.String format(java.lang.String pKey,
                                      java.lang.Object pParam,
                                      java.util.Locale pLocale)
pKey - the identifier for the message to retrieve out of the ResourceBundlepParam - a single parameter to use in formattingpLocale - the locale of the user
public static java.lang.String format(java.lang.String pKey,
                                      java.lang.Object[] pParams,
                                      java.util.Locale pLocale)
pKey - the identifier for the message to retrieve out of the ResourceBundlepParams - a set of parameters to use in the formattingpLocale - the locale of the user
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||