com.ibm.soa.parlayx21
Class Messages

java.lang.Object
  extended by com.ibm.soa.parlayx21.Messages

public class Messages
extends java.lang.Object

The Parlay X messages retrieval class and message substitution processing for ServiceError.

Version:
1.2

Constructor Summary
Messages()
           
 
Method Summary
static java.lang.String formatUsingText(java.lang.String[] variables, java.lang.String messageId, java.lang.String text)
          Format the message string by doing substitutions.
static java.lang.String getMessageFromBundle(java.lang.String msgId, java.util.Locale loc)
          Get a message from the com.ibm.soa.parlayx21.Messages bundle.
static java.lang.String getSubstitutedMessage(PolicyException se, java.util.Locale locale)
          Get the substituted message from the exception.
static java.lang.String getSubstitutedMessage(ServiceError se, java.util.Locale locale)
          Get the substituted message from the exception.
static java.lang.String getSubstitutedMessage(ServiceException se, java.util.Locale locale)
          Get the substituted message from the exception.
static java.lang.String getSubstitutedMessage(java.lang.String text, java.lang.String[] variables, java.lang.String messageId, java.util.Locale locale)
          Get the substituted message from the exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages()
Method Detail

getSubstitutedMessage

public static java.lang.String getSubstitutedMessage(ServiceException se,
                                                     java.util.Locale locale)
Get the substituted message from the exception.

Parameters:
se - the exception
locale - the locale, null for default.
Returns:
the message text

getSubstitutedMessage

public static java.lang.String getSubstitutedMessage(PolicyException se,
                                                     java.util.Locale locale)
Get the substituted message from the exception.

Parameters:
se - the exception
locale - the locale, null for default.
Returns:
the message text

getSubstitutedMessage

public static java.lang.String getSubstitutedMessage(ServiceError se,
                                                     java.util.Locale locale)
Get the substituted message from the exception.

Parameters:
se - the error
locale - the locale, null for default.
Returns:
the message text

getSubstitutedMessage

public static java.lang.String getSubstitutedMessage(java.lang.String text,
                                                     java.lang.String[] variables,
                                                     java.lang.String messageId,
                                                     java.util.Locale locale)
Get the substituted message from the exception.

Parameters:
text - the text
variables - the variables
messageId - the message id
locale - the locale, null for default.
Returns:
the message text

getMessageFromBundle

public static java.lang.String getMessageFromBundle(java.lang.String msgId,
                                                    java.util.Locale loc)
Get a message from the com.ibm.soa.parlayx21.Messages bundle.

Parameters:
msgId - the message ID
loc - the locale
Returns:
the message string

formatUsingText

public static java.lang.String formatUsingText(java.lang.String[] variables,
                                               java.lang.String messageId,
                                               java.lang.String text)
Format the message string by doing substitutions.

Parameters:
variables - the substitution variables
messageId - the message ID
text - the message text
Returns:
the result string


Copyright © 2003 IBM Corp. All Rights Reserved.