public abstract class AbstractApplicationException
extends java.lang.Exception
AbstractBusinessObjectDocumentException
which has the capability to
represent multiple parameter validation. This exception only occurs when validation
can only be performed on the server side implementation of the business logic.Modifier and Type | Field and Description |
---|---|
static java.util.logging.Level |
DEFAULT_SEVERITY
The default severity to use when logging exceptions.
|
static java.lang.String |
EMPTY_MSG
Constant representing an empty message.
|
Constructor and Description |
---|
AbstractApplicationException()
Default Constructor
|
AbstractApplicationException(java.lang.String astrMessage)
Creates the ApplicationException.
|
AbstractApplicationException(java.lang.String astrMessageKey,
java.lang.Object[] aParams,
java.lang.String astrClassName,
java.lang.String astrMethodName)
Creates the ApplicationException.
|
AbstractApplicationException(java.lang.String astrMessageKey,
java.lang.Object[] aParams,
java.lang.String aResourceBundle,
java.lang.String astrClassName,
java.lang.String astrMethodName,
java.lang.Throwable aCause)
Creates the ApplicationException.
|
AbstractApplicationException(java.lang.String astrMessageKey,
java.lang.Object[] aParams,
java.lang.String astrClassName,
java.lang.String astrMethodName,
java.lang.Throwable aCause)
Creates the ApplicationException.
|
AbstractApplicationException(java.lang.String astrMessage,
java.lang.String astrClassName,
java.lang.String astrMethodName)
Creates the ApplicationException.
|
AbstractApplicationException(java.lang.String astrMessageKey,
java.lang.String aLocalizedMsg,
java.lang.String aErrorCode,
java.lang.Object[] aParams,
java.lang.String aResourceBundle,
java.lang.String astrClassName,
java.lang.String astrMethodName,
java.lang.Throwable aCause)
Creates the ApplicationException.
|
AbstractApplicationException(java.lang.String astrMessage,
java.lang.String astrClassName,
java.lang.String astrMethodName,
java.lang.Throwable aCause)
Creates the ApplicationException.
|
Modifier and Type | Method and Description |
---|---|
void |
addApplicationError(ApplicationError applicationError)
This method adds an application error to the application exception.
|
void |
addApplicationError(java.util.List applicationErrors)
This method adds a list of application errors to the application exception.
|
java.util.List |
getApplicationErrors()
Returns the application errors
|
java.lang.String |
getCorrelationId()
Get the correlation Id for this exception
The correlation Id for this exception.
|
java.lang.String |
getErrorCode()
Get a error code of this
Throwable . |
java.lang.String |
getLocalizedMessage()
Get a localized description of this
Throwable . |
java.lang.String |
getLocalizedMessage(java.util.Locale aLocale)
Get the exception message localized to a different locale.
|
java.lang.String |
getMessage()
Returns the error message string of this throwable object.
|
java.lang.String |
getMessageKey()
Return the message key.
|
java.lang.Object[] |
getMessageParams()
Return the message parameters.
|
public static final java.util.logging.Level DEFAULT_SEVERITY
public static final java.lang.String EMPTY_MSG
public AbstractApplicationException()
public AbstractApplicationException(java.lang.String astrMessage)
astrMessage
- The message or message key of the exception.public AbstractApplicationException(java.lang.String astrMessage, java.lang.String astrClassName, java.lang.String astrMethodName)
astrMessage
- The message or message key of the exception.astrClassName
- The name of the class throwing the exception.astrMethodName
- The name of the method throwing the exception.public AbstractApplicationException(java.lang.String astrMessageKey, java.lang.Object[] aParams, java.lang.String astrClassName, java.lang.String astrMethodName)
astrMessageKey
- The message key of the exception.aParams
- The parameters used for the message key of the exception.astrClassName
- The name of the class throwing the exception.astrMethodName
- The name of the method throwing the exception.public AbstractApplicationException(java.lang.String astrMessage, java.lang.String astrClassName, java.lang.String astrMethodName, java.lang.Throwable aCause)
astrMessage
- The cause of the exception.astrClassName
- The name of the class throwing the exception.astrMethodName
- The name of the method throwing the exception.aCause
- The cause of the exception.public AbstractApplicationException(java.lang.String astrMessageKey, java.lang.Object[] aParams, java.lang.String astrClassName, java.lang.String astrMethodName, java.lang.Throwable aCause)
astrMessageKey
- The message key of the exception.aParams
- The parameters used for the message key of the exception.astrClassName
- The name of the class throwing the exception.astrMethodName
- The name of the method throwing the exception.aCause
- The cause of the exception.public AbstractApplicationException(java.lang.String astrMessageKey, java.lang.Object[] aParams, java.lang.String aResourceBundle, java.lang.String astrClassName, java.lang.String astrMethodName, java.lang.Throwable aCause)
astrMessageKey
- The message key of the exception.aParams
- The parameters used for the message key of the exception.aResourceBundle
- The resource bundle associated with the message keyastrClassName
- The name of the class throwing the exception.astrMethodName
- The name of the method throwing the exception.aCause
- The cause of the exception.public AbstractApplicationException(java.lang.String astrMessageKey, java.lang.String aLocalizedMsg, java.lang.String aErrorCode, java.lang.Object[] aParams, java.lang.String aResourceBundle, java.lang.String astrClassName, java.lang.String astrMethodName, java.lang.Throwable aCause)
astrMessageKey
- The message key of the exception.aLocalizedMsg
- The localised message of the exception.aErrorCode
- The error code of the exception.aParams
- The parameters used for the message key of the exception.aResourceBundle
- The resource bundle associated with the message keyastrClassName
- The name of the class throwing the exception.astrMethodName
- The name of the method throwing the exception.aCause
- The cause of the exception.public java.lang.String getLocalizedMessage()
Throwable
.
Return the preset value of localized message when initialize this object
If it is not pre-set, returns the same result as getMessage()
.getLocalizedMessage
in class java.lang.Throwable
public java.lang.String getErrorCode()
Throwable
.Throwable
.public java.lang.String getLocalizedMessage(java.util.Locale aLocale)
aLocale
- The locale for which the message should be returnedpublic java.lang.String getMessage()
getMessage
in class java.lang.Throwable
Throwable
object
if it was created with an error message string; or the message
key if the resource bundle for the default locale cannot be found.
Null
is returned if the exception was created with no error message key.public java.lang.String getMessageKey()
public java.lang.Object[] getMessageParams()
public java.lang.String getCorrelationId()
public void addApplicationError(ApplicationError applicationError)
applicationError
- The application error.public void addApplicationError(java.util.List applicationErrors)
applicationErrors
- The application errors.public java.util.List getApplicationErrors()