Package com.avoka.fc.core.util
Class ApplicationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.avoka.fc.core.util.ApplicationException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ApplicationEmailException
,ApplicationFileUploadException
,DuplicateSubmissionException
,PaymentResponseException
,SubmissionCompleteProcessorException
,SubmissionException
,UnsupportedVersionException
Provides the base SmartForm Manager application exception.
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionApplicationException
(Class<?> aClass, String context, String userMessage, String solution) Create an application exception object.ApplicationException
(Class<?> aClass, Throwable cause, String context, String userMessage) Create an application exception object.ApplicationException
(Class<?> aClass, Throwable cause, String context, String userMessage, String solution) Create an application exception object.ApplicationException
(Class aClass, String context, String userMessage) Create an application exception object.protected
ApplicationException
(String name) ApplicationException
(String name, String context, String userMessage) Create an application exception object.ApplicationException
(String name, String context, String userMessage, String solution) Create an application exception object.ApplicationException
(String name, String context, String userMessage, String solution, boolean doNotRecord, String messageKey) Create an application exception object.ApplicationException
(String name, Throwable cause, String context, String userMessage, String solution) Create an application exception object.ApplicationException
(String name, Throwable cause, String context, String userMessage, String solution, boolean doNotRecord, String messageKey) Create an application exception object. -
Method Summary
Modifier and TypeMethodDescriptionReturn the client.Return the user context to record any parameters that may be relevant to the exception.Return the submission form XML.Return the GroovyServiceLog object.Return the key that can be used to look up message details in a resource bundle (applies only if logToErrorLog = false)getName()
Return the name of the exception.Return the suggested solution for this problem.Return the user message.boolean
Return whether the exception shall be logged to the application error logvoid
Set the client.void
setContext
(String context) Set the user context to record any parameters that may be relevant to the exception.void
setErrorLog
(ErrorLog errorLog) Set the associated error log, if the exception has been logged.void
setFormXml
(String formXml) Set the submission form XML.void
setGroovyServiceLog
(GroovyServiceLog groovyServiceLog) Set the GroovyServiceLog object.void
setLogToErrorLog
(boolean logToErrorLog) Determine whether the exception shall be logged to the application error log.void
setMessageKey
(String messageKey) Set the key that can be used to look up message details in a resource bundle (applies only if logToErrorLog = false).void
setRequestKey
(String requestKey) void
setSolution
(String solution) Set the suggested solution for this problem.void
setUserMessage
(String userMessage) Set the user message.toString()
Return a String representation of the ApplicationException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ApplicationException
public ApplicationException(String name, Throwable cause, String context, String userMessage, String solution) Create an application exception object.- Parameters:
name
- a name identifying the exceptioncause
- the Throwable causing the errorcontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the usersolution
- an optional message outlining a solution to the problem
-
ApplicationException
Create an application exception object.- Parameters:
name
- a name identifying the exceptioncontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the usersolution
- an optional message outlining a solution to the problem
-
ApplicationException
Create an application exception object.- Parameters:
aClass
- the source object class associated with the exceptioncontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the usersolution
- an optional message outlining a solution to the problem
-
ApplicationException
Create an application exception object.- Parameters:
aClass
- the source object class associated with the exceptioncontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the user
-
ApplicationException
Create an application exception object.- Parameters:
name
- a name identifying the exceptioncontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the user- Since:
- 3.6.0
-
ApplicationException
public ApplicationException(String name, Throwable cause, String context, String userMessage, String solution, boolean doNotRecord, String messageKey) Create an application exception object.- Parameters:
name
- a name identifying the exceptioncause
- the Throwable causing the errorcontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the usersolution
- an optional message outlining a solution to the problemdoNotRecord
- can be used to avoid the exception being logged to the error logmessageKey
- used to look up the error message from a resource bundle
-
ApplicationException
public ApplicationException(Class<?> aClass, Throwable cause, String context, String userMessage, String solution) Create an application exception object.- Parameters:
aClass
- the source object class associated with the exceptioncause
- the Throwable causing the errorcontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the usersolution
- an optional message outlining a solution to the problem
-
ApplicationException
Create an application exception object.- Parameters:
aClass
- the source object class associated with the exceptioncause
- the Throwable causing the errorcontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the user
-
ApplicationException
public ApplicationException(String name, String context, String userMessage, String solution, boolean doNotRecord, String messageKey) Create an application exception object.- Parameters:
name
- a name identifying the exceptioncontext
- a message describing the context in which the error occurreduserMessage
- a detail message about the error intended for the usersolution
- an optional message outlining a solution to the problemdoNotRecord
- can be used to avoid the exception being logged to the error logmessageKey
- used to look up the error message from a resource bundle
-
ApplicationException
-
-
Method Details
-
getErrorLog
- Returns:
- the associated error log, if the exception has been logged.
- Since:
- 4.3.4
-
setErrorLog
Set the associated error log, if the exception has been logged.- Parameters:
errorLog
- the associated error log, if the exception has been logged.- Since:
- 4.3.4
-
getContext
Return the user context to record any parameters that may be relevant to the exception.- Returns:
- the user context of the exception
-
setContext
Set the user context to record any parameters that may be relevant to the exception.- Parameters:
context
- the user context of the exception
-
getName
Return the name of the exception.- Returns:
- the name of the exception
-
getUserMessage
Return the user message. This will display various messages to the end user.- Returns:
- the user message
-
setUserMessage
Set the user message. This will display various messages to the end user.- Parameters:
userMessage
- the user message
-
getSolution
Return the suggested solution for this problem.- Returns:
- the suggested solution for this problem
-
setSolution
Set the suggested solution for this problem.- Parameters:
solution
- the suggested solution for this problem
-
isLogToErrorLog
public boolean isLogToErrorLog()Return whether the exception shall be logged to the application error log- Returns:
- the logToErrorLog flag
-
setLogToErrorLog
public void setLogToErrorLog(boolean logToErrorLog) Determine whether the exception shall be logged to the application error log.- Parameters:
logToErrorLog
- the logToErrorLog flag
-
getMessageKey
Return the key that can be used to look up message details in a resource bundle (applies only if logToErrorLog = false)- Returns:
- the message key
-
setMessageKey
Set the key that can be used to look up message details in a resource bundle (applies only if logToErrorLog = false).- Parameters:
messageKey
- the message key
-
getFormXml
Return the submission form XML.- Returns:
- the submission form XML
-
setFormXml
Set the submission form XML.- Parameters:
formXml
- the submission form XML
-
getClient
Return the client.- Returns:
- the client
-
setClient
Set the client.- Parameters:
client
- the client
-
getGroovyServiceLog
Return the GroovyServiceLog object.- Returns:
- the GroovyServiceLog object.
- Since:
- 4.2.0
-
setGroovyServiceLog
Set the GroovyServiceLog object.- Parameters:
groovyServiceLog
- the GroovyServiceLog object.- Since:
- 4.2.0
-
getRequestKey
- Returns:
- the requestKey
- Since:
- 4.3.4
-
setRequestKey
- Parameters:
requestKey
- the requestKey to set- Since:
- 4.3.4
-
toString
Return a String representation of the ApplicationException. It consists of the name and, if set, the user message.
-