| 
 | Business Components | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--oracle.jbo.common.JboExceptionHelper
        |
        +--oracle.jbo.common.JboExHelperLocalized
The superclass for localized exceptions for Business Components.
This class provides tools for localizing exception messages for various target languages, and for message formatting.
 Message-text localization occurs when
 the client calls getLocalizedMessage(), rather than at
 time the exception occurs, because the client may need to present the message in
 a number of different languages.
 
The components of a message are:
"FRM" or "ORA"."10234"Additional components may be introduced in future.
 A counterpart subclass of ResourceBundle,
 JboExceptionBundle,
 is used to determine the overall formatting of the message.
 The default format is
 
productCode-errorCode: messageBodyFor example,
ORA-10234: I don't think so.
 Most subclasses wll provide a value for the error code in a specialized constructor.
Applications may define subclasses of most JBO exceptions. To do this the application should override the following methods to provide the correct set of values for the messaging services:
getResourceNamegetProductCode
JboExceptionHelper| Field Summary | |
| protected  java.lang.Class | mResBundleClass | 
| Constructor Summary | |
| JboExHelperLocalized(JboMessage ex,
                     java.lang.Class resBundleClass,
                     java.lang.String errorCode,
                     java.lang.Object[] params)Creates a translatable exception. | |
| Method Summary | |
|  java.lang.String | getBaseMessage()Gets the message without localizing it or inserting parameters. | 
| protected  java.lang.String | getErrorMsg(java.util.Locale l,
            java.lang.Object[] params) | 
|  java.lang.String | getLocalizedBaseMessage(java.util.Locale l)Localizes an un-parameterized message text for a specific Locale. | 
|  java.lang.String | getLocalizedMessage(java.util.Locale l)Formats the message text for a specific Locale. | 
|  java.lang.Class | getResourceClass()Gets the resource bundle used to localize messages. | 
|  java.lang.String | getResourceName()Gets the name of the ResourceBundleused to localize messages. | 
| Methods inherited from class oracle.jbo.common.JboExceptionHelper | 
| addToDetails, 
getDetailMessage, 
getDetails, 
getErrorCode, 
getErrorMsgFormat, 
getErrorParameters, 
getMessage, 
getProductCode, 
setDetails, 
setErrorParameters | 
| Methods inherited from class java.lang.Object | 
| clone, 
equals, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
toString, 
wait, 
wait, 
wait | 
| Field Detail | 
protected java.lang.Class mResBundleClass
| Constructor Detail | 
public JboExHelperLocalized(JboMessage ex,
                            java.lang.Class resBundleClass,
                            java.lang.String errorCode,
                            java.lang.Object[] params)
ex - a Business Component error or warning.resBundleClass - a collection of message template, accessed by key.errorCode - error code; a key associated with a message template in
 resBundleClass.params - the error message's parameters.| Method Detail | 
public java.lang.String getLocalizedMessage(java.util.Locale l)
Locale.l - a locale.public java.lang.String getBaseMessage()
public java.lang.String getLocalizedBaseMessage(java.util.Locale l)
Locale.l - a locale.public java.lang.String getResourceName()
ResourceBundle used to localize messages.ResourceBundle.public java.lang.Class getResourceClass()
ResourceBundle.
protected java.lang.String getErrorMsg(java.util.Locale l,
                                       java.lang.Object[] params)
| 
 | Business Components | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||