Oracle® Application Server Web Services UDDI Client API Reference
10g Release 2 (10.1.2)

Part No. B13971-01

oracle.uddi
Class LocalizedMessage

java.lang.Object
  extended byoracle.uddi.LocalizedMessage

Direct Known Subclasses:
UddiClientMessage

public abstract class LocalizedMessage
extends java.lang.Object

This class represents a message which may be localized based on a Java Locale and may additionally be parameterized by substituting values for certain patterns in the source string. It can be used in conjunction with exceptions, for example, to provide Locale-sensitive error messages. You should subclass this class to provide a message implementation for each resource bundle family.


Constructor Summary
LocalizedMessage(java.lang.String errorCode)
          Constructor for error code and non-parameterized message.
LocalizedMessage(java.lang.String errorCode, java.lang.Object parameter)
          Constructor for error code and one-parameter message.
LocalizedMessage(java.lang.String errorCode, java.lang.Object[] parameterArray)
          Constructor for error code and many-parameter message.
LocalizedMessage(java.lang.String errorCode, java.lang.Object parameter1, java.lang.Object parameter2)
          Constructor for error code and two-parameter message.
LocalizedMessage(java.lang.String errorCode, java.lang.Object parameter1, java.lang.Object parameter2, java.lang.Object parameter3)
          Constructor for error code and three-parameter message.

 

Method Summary
 java.lang.String getErrorCode()
          Returns the error code number as an String.
 java.util.Locale getLocale()
          Gets the Locale that will be used to deliver this message.
 java.lang.String getMessage()
          Returns the localized message using the Locale set in the setLocale() method (or the default Locale if not applicable) and substituting any parameters passed into the constructor.
 void setLocale(java.util.Locale l)
          Sets the Locale that will be used to deliver this message.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

LocalizedMessage

public LocalizedMessage(java.lang.String errorCode)
Constructor for error code and non-parameterized message.

LocalizedMessage

public LocalizedMessage(java.lang.String errorCode,
                        java.lang.Object parameter)
Constructor for error code and one-parameter message.

LocalizedMessage

public LocalizedMessage(java.lang.String errorCode,
                        java.lang.Object parameter1,
                        java.lang.Object parameter2)
Constructor for error code and two-parameter message.

LocalizedMessage

public LocalizedMessage(java.lang.String errorCode,
                        java.lang.Object parameter1,
                        java.lang.Object parameter2,
                        java.lang.Object parameter3)
Constructor for error code and three-parameter message.

LocalizedMessage

public LocalizedMessage(java.lang.String errorCode,
                        java.lang.Object[] parameterArray)
Constructor for error code and many-parameter message.
Method Detail

getLocale

public java.util.Locale getLocale()
Gets the Locale that will be used to deliver this message. A null value indicates that the default Locale will be used.

setLocale

public void setLocale(java.util.Locale l)
Sets the Locale that will be used to deliver this message. Set the Locale to null (or don't set it at all) in order to use the default Locale for this JVM.

getMessage

public java.lang.String getMessage()
Returns the localized message using the Locale set in the setLocale() method (or the default Locale if not applicable) and substituting any parameters passed into the constructor. The string retrieved is dependent on the error code supplied in the constructor as well as the resource bundle family name provided by the subclass implementation of getResourceBundleName().

getErrorCode

public java.lang.String getErrorCode()
Returns the error code number as an String. Note that this is not necessarily a UDDI-defined error code.

toString

public java.lang.String toString()

Oracle® Application Server Web Services UDDI Client API Reference
10g Release 2 (10.1.2)

Part No. B13971-01

Copyright © 2001, 2004, Oracle. All rights reserved.