public class LocalizableExceptionUtil
extends java.lang.Object
Constructor and Description |
---|
LocalizableExceptionUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLocalizedMessage(java.lang.Throwable t,
java.util.Locale l,
AdapterResourceBundleManager mgr,
java.lang.String defaultMessage)
Get the error message in the specified locale.
|
static java.lang.String |
getLocalizedMessage(java.lang.Throwable t,
java.util.ResourceBundle bundle,
java.lang.String defaultMessage)
Get the error message from the specified ResourceBundle
|
static java.lang.String |
getMessageClientLocale(java.lang.Throwable t,
AdapterResourceBundleManager mgr,
java.lang.String defaultMessage)
Get the error message in the client's locale.
|
static java.lang.String |
getMessageServerLocale(java.lang.Throwable t,
AdapterResourceBundleManager mgr,
java.lang.String defaultMessage)
Get the error message in the server's locale.
|
public static java.lang.String getLocalizedMessage(java.lang.Throwable t, java.util.Locale l, AdapterResourceBundleManager mgr, java.lang.String defaultMessage)
t
- An exception that implements LocalizableException.l
- The locale that the error message should be constructed in.mgr
- AdapterResourceBundleManager wrapping the resource bundle(s) containing the error messagedefaultMessage
- The message that is returned if the localized error message cannot be constructed.public static java.lang.String getLocalizedMessage(java.lang.Throwable t, java.util.ResourceBundle bundle, java.lang.String defaultMessage)
t
- An exception that implements LocalizableException.bundle
- The ResourceBundle containing the localized error message.defaultMessage
- The message that is returned if the localized error message cannot be constructed.public static java.lang.String getMessageClientLocale(java.lang.Throwable t, AdapterResourceBundleManager mgr, java.lang.String defaultMessage)
t
- An exception that implements LocalizableExceptionmgr
- AdapterResourceBundleManager wrapping the resource bundle(s) containing the error messagedefaultMessage
- The message that is returned if the localized error message cannot be constructedpublic static java.lang.String getMessageServerLocale(java.lang.Throwable t, AdapterResourceBundleManager mgr, java.lang.String defaultMessage)
t
- An exception that implements LocalizableExceptionmgr
- AdapterResourceBundleManager wrapping the resource bundle(s) containing the error messagedefaultMessage
- The message that is returned if the localized error message cannot be constructed
Copyright © 2003 - 2021 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.