|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jbo.common.PropertiesHelper
oracle.jbo.common.JboExceptionHelper
oracle.jbo.common.JboExHelperLocalized
public class 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:
getResourceName
getProductCode
JboExceptionHelper
Field Summary | |
---|---|
protected java.lang.Class |
mResBundleClass
|
protected ResourceBundleDef |
mResBundleDef
|
Fields inherited from class oracle.jbo.common.JboExceptionHelper |
---|
SEVERITY_ERROR, SEVERITY_RECOVERABLE_ERROR, SEVERITY_VETOABLE_WARNING, SEVERITY_WARNING |
Fields inherited from class oracle.jbo.common.PropertiesHelper |
---|
mProperties |
Constructor Summary | |
---|---|
JboExHelperLocalized(JboMessage ex,
java.lang.Class resBundleClass,
java.lang.String errorCode,
java.lang.Object[] params)
Creates a translatable exception. |
|
JboExHelperLocalized(JboMessage ex,
ResourceBundleDef resBundleDef,
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(Locale l,
java.lang.Object[] params)
|
protected java.lang.String |
getErrorMsgWithNamedTokens(Locale l,
java.util.Hashtable params)
|
java.lang.String |
getLocalizedBaseMessage(Locale l)
Localizes an un-parameterized message text for a specific Locale . |
java.lang.String |
getLocalizedMessage(Locale l)
Formats the message text for a specific Locale . |
ResourceBundleDef |
getResourceBundleDef()
getResourceBundleDef gets the mResBundleDef value |
java.lang.Class |
getResourceClass()
Gets the resource bundle used to localize messages. |
java.lang.String |
getResourceName()
Gets the name of the ResourceBundle used to localize messages. |
Methods inherited from class oracle.jbo.common.JboExceptionHelper |
---|
addToDetails, getDetailMessage, getDetails, getDetailsList, getErrorCode, getErrorMsgFormat, getErrorParameters, getErrorParametersMap, getMessage, getProductCode, getProperties, getSeverity, isAppendCodes, setAppendCodes, setDetails, setDetailsList, setErrorParameters, setErrorParametersMap, setLocaleContext, setSeverity |
Methods inherited from class oracle.jbo.common.PropertiesHelper |
---|
closeObject, getImageLoc, getProperty, getProperty, isReadOnly, refreshProperties, refreshProperty, setName, setProperty |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Class mResBundleClass
protected ResourceBundleDef mResBundleDef
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.public JboExHelperLocalized(JboMessage ex, ResourceBundleDef resBundleDef, java.lang.String errorCode, java.lang.Object[] params)
ex
- a Business Component error or warning.resBundleDef
- a ResourceBundleDef.errorCode
- error code; a key associated with a message template in resBundleClass
.params
- the error message's parameters.Method Detail |
---|
public ResourceBundleDef getResourceBundleDef()
public java.lang.String getLocalizedMessage(Locale l)
Locale
.
getLocalizedMessage
in class JboExceptionHelper
l
- a locale.
public java.lang.String getBaseMessage()
getBaseMessage
in class JboExceptionHelper
public java.lang.String getLocalizedBaseMessage(Locale l)
Locale
.
getLocalizedBaseMessage
in class JboExceptionHelper
l
- a locale.
public java.lang.String getResourceName()
ResourceBundle
used to localize messages.
getResourceName
in class JboExceptionHelper
ResourceBundle
.public java.lang.Class getResourceClass()
getResourceClass
in class JboExceptionHelper
ResourceBundle
.protected java.lang.String getErrorMsgWithNamedTokens(Locale l, java.util.Hashtable params)
getErrorMsgWithNamedTokens
in class JboExceptionHelper
protected java.lang.String getErrorMsg(Locale l, java.lang.Object[] params)
getErrorMsg
in class JboExceptionHelper
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |