public abstract class ODataTranslatedException extends ODataException
Modifier and Type | Class and Description |
---|---|
static interface |
ODataTranslatedException.MessageKey
Key for the exception text in the resource bundle.
|
class |
ODataTranslatedException.ODataErrorMessage
Error message text and
Locale used for it. |
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_SERVER_BUNDLE_NAME |
Modifier | Constructor and Description |
---|---|
protected |
ODataTranslatedException(String developmentMessage,
ODataTranslatedException.MessageKey messageKey,
String... parameters) |
protected |
ODataTranslatedException(String developmentMessage,
Throwable cause,
ODataTranslatedException.MessageKey messageKey,
String... parameters) |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
getBundleName()
Gets the name of the
ResourceBundle containing the exception texts. |
String |
getLocalizedMessage() |
ODataTranslatedException.MessageKey |
getMessageKey()
Gets the message key.
|
ODataTranslatedException.ODataErrorMessage |
getTranslatedMessage(Locale locale)
Gets the translated message text for a given locale (or the default locale if not available),
returning the developer message text if none is found.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
protected static final String DEFAULT_SERVER_BUNDLE_NAME
protected ODataTranslatedException(String developmentMessage, ODataTranslatedException.MessageKey messageKey, String... parameters)
protected ODataTranslatedException(String developmentMessage, Throwable cause, ODataTranslatedException.MessageKey messageKey, String... parameters)
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
public ODataTranslatedException.MessageKey getMessageKey()
public ODataTranslatedException.ODataErrorMessage getTranslatedMessage(Locale locale)
locale
- the preferred Locale
protected abstract String getBundleName()
Gets the name of the ResourceBundle
containing the exception texts.
The key for an exception text is the concatenation of the exception-class name and
the ODataTranslatedException.MessageKey
, separated by a dot.
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.