com.tivoli.twg.alertmgr
Class TWGMessage

java.lang.Object
  extended bycom.tivoli.twg.alertmgr.TWGMessage

public class TWGMessage
extends java.lang.Object

TWGMessage is a class used to pass response messages from an event handler's ValidateParm method to the Event Server. The presence of the object upon return from TWGEventHandler.ValidateParm() indicates that the data supplied by the user is somehow invalid. The value of the message is in describe what was iinvalid about the data. TWGMessage may have single-language or multi-lingual capability.


Constructor Summary
TWGMessage(java.lang.String msg)
          Constructor for single-language format.
TWGMessage(java.lang.String msg, java.lang.String bundle)
          Constructor for multi-lingual format.
TWGMessage(TWGMessage m)
          Copy Constructor.
 
Method Summary
 java.lang.String getMessage(java.util.Locale locale)
          Get the text of the message based on a desired locale.
 java.lang.String getMessageBundle()
          Get the name of the resource bundle containing the message keyword.
 void setMessageBundle(java.lang.String b)
          Set the name of the resource bundle containing the message keyword.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGMessage

public TWGMessage(java.lang.String msg)
Constructor for single-language format.

Parameters:
msg - text of message

TWGMessage

public TWGMessage(java.lang.String msg,
                  java.lang.String bundle)
Constructor for multi-lingual format.

Parameters:
msg - keyword associated with the text of message
bundle - bundle containing keyword associated with the text of message

TWGMessage

public TWGMessage(TWGMessage m)
Copy Constructor.

Parameters:
m - message object to be copied
Method Detail

getMessageBundle

public java.lang.String getMessageBundle()
Get the name of the resource bundle containing the message keyword.

Returns:
name of the resource bundle that contains the text of the message.

setMessageBundle

public void setMessageBundle(java.lang.String b)
Set the name of the resource bundle containing the message keyword.

Parameters:
b - name of the resource bundle that contains the text of the message.

getMessage

public java.lang.String getMessage(java.util.Locale locale)
Get the text of the message based on a desired locale.

Returns:
text of the message.