com.wm.util
Class LocalizedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.wm.util.LocalizedException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NSException

public class LocalizedException
extends java.lang.Exception

See Also:
Serialized Form

Constructor Summary
LocalizedException()
           
LocalizedException(java.lang.Class bundleClass, java.lang.String bundleKey, java.lang.String sourceID)
          Deprecated. 11/05/2002; Replaced by LocalizedException( String bundleBaseName, ..., ClassLoader theBundleClassLoader ).
LocalizedException(java.lang.Class bundleClass, java.lang.String bundleKey, java.lang.String sourceID, java.lang.Object[] substitutions)
          Deprecated. 11/05/2002; Replaced by LocalizedException(String bundleBaseName, ..., ClassLoader theBundleClassLoader).
LocalizedException(java.lang.Class bundleClass, java.lang.String bundleKey, java.lang.String sourceID, java.lang.String substitution)
          Deprecated. 11/05/2002; Replaced by LocalizedException( String bundleBaseName, ..., ClassLoader theBundleClassLoader ).
LocalizedException(java.lang.Class bundleClass, java.lang.String bundleKey, java.lang.String sourceID, java.lang.Throwable t, java.lang.Object[] substitutions)
          Deprecated. 11/05/2002; Replaced by LocalizedException(String bundleBaseName, ..., ClassLoader theBundleClassLoader).
LocalizedException(java.lang.String s)
          Constructs a LocalizedException using the specified parameters as input.
LocalizedException(java.lang.String bundleBaseName, java.lang.String bundleKey, java.lang.ClassLoader theBundleClassLoader)
          Constructs an LocalizedException using the specified parameters as input.
LocalizedException(java.lang.String bundleBaseName, java.lang.String bundleKey, java.lang.Object[] substitutions, java.lang.ClassLoader theBundleClassLoader)
          Constructs an LocalizedException using the specified parameters as input.
LocalizedException(java.lang.String bundleBaseName, java.lang.String bundleKey, java.lang.String substitution, java.lang.ClassLoader theBundleClassLoader)
          Constructs an LocalizedException using the specified parameters as input.
LocalizedException(java.lang.String bundleBaseName, java.lang.String bundleKey, java.lang.Throwable t, java.lang.Object[] substitutions, java.lang.ClassLoader theBundleClassLoader)
          Constructs an LocalizedException using the specified parameters as input.
LocalizedException(java.lang.Throwable t)
          Constructs an LocalizedException using the specified Throwable object as input.
 
Method Summary
 IData getErrorDetails()
          Returns optional user-defined arbitrary data about the exception.
 java.lang.String getLocalizedMessage()
           
 java.lang.String getLocalizedMessage(java.util.Locale locale)
           
 java.lang.String getMessage()
           
 java.lang.String getMsgId()
           
 java.lang.String getMsgOnly()
           
 java.lang.String getMsgOnly(java.util.Locale locale)
           
 java.lang.Throwable getWrappedException()
           
 void setErrorDetails(IData details)
          Holds optional user-defined arbitrary data about the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalizedException

public LocalizedException()

LocalizedException

public LocalizedException(java.lang.String s)
Constructs a LocalizedException using the specified parameters as input.

Parameters:
s - A String displaying a detailed message.

LocalizedException

public LocalizedException(java.lang.Throwable t)
Constructs an LocalizedException using the specified Throwable object as input.

Parameters:
t - A Throwable object that contains error information.

LocalizedException

public LocalizedException(java.lang.String bundleBaseName,
                          java.lang.String bundleKey,
                          java.lang.ClassLoader theBundleClassLoader)
Constructs an LocalizedException using the specified parameters as input.

Parameters:
bundleBaseName - is the base name (ex: "com.mycompany.FooBundle_en_WIN" would be "com.mycompany.FooBundle") of the resource bundle from which the bundleKey value is to be extracted.
bundleKey - is the identifier used to map to a particular message or message set that contained in the resource bundle pointed to by the bundleBaseName param.
theBundleClassLoader - is the classloader that can find and load the resource bundle pointed to by BundleBaseName.

LocalizedException

public LocalizedException(java.lang.String bundleBaseName,
                          java.lang.String bundleKey,
                          java.lang.String substitution,
                          java.lang.ClassLoader theBundleClassLoader)
Constructs an LocalizedException using the specified parameters as input.

Parameters:
bundleBaseName - is the base name (ex: "com.mycompany.FooBundle_en_WIN" would be "com.mycompany.FooBundle") of the resource bundle from which the bundleKey value is to be extracted.
bundleKey - is the identifier used to map to a particular message or message set that contained in the resource bundle pointed to by the bundleBaseName param.
substitution - are the message values that can be used in the case that the value mapped to, from the bundleKey is not found.
theBundleClassLoader - is the classloader that can find and load the resource bundle pointed to by BundleBaseName.

LocalizedException

public LocalizedException(java.lang.String bundleBaseName,
                          java.lang.String bundleKey,
                          java.lang.Object[] substitutions,
                          java.lang.ClassLoader theBundleClassLoader)
Constructs an LocalizedException using the specified parameters as input.

Parameters:
bundleBaseName - is the base name (ex: "com.mycompany.FooBundle_en_WIN" would be "com.mycompany.FooBundle") of the resource bundle from which the bundleKey value is to be extracted.
bundleKey - is the identifier used to map to a particular message or message set that contained in the resource bundle pointed to by the bundleBaseName param.
substitutions - An Object array containing substitution values that correspond to a the exception.
theBundleClassLoader - is the classloader that can find and load the resource bundle pointed to by BundleBaseName.

LocalizedException

public LocalizedException(java.lang.String bundleBaseName,
                          java.lang.String bundleKey,
                          java.lang.Throwable t,
                          java.lang.Object[] substitutions,
                          java.lang.ClassLoader theBundleClassLoader)
Constructs an LocalizedException using the specified parameters as input.

Parameters:
bundleBaseName - is the base name (ex: "com.mycompany.FooBundle_en_WIN" would be "com.mycompany.FooBundle") of the resource bundle from which the bundleKey value is to be extracted.
t - A Throwable object that contains error information.*
bundleKey - is the identifier used to map to a particular message or message set that contained in the resource bundle pointed to by the bundleBaseName param.
substitutions - An Object array containing substitution values that correspond to a the exception.
theBundleClassLoader - is the classloader that can find and load the resource bundle pointed to by BundleBaseName.

LocalizedException

public LocalizedException(java.lang.Class bundleClass,
                          java.lang.String bundleKey,
                          java.lang.String sourceID)
Deprecated. 11/05/2002; Replaced by LocalizedException( String bundleBaseName, ..., ClassLoader theBundleClassLoader ).


LocalizedException

public LocalizedException(java.lang.Class bundleClass,
                          java.lang.String bundleKey,
                          java.lang.String sourceID,
                          java.lang.String substitution)
Deprecated. 11/05/2002; Replaced by LocalizedException( String bundleBaseName, ..., ClassLoader theBundleClassLoader ).


LocalizedException

public LocalizedException(java.lang.Class bundleClass,
                          java.lang.String bundleKey,
                          java.lang.String sourceID,
                          java.lang.Object[] substitutions)
Deprecated. 11/05/2002; Replaced by LocalizedException(String bundleBaseName, ..., ClassLoader theBundleClassLoader).


LocalizedException

public LocalizedException(java.lang.Class bundleClass,
                          java.lang.String bundleKey,
                          java.lang.String sourceID,
                          java.lang.Throwable t,
                          java.lang.Object[] substitutions)
Deprecated. 11/05/2002; Replaced by LocalizedException(String bundleBaseName, ..., ClassLoader theBundleClassLoader).

Method Detail

getErrorDetails

public IData getErrorDetails()
Returns optional user-defined arbitrary data about the exception.

Returns:
details IData containing information about the exception if the user set any.

setErrorDetails

public void setErrorDetails(IData details)
Holds optional user-defined arbitrary data about the exception.

Parameters:
details - IData containing information about the exception.

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Overrides:
getLocalizedMessage in class java.lang.Throwable
Returns:
localized message String using the default locale of the JVM.

getWrappedException

public java.lang.Throwable getWrappedException()
Returns:
optional Throwable object if the exception was constructed with the Throwable parameter.

getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale locale)
Returns:
localized message String using the given locale. On the Integration Server the locale of the client is used.

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable
Returns:
message String that is locale independent. The message String will always be in English.

getMsgId

public java.lang.String getMsgId()
Returns:
message ID String that is locale and language independent. These IDs should not change between releases or translations of the product.

getMsgOnly

public java.lang.String getMsgOnly()
Returns:
message String that is locale and language independent. These IDs should not change between releases or translations of the product.

getMsgOnly

public java.lang.String getMsgOnly(java.util.Locale locale)
Returns:
message String using the given locale. On the Integration Server the locale of the client is used.