CLRA 0.1.2

com.clra.web
Class Text

java.lang.Object
  |
  +--com.clra.web.Text
All Implemented Interfaces:
Serializable

public final class Text
extends Object
implements Serializable

A thin wrapper around the Jakarta MessageResources class. This saves very GUI class from having to reproduce the same code.

See Also:
Serialized Form

Method Summary
static String getMessage(String key)
          Returns a text message for the specified key, for the default Locale.
static String getMessage(String key, Object arg0)
          Returns a text message after parametric replacement of the specified parameter placeholders.
static String getMessage(String key, Object[] args)
          Returns a text message after parametric replacement of the specified parameter placeholders.
static String getMessage(String key, Object arg0, Object arg1)
          Returns a text message after parametric replacement of the specified parameter placeholders.
static String getMessage(String key, Object arg0, Object arg1, Object arg2)
          Returns a text message after parametric replacement of the specified parameter placeholders.
static String getMessage(String key, Object arg0, Object arg1, Object arg2, Object arg3)
          Returns a text message after parametric replacement of the specified parameter placeholders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMessage

public static String getMessage(String key)
Returns a text message for the specified key, for the default Locale.
Parameters:
key - The message key to look up

getMessage

public static String getMessage(String key,
                                Object[] args)
Returns a text message after parametric replacement of the specified parameter placeholders.
Parameters:
key - The message key to look up
args - An array of replacement parameters for placeholders

getMessage

public static String getMessage(String key,
                                Object arg0)
Returns a text message after parametric replacement of the specified parameter placeholders.
Parameters:
key - The message key to look up
arg0 - The replacement for placeholder {0} in the message

getMessage

public static String getMessage(String key,
                                Object arg0,
                                Object arg1)
Returns a text message after parametric replacement of the specified parameter placeholders.
Parameters:
key - The message key to look up
arg0 - The replacement for placeholder {0} in the message
arg1 - The replacement for placeholder {1} in the message

getMessage

public static String getMessage(String key,
                                Object arg0,
                                Object arg1,
                                Object arg2)
Returns a text message after parametric replacement of the specified parameter placeholders.
Parameters:
key - The message key to look up
arg0 - The replacement for placeholder {0} in the message
arg1 - The replacement for placeholder {1} in the message
arg2 - The replacement for placeholder {2} in the message

getMessage

public static String getMessage(String key,
                                Object arg0,
                                Object arg1,
                                Object arg2,
                                Object arg3)
Returns a text message after parametric replacement of the specified parameter placeholders.
Parameters:
key - The message key to look up
arg0 - The replacement for placeholder {0} in the message
arg1 - The replacement for placeholder {1} in the message
arg2 - The replacement for placeholder {2} in the message
arg3 - The replacement for placeholder {3} in the message

CLRA 0.1.2