|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jbo.JboWarning
The facility for reporting non-fatal errors for the JBO package.
Translation of a message's text occurs at the time
the client calls getLocalizedMessage()
rather than at
creation time since the client may need to present the message in
one a number of different languages.
The components of a message are:
Most subclasses of JboWarning
will provide a
value for the error code in a specialized constructor.
Applications may define subclasses of most JBO warnings. To do this the application should override the following methods to provide the correct set of values for the messaging services:
Field Summary |
Constructor Summary | |
JboWarning(java.lang.Class resBundleClass,
java.lang.String errorCode,
java.lang.Object[] params)
Creates a translatable warning. |
|
JboWarning(java.lang.String message)
Creates a non-formattable warning. |
|
JboWarning(java.lang.String message,
java.lang.String errorCode,
java.lang.Object[] params)
Creates a formattable but non-localizable warning. |
Method Summary | |
void |
addToDetails(java.lang.Object obj)
Adds to the list of details. |
java.lang.String |
getBaseMessage()
Gets the message without localizing it or inserting parameters. |
java.lang.String |
getDetailMessage()
Constructs a message incorporating the list of details. |
java.lang.Object[] |
getDetails()
Gets the list of objects and exceptions that spawned this message. |
java.lang.String |
getErrorCode()
Gets the error code. |
java.lang.Object[] |
getErrorParameters()
Gets the error message's parameters. |
protected JboExceptionHelper |
getJboExceptionHelper()
Get the Helper object for this exception. |
java.lang.String |
getLocalizedBaseMessage(java.util.Locale l)
Localizes the message text for a specific Locale , but without
inserting parameters. |
java.lang.String |
getLocalizedMessage(java.util.Locale l)
Formats the message text for a specific Locale . |
java.lang.String |
getMessage()
Formats the message text for the default locale. |
java.lang.String |
getProductCode()
Gets the product code. |
java.lang.Class |
getResourceClass()
Gets the class of the resource bundle used to localize messages. |
java.lang.String |
getResourceName()
Gets the name of the ResourceBundle used to localize messages. |
static java.lang.String |
getTypeNameFromId(int id)
|
boolean |
isLocalizable()
Tests this message's localizability. |
void |
setDetails(java.lang.Object[] details)
Sets the list of details. |
protected void |
setErrorParameters(java.lang.Object[] params)
Resets the error parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JboWarning(java.lang.String message, java.lang.String errorCode, java.lang.Object[] params)
If a localizable warning is desired, use the
JboWarning(Class, String, Object[])
constructor.
message
- the unformatted text of the message.errorCode
- an error code.params
- the error message's parameters.ResourceBundle
public JboWarning(java.lang.String message)
message
- the text of the message.public JboWarning(java.lang.Class resBundleClass, java.lang.String errorCode, java.lang.Object[] params)
resBundleClass
- the base class of the ResourceBundle
that will supply the message text.errorCode
- error code, a key associated with a message in the
resource bundle.params
- the error message's parameters.ResourceBundle
Method Detail |
public java.lang.String getMessage()
getMessage
in interface JboMessage
public java.lang.String getLocalizedMessage(java.util.Locale l)
Locale
.
getLocalizedMessage
in interface JboMessage
l
- a locale.
public java.lang.String getBaseMessage()
getBaseMessage
in interface JboMessage
public java.lang.Class getResourceClass()
getResourceClass
in interface JboMessage
ResourceBundle
.public java.lang.String getLocalizedBaseMessage(java.util.Locale l)
Locale
, but without
inserting parameters.
getLocalizedBaseMessage
in interface JboMessage
l
- a locale.
public java.lang.String getResourceName()
ResourceBundle
used to localize messages.
getResourceName
in interface JboMessage
public java.lang.Object[] getErrorParameters()
getErrorParameters
in interface JboMessage
protected void setErrorParameters(java.lang.Object[] params)
public java.lang.String getErrorCode()
getErrorCode
in interface JboMessage
public java.lang.String getProductCode()
getProductCode
in interface JboMessage
JBO_PRODUCT_CODE
.public java.lang.Object[] getDetails()
getDetails
in interface JboMessage
public java.lang.String getDetailMessage()
getDetailMessage
in interface JboMessage
public void setDetails(java.lang.Object[] details)
setDetails
in interface JboMessage
details
- an array which replaces the current list-of-details
array in this warning object.public void addToDetails(java.lang.Object obj)
addToDetails
in interface JboMessage
obj
- an object to add to the details list.public boolean isLocalizable()
isLocalizable
in interface JboMessage
true
if this message can be localized.protected JboExceptionHelper getJboExceptionHelper()
JboExceptionHelper
public static java.lang.String getTypeNameFromId(int id)
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.