|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.flexive.shared.exceptions.FxApplicationException
public class FxApplicationException
Base class for all [fleXive] Exceptions, supports localized messages and converting. Refer to the property files in package com.flexive.shared.exception.messages for keys to use. All property files in this package will be concatenated to one big FxExceptionMessages.properties file upon deployment. If a (not null) Logger is passed as the first argument the message will be logged at level "error" in the default locale (usually english) as well.
| Field Summary | |
|---|---|
protected FxExceptionMessage |
message
the localized message |
| Constructor Summary | |
|---|---|
FxApplicationException(FxApplicationException converted)
Localized exception constructor |
|
FxApplicationException(org.apache.commons.logging.Log log,
FxApplicationException converted)
Localized exception constructor |
|
FxApplicationException(org.apache.commons.logging.Log log,
java.lang.String key)
Localized exception constructor |
|
FxApplicationException(org.apache.commons.logging.Log log,
java.lang.String key,
java.lang.Object... values)
Localized exception constructor |
|
FxApplicationException(org.apache.commons.logging.Log log,
java.lang.String message,
java.lang.Throwable cause)
Localized exception constructor |
|
FxApplicationException(org.apache.commons.logging.Log log,
java.lang.Throwable cause)
Localized exception constructor |
|
FxApplicationException(org.apache.commons.logging.Log log,
java.lang.Throwable cause,
java.lang.String key,
java.lang.Object... values)
Localized exception constructor |
|
FxApplicationException(java.lang.String key)
Localized exception constructor |
|
FxApplicationException(java.lang.String key,
java.lang.Object... values)
Localized exception constructor |
|
FxApplicationException(java.lang.String message,
java.lang.Throwable cause)
Localized exception constructor |
|
FxApplicationException(java.lang.Throwable cause)
Localized exception constructor |
|
FxApplicationException(java.lang.Throwable cause,
java.lang.String key,
java.lang.Object... values)
Localized exception constructor |
|
| Method Summary | |
|---|---|
FxRuntimeException |
asRuntimeException()
Wraps this exception in a FxRuntimeException. |
java.lang.String |
getAffectedXPath()
Get the XPath that has caused this Exception to be thrown |
FxContentExceptionCause |
getContentExceptionCause()
If an XPath that caused the exception is set, the exception cause is returned |
FxExceptionMessage |
getExceptionMessage()
Get the underlying exception message object |
java.lang.String |
getMessage()
Get the localized message in the default locale (english) |
java.lang.String |
getMessage(FxLanguage locale)
Get the localized message for a locale |
java.lang.String |
getMessage(long localeId)
Get the localized message for a localeId |
java.lang.String |
getMessage(UserTicket ticket)
Get the localized message for a calling users locale |
boolean |
hasAffectedXPath()
Is this exception related to an XPath? |
boolean |
isMessageLogged()
Has the message been logged? |
protected boolean |
messageLogged()
Has the message been logged? |
FxApplicationException |
setAffectedXPath(java.lang.String affectedXPath,
FxContentExceptionCause cause)
Set the affected XPath that caused this Exception to be thrown |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected FxExceptionMessage message
| Constructor Detail |
|---|
public FxApplicationException(FxApplicationException converted)
converted - the message to convert
public FxApplicationException(org.apache.commons.logging.Log log,
FxApplicationException converted)
log - Log to useconverted - exception to convert
public FxApplicationException(java.lang.String key,
java.lang.Object... values)
key - exception messge resource keyvalues - value parameters for resource message
public FxApplicationException(org.apache.commons.logging.Log log,
java.lang.String key,
java.lang.Object... values)
log - Log to usekey - exception messge resource keyvalues - value parameters for resource message
public FxApplicationException(java.lang.Throwable cause,
java.lang.String key,
java.lang.Object... values)
cause - causing exceptionkey - exception messge resource keyvalues - value parameters for resource message
public FxApplicationException(org.apache.commons.logging.Log log,
java.lang.Throwable cause,
java.lang.String key,
java.lang.Object... values)
log - Log to usecause - causing messagekey - exception messge resource keyvalues - value parameters for resource messagepublic FxApplicationException(java.lang.String key)
key - exception messge resource key
public FxApplicationException(org.apache.commons.logging.Log log,
java.lang.String key)
log - Log to usekey - exception messge resource key
public FxApplicationException(java.lang.String message,
java.lang.Throwable cause)
message - resource keycause - causing exception
public FxApplicationException(org.apache.commons.logging.Log log,
java.lang.String message,
java.lang.Throwable cause)
log - Log to usemessage - resource keycause - exception causepublic FxApplicationException(java.lang.Throwable cause)
cause - exception cause
public FxApplicationException(org.apache.commons.logging.Log log,
java.lang.Throwable cause)
log - Log to usecause - causing exception| Method Detail |
|---|
protected boolean messageLogged()
public java.lang.String getAffectedXPath()
public FxContentExceptionCause getContentExceptionCause()
public boolean hasAffectedXPath()
public FxApplicationException setAffectedXPath(java.lang.String affectedXPath,
FxContentExceptionCause cause)
affectedXPath - XPath that caused this Exception to be throwncause - the cause of the exception
public boolean isMessageLogged()
public final java.lang.String getMessage()
getMessage in interface FxLocalizedExceptiongetMessage in class java.lang.Throwablepublic java.lang.String getMessage(FxLanguage locale)
getMessage in interface FxLocalizedExceptionlocale - locale to get the message got
public java.lang.String getMessage(long localeId)
getMessage in interface FxLocalizedExceptionlocaleId - locale id to get the message for
public java.lang.String getMessage(UserTicket ticket)
getMessage in interface FxLocalizedExceptionticket - calling users ticket, used to get the locale for the message from
public FxExceptionMessage getExceptionMessage()
getExceptionMessage in interface FxLocalizedExceptionpublic FxRuntimeException asRuntimeException()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||