Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile
11g Release 2 (11.1.2.4.0)

E27204-03


oracle.adfmf.framework.exception
Class AdfException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by oracle.adfmf.framework.exception.AdfException

All Implemented Interfaces:
java.io.Serializable, JSONSerializable
Direct Known Subclasses:
AdfInvocationRuntimeException

public class AdfException
extends java.lang.RuntimeException
implements JSONSerializable

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.

See Also:
Serialized Form

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

INFO

public static final java.lang.String INFO
AdfException severity constant for INFO logging
See Also:
Constant Field Values

WARNING

public static final java.lang.String WARNING
AdfException severity constant for WARNING logging
See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
AdfException severity constant for ERROR logging
See Also:
Constant Field Values

FATAL

public static final java.lang.String FATAL
AdfException severity constant for FATAL logging
See Also:
Constant Field Values

Constructor Detail

AdfException

public AdfException()
Default no argument AdfException constructor

AdfException

public AdfException(java.lang.String severity,
                    java.lang.String bundleName,
                    java.lang.String key,
                    java.lang.Object[] params)
AdfException constructor
Parameters:
severity - Severity of the exception (Use AdfException Severity constants - INFO, WARNING, ERROR)
bundleName - Name of the bundle where the message key belongs
key - Message key in the bundle
params - Additional parameters to be used in constructing the error message

AdfException

public AdfException(java.lang.String message,
                    java.lang.String severity)
AdfException constructor
Parameters:
message - Error Message string
severity - Severity of the exception (Use AdfException Severity constants - INFO, WARNING, ERROR)

AdfException

public AdfException(java.lang.Throwable t)
AdfException constructor
Parameters:
e - Exception to be used to generate AdfException object

AdfException

public AdfException(java.lang.Throwable t,
                    java.lang.String severity)
AdfException constructor
Parameters:
t - Throwable to be used to generate AdfException object
severity - Severity of the exception (Use AdfException Severity constants - INFO, WARNING, ERROR)

Method Detail

getMessage

public java.lang.String getMessage()
Get error message from the exception object
Overrides:
getMessage in class java.lang.Throwable
Returns:
Error Message as a String

setMessage

public void setMessage(java.lang.String message)
Set the error message to the exception object
Parameters:
message - Error message as a String

getSeverity

public java.lang.String getSeverity()
Get severity of the exception
Returns:
Severity of the exception (INFO, WARNING, ERROR, FATAL)

setSeverity

public void setSeverity(java.lang.String sev)
Set severity of the exception
Parameters:
sev - Severity of the exception (INFO, WARNING, ERROR, FATAL)

getType

public java.lang.String getType()
Get type of exception
Returns:
Exception type class name - exceptionClassName.class.getName())

setType

public void setType(java.lang.String type)
Set type of exception
Parameters:
type - Type of exception (Exception class name - exceptionClassName.class.getName())

isException

public boolean isException()
Check if its an exception
Returns:
boolean returning true if it's an exception, false otherwise

setException

public void setException(boolean exception)
Set exception flag
Parameters:
exception - boolean flag set to indicate if it's an exception or not.

toString

public java.lang.String toString()
Method to convert AdfException object to String.
Overrides:
toString in class java.lang.Throwable

toJSON

public java.lang.Object toJSON()
                        throws java.lang.Exception
toJSON implementation as AdfException class implements JSONSerializable
Specified by:
toJSON in interface JSONSerializable
Returns:
Object
Throws:
java.lang.Exception

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile
11g Release 2 (11.1.2.4.0)

E27204-03


Copyright © 2012, 2013 Oracle. All Rights Reserved.