Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

oracle.apps.fnd.applcore.messages
Class MessageFormatHandler

java.lang.Object
  extended by oracle.adf.model.binding.DCErrorHandlerImpl
      extended by oracle.apps.fnd.applcore.messages.MessageFormatHandler
All Implemented Interfaces:
oracle.adf.model.binding.DCCachingErrorHandler, oracle.adf.model.binding.DCErrorHandler, oracle.adf.model.binding.DCErrorMessageHandler
Direct Known Subclasses:
ExceptionHandlerBean

public class MessageFormatHandler
extends oracle.adf.model.binding.DCErrorHandlerImpl

Implements the Exception Handling


Field Summary
static java.lang.String FAILSAFE_ERROR
           
static java.lang.String FND_CMN_SYS_ERR
           
 
Constructor Summary
MessageFormatHandler()
          Create an instance with throwFlag = false
MessageFormatHandler(boolean b)
           
 
Method Summary
 oracle.adf.model.binding.DCErrorMessage getDetailedDisplayMessage(oracle.adf.model.BindingContext ctx, oracle.adf.model.RegionBinding ctr, java.lang.Exception ex)
           
 java.lang.String getDisplayMessage(oracle.adf.model.BindingContext ctx, java.lang.Exception ex)
          Returns a message for UI.
protected  java.lang.String getExceptionType(java.lang.Throwable ex)
          Return a string representing the exception type, if this is a "special" exception that will replaced with a generic message instead of handling as a system error.
protected  boolean isDisplayOnlyException(java.lang.Throwable ex)
          Returns true if it is an exception for non-System Error and just displaying message is required (incident report and logging are not required).
 void reportException(oracle.adf.model.binding.DCBindingContainer formBnd, java.lang.Exception ex)
          Creates an incident report when ex is a system error and update the exception message to a user-friendly message.
protected  java.lang.Throwable stripWrappingExceptions(java.lang.Throwable ex)
          Descend the exception cause stack, looking for a recognized "display" (@see #isDisplayOnlyException(Throwable)) or "special" (@see #getExceptionType(Throwable)) exception.
 
Methods inherited from class oracle.adf.model.binding.DCErrorHandlerImpl
isThrowFlag, setThrowFlag, skipException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FND_CMN_SYS_ERR

public static final java.lang.String FND_CMN_SYS_ERR
See Also:
Constant Field Values

FAILSAFE_ERROR

public static final java.lang.String FAILSAFE_ERROR
See Also:
Constant Field Values
Constructor Detail

MessageFormatHandler

public MessageFormatHandler()
Create an instance with throwFlag = false


MessageFormatHandler

public MessageFormatHandler(boolean b)
Method Detail

getDisplayMessage

public java.lang.String getDisplayMessage(oracle.adf.model.BindingContext ctx,
                                          java.lang.Exception ex)
Returns a message for UI. When a runtime exception occur in side this exception handler, this returns an unhandled exception message from resource bundle.

Specified by:
getDisplayMessage in interface oracle.adf.model.binding.DCErrorMessageHandler
Overrides:
getDisplayMessage in class oracle.adf.model.binding.DCErrorHandlerImpl
Parameters:
ctx -
ex -
Returns:
a message text for UI.

getDetailedDisplayMessage

public oracle.adf.model.binding.DCErrorMessage getDetailedDisplayMessage(oracle.adf.model.BindingContext ctx,
                                                                         oracle.adf.model.RegionBinding ctr,
                                                                         java.lang.Exception ex)
Specified by:
getDetailedDisplayMessage in interface oracle.adf.model.binding.DCErrorMessageHandler
Overrides:
getDetailedDisplayMessage in class oracle.adf.model.binding.DCErrorHandlerImpl
Parameters:
ctx -
ctr -
ex -
Returns:

isDisplayOnlyException

protected boolean isDisplayOnlyException(java.lang.Throwable ex)
Returns true if it is an exception for non-System Error and just displaying message is required (incident report and logging are not required). Following Exception objects are handled as non-System Error. JboWaning (and subclasses) with lower severity than SEVERITY_ERROR, ValidationException, and JboException with FND Messages ResourceBundle.

Parameters:
ex -
Returns:
true if it is a validation exception, otherwise false.

getExceptionType

protected java.lang.String getExceptionType(java.lang.Throwable ex)
Return a string representing the exception type, if this is a "special" exception that will replaced with a generic message instead of handling as a system error. Return values are defined as String constants in ExceptionHandlerUtil.

Parameters:
ex - The exception
Returns:
The string representing exception type, if this is a special exception. If exception is not recognized returns FND_CMN_SYS_ERR.

stripWrappingExceptions

protected java.lang.Throwable stripWrappingExceptions(java.lang.Throwable ex)
Descend the exception cause stack, looking for a recognized "display" (@see #isDisplayOnlyException(Throwable)) or "special" (@see #getExceptionType(Throwable)) exception. If any recognized exception is found, strip all the wrapping exceptions over it and return the recognized exception as the top of the stack. If no recognized exceptions are found return the entire stack unchanged.

Parameters:
ex - The exception
Returns:
A new exception stack, stripped of wrapping exceptions

reportException

public void reportException(oracle.adf.model.binding.DCBindingContainer formBnd,
                            java.lang.Exception ex)
Creates an incident report when ex is a system error and update the exception message to a user-friendly message.

Specified by:
reportException in interface oracle.adf.model.binding.DCErrorHandler
Overrides:
reportException in class oracle.adf.model.binding.DCErrorHandlerImpl
Parameters:
formBnd -
ex -

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

Copyright © 2013 Oracle. All Rights Reserved.