Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.2)

E22562-02

oracle.apps.fnd.applcore.oaext.model
Class OAExceptionUtils

java.lang.Object
  extended by oracle.apps.fnd.applcore.oaext.model.OAExceptionUtils

public final class OAExceptionUtils
extends java.lang.Object

Provides API covers over several Oracle Applications E-Business Suite error facilities.

PL/SQL error checking utilities
Provides APIs to extract errors from the PL/SQL layer as a bundled Exception.

These utility methods provide access over the Oracle Applications E-Business Suite PL/SQL error handling facilities.


Method Summary
static void checkErrors(oracle.jbo.server.DBTransaction pTx)
          Raises a bundled JboException of all errors registered by PL/SQL APIs from the FND_MESSAGE PL/SQL package.
static void checkErrors(oracle.jbo.server.DBTransaction pTx, int pMessageCount)
          Raises a bundled JboException of a specified number of errors registered by PL/SQL APIs from the FND_MESSAGE PL/SQL package.
protected static void checkErrors(oracle.jbo.server.DBTransaction pTx, int pMessageCount, oracle.jbo.server.RowImpl row)
          For internal OA Framework team development use only. No other use is supported.
static void checkErrors(oracle.jbo.server.DBTransaction pTx, int pMessageCount, java.lang.String pReturnStatus, java.lang.String pMessageData)
          Deprecated.  
protected static void checkErrors(oracle.jbo.server.DBTransaction pTx, int pMessageCount, java.lang.String pReturnStatus, java.lang.String pMessageData, oracle.jbo.server.RowImpl row)
          For internal OA Framework team development use only. No other use is supported.
static void checkErrors(oracle.jbo.server.DBTransaction pTx, oracle.jbo.server.RowImpl row)
          Raises a bundled JboException if any errors are found registered with the FND_MSG_PUB package.
static java.lang.String decodeMessage(oracle.jbo.server.DBTransaction pTx)
          Decodes and returns the message previously set on the FND_MESSAGE buffer using setMessage(String, DBTransaction).
static java.lang.String getMessageDetails(oracle.jbo.server.DBTransaction pTx)
          Returns and decodes the first message registered by PL/SQL APIs from the FND_MESSAGE PL/SQL package.
static java.lang.String getToken(java.lang.String pMessageData, java.lang.String pToken, java.lang.String pRemoveToken, oracle.jbo.server.DBTransaction pTx)
          Returns a token value from the PL/SQL message that was set on the stack using setMessage(String, DBTransaction).
static void setMessage(java.lang.String pMessageData, oracle.jbo.server.DBTransaction pTx)
          Puts an encoded message on the FND_MESSAGE stack.
static java.lang.String unencodeMessage(java.lang.String pMessageData, oracle.jbo.server.DBTransaction pTx)
          Decodes a PL/SQL message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkErrors

public static void checkErrors(oracle.jbo.server.DBTransaction pTx)
Raises a bundled JboException of all errors registered by PL/SQL APIs from the FND_MESSAGE PL/SQL package.

It first gets the message count, then retrieves the messages and constructs a bundled exception. Relies on the FND_MSG_PUB.GET_DETAIL PL/SQL procedure to get the error details.

Parameters:
pTx - current database transaction

checkErrors

public static void checkErrors(oracle.jbo.server.DBTransaction pTx,
                               oracle.jbo.server.RowImpl row)
Raises a bundled JboException if any errors are found registered with the FND_MSG_PUB package. Relies on FND_MSG_PUB PL/SQL package to get the message count and error details.

Parameters:
pTx - current database transaction
row - view object row that will be used to retrieve row and attribute level information

checkErrors

public static void checkErrors(oracle.jbo.server.DBTransaction pTx,
                               int pMessageCount)
Raises a bundled JboException of a specified number of errors registered by PL/SQL APIs from the FND_MESSAGE PL/SQL package.

Relies on the FND_MSG_PUB.GET_DETAIL PL/SQL procedure to get the error details.

Parameters:
pTx - current database transaction
pMessageCount - number of errors found

checkErrors

protected static void checkErrors(oracle.jbo.server.DBTransaction pTx,
                                  int pMessageCount,
                                  oracle.jbo.server.RowImpl row)
For internal OA Framework team development use only. No other use is supported.


checkErrors

public static void checkErrors(oracle.jbo.server.DBTransaction pTx,
                               int pMessageCount,
                               java.lang.String pReturnStatus,
                               java.lang.String pMessageData)
Deprecated. 

Raises a bundled JboException of a specified number of errors registered by PL/SQL APIs from the FND_MESSAGE PL/SQL package. Relies on the FND_MSG_PUB.GET_DETAIL PL/SQL procedure to get the error details. This API is deprecated. Do not use it.

An Oracle Application's PL/SQL API typically returns: return status, message count, and encoded message data as follows:


 PROCEDURE Create_OrderLine
 (
    p_api_version      IN  NUMBER,
    p_init_msg_list    IN  VARCHAR2 := FND_API.G_FALSE,
    p_commit           IN  VARCHAR2 := FND_API.G_FALSE,
    p_validation_level IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL,

    x_return_status    OUT VARCHAR2,
    x_msg_count        OUT NUMBER,
    x_msg_data         OUT VARCHAR2,

    p_line_rec         IN  Line_Rec_Type
 )

 

Parameters:
pTx - current database transaction
pMessageCount - number of errors found
pReturnStatus - return status of the PL/SQL API. Possible values are:
  • "S" for success
  • "E" for error
  • "U" for unexpected error
pMessageData - actual message in an encoded format as returned by the PL/SQL API call
See Also:
checkErrors(DBTransaction), checkErrors(DBTransaction, RowImpl)

checkErrors

protected static void checkErrors(oracle.jbo.server.DBTransaction pTx,
                                  int pMessageCount,
                                  java.lang.String pReturnStatus,
                                  java.lang.String pMessageData,
                                  oracle.jbo.server.RowImpl row)
For internal OA Framework team development use only. No other use is supported.


getMessageDetails

public static java.lang.String getMessageDetails(oracle.jbo.server.DBTransaction pTx)
Returns and decodes the first message registered by PL/SQL APIs from the FND_MESSAGE PL/SQL package. Relies on the FND_MSG_PUB.GET_DETAIL PL/SQL procedure to get the error details.

Parameters:
pTx - current database transaction
Returns:
the first registered PL/SQL message

decodeMessage

public static java.lang.String decodeMessage(oracle.jbo.server.DBTransaction pTx)
Decodes and returns the message previously set on the FND_MESSAGE buffer using setMessage(String, DBTransaction).

setMessage(String, DBTransaction) must be called to set the message on the message stack before calling this method.

Parameters:
pTx - current database transaction
Returns:
decoded PL/SQL error message
See Also:
setMessage(String, DBTransaction), unencodeMessage(String,DBTransaction)

setMessage

public static void setMessage(java.lang.String pMessageData,
                              oracle.jbo.server.DBTransaction pTx)
Puts an encoded message on the FND_MESSAGE stack.

Parameters:
pMessageData - actual message in an encoded format as returned by the PL/SQL API call
pTx - current database transaction
See Also:
decodeMessage(DBTransaction), unencodeMessage(String,DBTransaction)

getToken

public static java.lang.String getToken(java.lang.String pMessageData,
                                        java.lang.String pToken,
                                        java.lang.String pRemoveToken,
                                        oracle.jbo.server.DBTransaction pTx)
Returns a token value from the PL/SQL message that was set on the stack using setMessage(String, DBTransaction).

setMessage(String, DBTransaction) must be called to set the message on the message stack before calling this method.

Parameters:
pMessageData - actual message in an encoded format as returned by the PL/SQL API call
pToken - token name
pRemoveToken - indicate whether to remove the token from the message. Valid values are:
  • "Y" to remove the token from the message.
  • "N" to keep the token in the message.
pTx - current database transaction
Returns:
token value
See Also:
setMessage(String,DBTransaction)

unencodeMessage

public static java.lang.String unencodeMessage(java.lang.String pMessageData,
                                               oracle.jbo.server.DBTransaction pTx)
Decodes a PL/SQL message.

Has the same effect as calling setMessage(String, DBTransaction) then decodeMessage(DBTransaction).

Parameters:
pMessageData - message to be unencoded.
pTx - current database transaction
Returns:
decoded PL/SQL error message
See Also:
setMessage(String, DBTransaction), decodeMessage(DBTransaction)

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.2)

E22562-02

Copyright © 2011 Oracle. All Rights Reserved.