Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


oracle.jbo.service.errors
Class ServiceExceptionHelper

java.lang.Object
  extended by oracle.jbo.service.errors.ServiceExceptionHelper


public class ServiceExceptionHelper
extends java.lang.Object

Helper class containing methods to convert between JBOException and ServiceException


Field Summary
static java.lang.String DML_COMMIT
           
static java.lang.String DML_DELETE
           
static java.lang.String DML_INSERT
           
static java.lang.String DML_RELEASE_SAVEPOINT
           
static java.lang.String DML_ROLLBACK
           
static java.lang.String DML_ROLLBACK_TO_SAVEPOINT
           
static java.lang.String DML_SAVEPOINT
           
static java.lang.String DML_UPDATE
           
static java.util.HashMap JBO_DML_OPERTATION_MAP
           
static java.util.HashMap MESSAGE_DML_OPERATION_MAP
           
static java.lang.String SEVERITY_ERROR
           
static java.lang.String SEVERITY_RECOVERABLE_ERROR
           
static java.lang.String SEVERITY_UNKNOWN
           
static java.lang.String SEVERITY_WARNING
           

 

Constructor Summary
ServiceExceptionHelper()
           

 

Method Summary
protected static ServiceErrorMessage createServiceErrorMessage(java.lang.String message, java.lang.String errorCode, commonj.sdo.DataObject sourceDataObject)
          construct ServiceErrorMessage
static JboException extractJboException(commonj.sdo.helper.HelperContext helperContext, java.lang.Throwable svcExp)
           
static JboException extractJboException(java.lang.Throwable svcExp)
           
static ServiceException extractServiceException(java.lang.Throwable ex, commonj.sdo.DataObject source, java.lang.String exceptionReturnMode)
          Helper method to compose ServiceException
static commonj.sdo.DataObject getExceptionReturnObject(commonj.sdo.DataObject source, java.lang.String exceptionReturnMode)
           
protected  Row getExceptionRow(JboException e, ApplicationModule am)
          Get the row that throws the exception.
static JboException getJboException(commonj.sdo.helper.HelperContext helperContext, ServiceErrorMessage errorMsg)
           
static JboException getJboException(ServiceErrorMessage errorMsg)
           
static java.lang.String getLocalizedMessage(java.lang.String errorCode, java.lang.Object[] params)
           
static int getOperationIntValue(java.lang.String operation)
           
static java.lang.String getOperationStringValue(int operation)
           
static ServiceErrorMessage getServiceErrorMessage(JboException jboexception, commonj.sdo.DataObject source, java.lang.String exceptionReturnMode, ServiceErrorMessage parentServiceErrorMessage)
          Helper method to retrieve ServiceErrorMessage from jboexception and source dataobject.
static ServiceErrorMessage getServiceErrorMessage(java.lang.Throwable exception, commonj.sdo.DataObject source, java.lang.String exceptionReturnMode)
           
static int getSeverityIntValue(java.lang.String severity)
           
static java.lang.String getSeverityStringValue(int severity)
          mapping jbo error severity to string value

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

SEVERITY_ERROR

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

SEVERITY_RECOVERABLE_ERROR

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

SEVERITY_WARNING

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

SEVERITY_UNKNOWN

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

MESSAGE_DML_OPERATION_MAP

public static java.util.HashMap MESSAGE_DML_OPERATION_MAP

JBO_DML_OPERTATION_MAP

public static java.util.HashMap JBO_DML_OPERTATION_MAP

DML_INSERT

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

DML_UPDATE

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

DML_DELETE

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

DML_ROLLBACK

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

DML_COMMIT

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

DML_SAVEPOINT

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

DML_ROLLBACK_TO_SAVEPOINT

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

DML_RELEASE_SAVEPOINT

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

Constructor Detail

ServiceExceptionHelper

public ServiceExceptionHelper()

Method Detail

getSeverityStringValue

public static java.lang.String getSeverityStringValue(int severity)
mapping jbo error severity to string value
Parameters:
severity -
Returns:

getSeverityIntValue

public static int getSeverityIntValue(java.lang.String severity)

getOperationStringValue

public static java.lang.String getOperationStringValue(int operation)

getOperationIntValue

public static int getOperationIntValue(java.lang.String operation)

getServiceErrorMessage

public static ServiceErrorMessage getServiceErrorMessage(JboException jboexception,
                                                         commonj.sdo.DataObject source,
                                                         java.lang.String exceptionReturnMode,
                                                         ServiceErrorMessage parentServiceErrorMessage)
Helper method to retrieve ServiceErrorMessage from jboexception and source dataobject. If parentServiceErrorMessage is not null, the newly created ServiceErrorMessage will be added to the parent error message's detail property.
Parameters:
jboexception - the source JboException
source - source dataobject related with this JboException
exceptionReturnMode - the return mode for exception handling. It determines how the source dataobject appears in the error message.
parentServiceErrorMessage - the parent error
Returns:
ServiceErrorMessage

extractJboException

public static JboException extractJboException(java.lang.Throwable svcExp)

extractJboException

public static JboException extractJboException(commonj.sdo.helper.HelperContext helperContext,
                                               java.lang.Throwable svcExp)

getJboException

public static JboException getJboException(ServiceErrorMessage errorMsg)

getJboException

public static JboException getJboException(commonj.sdo.helper.HelperContext helperContext,
                                           ServiceErrorMessage errorMsg)

getServiceErrorMessage

public static ServiceErrorMessage getServiceErrorMessage(java.lang.Throwable exception,
                                                         commonj.sdo.DataObject source,
                                                         java.lang.String exceptionReturnMode)

getExceptionReturnObject

public static commonj.sdo.DataObject getExceptionReturnObject(commonj.sdo.DataObject source,
                                                              java.lang.String exceptionReturnMode)

getLocalizedMessage

public static java.lang.String getLocalizedMessage(java.lang.String errorCode,
                                                   java.lang.Object[] params)

createServiceErrorMessage

protected static ServiceErrorMessage createServiceErrorMessage(java.lang.String message,
                                                               java.lang.String errorCode,
                                                               commonj.sdo.DataObject sourceDataObject)
construct ServiceErrorMessage
Parameters:
message - the error message string
errorCode - the error code
sourceDataObject - the source dataObject that is related with this error
Returns:
ServiceErrorMessage.

getExceptionRow

protected Row getExceptionRow(JboException e,
                              ApplicationModule am)
Get the row that throws the exception.
Parameters:
e - the exception
Returns:
the row (either entity object or view row) that contributes to the exception null if the exception is not specific to a row

extractServiceException

public static ServiceException extractServiceException(java.lang.Throwable ex,
                                                       commonj.sdo.DataObject source,
                                                       java.lang.String exceptionReturnMode)
Helper method to compose ServiceException
Parameters:
ex - the original exception to build ServiceException
source - the source DataObject that relates with the original exception
exceptionReturnMode - the return mode determining how much of source dataobject to be included in ServiceException
Returns:
ServiceException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


Copyright © 1997, 2012, Oracle. All rights reserved.