IBM WebSphere Application ServerTM
Release 8

com.ibm.uddi.v3.management
Class MessageInfo

java.lang.Object
  extended by com.ibm.uddi.v3.management.MessageInfo
All Implemented Interfaces:
java.io.Serializable

public class MessageInfo
extends java.lang.Object
implements java.io.Serializable

Represents a message with inserts (optional), message number, severity indicator.

The message key, severity code, message number and message are kept separate, so users can use what they need, rather than the code and numbers being hardcoded in the message.

See Also:
Serialized Form

Field Summary
static java.lang.String ERROR_MESSAGES_FILE
           
static java.lang.String INSERT_MESSAGES_FILE
           
 
Constructor Summary
MessageInfo(java.lang.String messageKey, java.lang.String messageNumber)
          Constructor taking a message key and message number.
MessageInfo(java.lang.String messageKey, java.lang.String messageNumber, java.lang.String severity)
          Constructor taking a message key, message number and severity code.
 
Method Summary
 java.lang.String[] getInsertValues(java.util.Locale locale)
          Returns the translated message inserts for the message.
 java.lang.String getLocalizedMessage(java.util.Locale locale, boolean prefixed)
          Returns translated message for specified Locale.
 java.lang.String getMessageKey()
          Returns message key.
 java.lang.String getNumber()
          Returns message number.
 java.lang.String getSeverity()
          Returns message severity.
 void setMessageInserts(MessageInserts messageInserts)
          Sets message inserts
 void setMessageKey(java.lang.String messageKey)
          Sets message key.
 void setSeverity(java.lang.String severity)
          Sets severity to one of 'I', 'W' or 'E'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSERT_MESSAGES_FILE

public static final java.lang.String INSERT_MESSAGES_FILE
See Also:
Constant Field Values

ERROR_MESSAGES_FILE

public static final java.lang.String ERROR_MESSAGES_FILE
See Also:
Constant Field Values
Constructor Detail

MessageInfo

public MessageInfo(java.lang.String messageKey,
                   java.lang.String messageNumber)
Constructor taking a message key and message number.

The severity code defaults to E (error).

Parameters:
messageKey - - the message key in the messages resource.
messageNumber - - the UDDI specific message number.

MessageInfo

public MessageInfo(java.lang.String messageKey,
                   java.lang.String messageNumber,
                   java.lang.String severity)
Constructor taking a message key, message number and severity code.

Parameters:
messageKey - - the message key in the messages resource.
messageNumber - - the UDDI specific message number.
severity - - the severity code which can be one of I (informational), W (warning) or E (error).
Method Detail

setSeverity

public void setSeverity(java.lang.String severity)
Sets severity to one of 'I', 'W' or 'E'.

Parameters:
severity -

getMessageKey

public java.lang.String getMessageKey()
Returns message key.

Returns:

getNumber

public java.lang.String getNumber()
Returns message number.

Returns:

getSeverity

public java.lang.String getSeverity()
Returns message severity.

Returns:

setMessageKey

public void setMessageKey(java.lang.String messageKey)
Sets message key.

Parameters:
messageKey -

getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale locale,
                                            boolean prefixed)
Returns translated message for specified Locale.

Parameters:
locale -
prefixed - - true if the message should be prefixed with message code, number and severity.
Returns:
translated message.

setMessageInserts

public void setMessageInserts(MessageInserts messageInserts)
Sets message inserts

Parameters:
messageInserts -

getInsertValues

public java.lang.String[] getInsertValues(java.util.Locale locale)
Returns the translated message inserts for the message.

Parameters:
locale -
Returns:

IBM WebSphere Application ServerTM
Release 8