ca.idms.io
Class LocaleMessage

java.lang.Object
  extended by ca.idms.io.LocaleMessage

public class LocaleMessage
extends java.lang.Object

Formats language independent messages.

Since:
CA IDMS Server 5.0
Version:
0.00 12/12/98
Author:
Dave Ross

Constructor Summary
LocaleMessage(java.lang.String r)
          Creates messages using the default Locale.
LocaleMessage(java.lang.String r, java.util.Locale l)
          Creates messages using a specified Locale.
 
Method Summary
 java.util.Locale getLocale()
          Gets the Locale.
 java.lang.String getMessage(java.lang.String key)
          Gets a message with no parameters.
 java.lang.String getMessage(java.lang.String key, java.lang.Object obj)
          Gets a message with a single parameter.
 java.lang.String getMessage(java.lang.String key, java.lang.Object[] obj)
          Gets a message with an array of parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleMessage

public LocaleMessage(java.lang.String r)
Creates messages using the default Locale.

Parameters:
r - resource bundle name.

LocaleMessage

public LocaleMessage(java.lang.String r,
                     java.util.Locale l)
Creates messages using a specified Locale.

Parameters:
r - resource bundle name.
l - the Locale.
Method Detail

getLocale

public java.util.Locale getLocale()
Gets the Locale.

Returns:
the Locale used to format messages.

getMessage

public java.lang.String getMessage(java.lang.String key)
Gets a message with no parameters.

Parameters:
key - the resource key.
Returns:
the language specific message.

getMessage

public java.lang.String getMessage(java.lang.String key,
                                   java.lang.Object obj)
Gets a message with a single parameter.

Parameters:
key - the resource key.
obj - the parameter object.
Returns:
the language specific message.

getMessage

public java.lang.String getMessage(java.lang.String key,
                                   java.lang.Object[] obj)
Gets a message with an array of parameters.

Parameters:
key - the resource key.
obj - an array of parameter objects.
Returns:
the language specific message.


Copyright © 2009 CA, All rights reserved