com.infoengine.util
Class IEMessage

java.lang.Object
  extended bycom.infoengine.util.IEMessage
All Implemented Interfaces:
LocalizableMessage, Serializable

public class IEMessage
extends Object
implements LocalizableMessage, Serializable

See Also:
Serialized Form

Field Summary
private  String messageKey
           
private  String resourceBundle
           
private  Object[] textInserts
           
 
Constructor Summary
IEMessage(String rb, String key, Object[] params)
          Constructs a I*E message with a localizable detailed message.
 
Method Summary
 String getLocalizedMessage()
          Gets the localized message, for the instance.
 String getLocalizedMessage(Locale locale)
          Gets the localized message, for passed locale.
static String getLocalizedMessage(String resourceBundle, String messageKey, Object[] textInserts)
          Gets the localized message, for passed arguments.
static String getLocalizedMessage(String resourceBundle, String messageKey, Object[] textInserts, Locale locale)
          Gets the localized message, for passed arguments.
 String getMessageIdentifier()
          Gets the identity of the message.
protected  void setLocalizedMessage(String rb, String key, Object[] params)
          Sets the localized message for this IEMessage.
 String toString()
          Returns the localized message, for the instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resourceBundle

private String resourceBundle

messageKey

private String messageKey

textInserts

private Object[] textInserts
Constructor Detail

IEMessage

public IEMessage(String rb,
                 String key,
                 Object[] params)
Constructs a I*E message with a localizable detailed message.

Parameters:
rb - the name of the base resource bundle subclass containing the localizable message.
key - the key associated with the localizable message
params - an optional set of objects to be formatted into the localizable message text.
Method Detail

setLocalizedMessage

protected void setLocalizedMessage(String rb,
                                   String key,
                                   Object[] params)
Sets the localized message for this IEMessage.

Parameters:
rb - the name of the base resource bundle subclass containing the localizable message.
key - the key associated with the localizable message
params - an optional set of objects to be formatted into the localizable message text.

getLocalizedMessage

public String getLocalizedMessage()
Gets the localized message, for the instance.


getLocalizedMessage

public String getLocalizedMessage(Locale locale)
Gets the localized message, for passed locale.

Specified by:
getLocalizedMessage in interface LocalizableMessage
Parameters:
locale - the locale for which to get the localized message.

getLocalizedMessage

public static String getLocalizedMessage(String resourceBundle,
                                         String messageKey,
                                         Object[] textInserts)
Gets the localized message, for passed arguments.


getLocalizedMessage

public static String getLocalizedMessage(String resourceBundle,
                                         String messageKey,
                                         Object[] textInserts,
                                         Locale locale)
Gets the localized message, for passed arguments.

Parameters:
locale - the locale for which to get the localized message.

getMessageIdentifier

public String getMessageIdentifier()
Gets the identity of the message.

Returns:
the identity, as the resource bundle name and the messageKey.

toString

public String toString()
Returns the localized message, for the instance.

Supported API: true