|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile 11g Release 2 (11.1.2.3.0) E27204-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
oracle.adfmf.framework.exception.AdfException
public class AdfException
Exception class used by ADFMF to generate and use exceptions in the framework. It implements JSONSerializable as we want only selected bits to be serialized and thus this class implements toJSON() which handles serialization of this class.
Field Summary | |
---|---|
static java.lang.String |
ERROR AdfException severity constant for ERROR logging |
static java.lang.String |
FATAL AdfException severity constant for FATAL logging |
static java.lang.String |
INFO AdfException severity constant for INFO logging |
static java.lang.String |
WARNING AdfException severity constant for WARNING logging |
Constructor Summary | |
---|---|
AdfException() Default no argument AdfException constructor |
|
AdfException(java.lang.String message, java.lang.String severity) AdfException constructor |
|
AdfException(java.lang.String severity, java.lang.String bundleName, java.lang.String key, java.lang.Object[] params) AdfException constructor |
|
AdfException(java.lang.Throwable t) AdfException constructor |
|
AdfException(java.lang.Throwable t, java.lang.String severity) AdfException constructor |
Method Summary | |
---|---|
java.lang.String |
getMessage() Get error message from the exception object |
java.lang.String |
getSeverity() Get severity of the exception |
java.lang.String |
getType() Get type of exception |
boolean |
isException() Check if its an exception |
void |
setException(boolean exception) Set exception flag |
void |
setMessage(java.lang.String message) Set the error message to the exception object |
void |
setSeverity(java.lang.String sev) Set severity of the exception |
void |
setType(java.lang.String type) Set type of exception |
java.lang.Object |
toJSON() toJSON implementation as AdfException class implements JSONSerializable |
java.lang.String |
toString() Method to convert AdfException object to String. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INFO
public static final java.lang.String WARNING
public static final java.lang.String ERROR
public static final java.lang.String FATAL
Constructor Detail |
---|
public AdfException()
public AdfException(java.lang.String severity, java.lang.String bundleName, java.lang.String key, java.lang.Object[] params)
severity
- Severity of the exception (Use AdfException Severity constants - INFO, WARNING, ERROR)bundleName
- Name of the bundle where the message key belongskey
- Message key in the bundleparams
- Additional parameters to be used in constructing the error messagepublic AdfException(java.lang.String message, java.lang.String severity)
message
- Error Message stringseverity
- Severity of the exception (Use AdfException Severity constants - INFO, WARNING, ERROR)public AdfException(java.lang.Throwable t)
e
- Exception to be used to generate AdfException objectpublic AdfException(java.lang.Throwable t, java.lang.String severity)
t
- Throwable to be used to generate AdfException objectseverity
- Severity of the exception (Use AdfException Severity constants - INFO, WARNING, ERROR)Method Detail |
---|
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public void setMessage(java.lang.String message)
message
- Error message as a Stringpublic java.lang.String getSeverity()
public void setSeverity(java.lang.String sev)
sev
- Severity of the exception (INFO, WARNING, ERROR, FATAL)public java.lang.String getType()
public void setType(java.lang.String type)
type
- Type of exception (Exception class name - exceptionClassName.class.getName())public boolean isException()
public void setException(boolean exception)
exception
- boolean flag set to indicate if it's an exception or not.public java.lang.String toString()
toString
in class java.lang.Throwable
public java.lang.Object toJSON() throws java.lang.Exception
toJSON
in interface JSONSerializable
java.lang.Exception
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile 11g Release 2 (11.1.2.3.0) E27204-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |