public abstract class AbstractLocalizedRuntimeException extends RuntimeException implements LocalizedException
Modifier | Constructor and Description |
---|---|
protected |
AbstractLocalizedRuntimeException()
Basic constructor.
|
|
AbstractLocalizedRuntimeException(Object type,
String messageKey,
Object[] parameters,
Throwable cause)
Basic constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addLocalizedMessages(org.dejava.component.i18n.message.handler.ApplicationMessageHandler appMessageHandler)
Add messages from the given exception to the application.
|
protected void |
addLocalizedMessages(org.dejava.component.i18n.message.handler.ApplicationMessageHandler appMessageHandler,
Boolean recursive)
Add messages from the given exception to the application.
|
Locale |
getLocale()
Gets the locale to be used in the localized message retrieval.
|
String |
getLocalizedMessage() |
String |
getMessage() |
org.dejava.component.i18n.message.handler.MessageCommand |
getMessageCommand()
Gets the messageCommand.
|
org.dejava.component.i18n.message.handler.MessageHandler |
getMessageHandler()
Gets the message handler to be used in order to render localized exception messages.
|
void |
setLocale(Locale locale)
Sets the locale to be used in the localized message retrieval.
|
void |
setMessageCommand(org.dejava.component.i18n.message.handler.MessageCommand messageCommand)
Sets the messageCommand.
|
void |
setMessageHandler(org.dejava.component.i18n.message.handler.MessageHandler messageHandler)
Sets the message handler to be used in order to render localized exception messages.
|
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
protected AbstractLocalizedRuntimeException()
public AbstractLocalizedRuntimeException(Object type, String messageKey, Object[] parameters, Throwable cause)
type
- The type for the message.messageKey
- Message key that describes the exception.parameters
- Parameters for the exception (and message).cause
- Exception cause.public org.dejava.component.i18n.message.handler.MessageHandler getMessageHandler()
public void setMessageHandler(org.dejava.component.i18n.message.handler.MessageHandler messageHandler)
setMessageHandler
in interface LocalizedException
messageHandler
- New message handler to be used in order to render localized exception messages.public org.dejava.component.i18n.message.handler.MessageCommand getMessageCommand()
public void setMessageCommand(org.dejava.component.i18n.message.handler.MessageCommand messageCommand)
setMessageCommand
in interface LocalizedException
messageCommand
- New messageCommand.public Locale getLocale()
public void setLocale(Locale locale)
locale
- New locale to be used in the localized message retrieval.public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
Throwable.getLocalizedMessage()
public String getMessage()
getMessage
in class Throwable
Throwable.getMessage()
protected void addLocalizedMessages(org.dejava.component.i18n.message.handler.ApplicationMessageHandler appMessageHandler, Boolean recursive)
appMessageHandler
- The application message handler.recursive
- If the exception cause should add messages as well.public void addLocalizedMessages(org.dejava.component.i18n.message.handler.ApplicationMessageHandler appMessageHandler)
LocalizedException
addLocalizedMessages
in interface LocalizedException
appMessageHandler
- The application message handler.LocalizedException.addLocalizedMessages(org.dejava.component.i18n.message.handler.ApplicationMessageHandler)
Copyright © 2013. All Rights Reserved.