public class JboWarning extends java.lang.RuntimeException implements java.io.Serializable, MetaObjectBase, JboMessage, Properties
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:
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | HIDE_DETAIL_EXCEPTIONS_HINTDeprecated.   | 
| protected JboExceptionHelper | mHelper | 
| static int | SEVERITY_ERRORImplies that this exception is a fatal exception and the application
 needs to stop processing it's flow and go to an error page. | 
| static int | SEVERITY_RAC_RECOVERABLE_ERRORImplies that this exception may be recoverable such that retrying after
 obtaining a new connection may succeed. | 
| static int | SEVERITY_RECOVERABLE_ERRORImplies that there's been a validation error or a business logic error and the 
 application may override the exception/error via a user confirmation or correction
 of data being submitted. | 
| static int | SEVERITY_VETOABLE_WARNINGImplies that there's some level of acceptible impropriety in the data being
 submitted. | 
| static int | SEVERITY_WARNINGImplies that there's some level of acceptible impropriety in the data being
 submitted. | 
TYP_APP_MODULE, TYP_ATTRIBUTE, TYP_ATTRIBUTE_LIST_WITH_DEF, TYP_CATEGORY, TYP_COMPONENT_OBJECT, TYP_DATA_CONTROL, TYP_DEF_ANY, TYP_DEF_APP_MODULE, TYP_DEF_ASSOC_END, TYP_DEF_ATTRIBUTE, TYP_DEF_COMPONENT_OBJECT, TYP_DEF_DOMAIN, TYP_DEF_ENTITY_ASSOC, TYP_DEF_ENTITY_OBJECT, TYP_DEF_EXPRWHITELIST, TYP_DEF_KEY, TYP_DEF_LIST_BINDING, TYP_DEF_METHOD, TYP_DEF_OPERATION, TYP_DEF_OPERATION_PARAM, TYP_DEF_OPERATIONS, TYP_DEF_PACKAGE, TYP_DEF_ROWFINDER, TYP_DEF_VIEW_ACCESSOR, TYP_DEF_VIEW_ANNOT, TYP_DEF_VIEW_LINK, TYP_DEF_VIEW_LINK_END, TYP_DEF_VIEW_OBJECT, TYP_DOMAIN, TYP_ENTITY_ASSOC, TYP_ENTITY_OBJECT, TYP_ENTITY_ROW, TYP_ENTITY_ROW_SET, TYP_ENTITY_ROW_SET_ITERATOR, TYP_ENTITY_USAGE, TYP_PACKAGE, TYP_PERS_DEF_APP_MODULE, TYP_PERS_DEF_ATTRIBUTE, TYP_PERS_DEF_COMPONENT_OBJECT, TYP_PERS_DEF_DOMAIN, TYP_PERS_DEF_ENTITY_ASSOC, TYP_PERS_DEF_ENTITY_OBJECT, TYP_PERS_DEF_OFFSET, TYP_PERS_DEF_OPERATION, TYP_PERS_DEF_PACKAGE, TYP_PERS_DEF_VARIABLE, TYP_PERS_DEF_VIEW_LINK, TYP_PERS_DEF_VIEW_OBJECT, TYP_SERVICE_VIEW_USAGE, TYP_SORT_CRITERIA, TYP_TRANSACTION, TYP_TRIGGER_TYPE, TYP_VALIDATOR_TYPE, TYP_VARIABLE, TYP_VARIABLE_WHERE_CLAUSE, TYP_VIEW_CRITERIA, TYP_VIEW_CRITERIA_ITEM, TYP_VIEW_CRITERIA_ROW, TYP_VIEW_LINK, TYP_VIEW_OBJECT, TYP_VIEW_ROW, TYP_VIEW_ROW_SET, TYP_VIEW_ROW_SET_ITERATOR, TYP_VIEW_USAGE| Constructor and Description | 
|---|
| JboWarning(java.lang.Class resBundleClass,
          java.lang.String errorCode,
          java.lang.Object[] params)Creates a translatable warning. | 
| JboWarning(ResourceBundleDef resBundleDef,
          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. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| java.util.Map | getErrorParametersMap()If named tokens are set on this exception object, return a copy
 of the named tokens and it's evaluated values. | 
| 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.util.Hashtable | getProperties()Gets the table of properties. | 
| java.lang.Object | getProperty(java.lang.String hintName)Retrieves the specified property, if it exists. | 
| java.lang.Object | getProperty(java.lang.String hintName,
           LocaleContext locale) | 
| java.lang.Class | getResourceClass()Gets the class of the resource bundle used to localize messages. | 
| java.lang.String | getResourceName()Gets the name of the  ResourceBundleused to localize messages. | 
| int | getSeverity()Gets the exception severity. | 
| java.lang.Object | getSource() | 
| static java.lang.String | getTypeNameFromId(int id) | 
| boolean | isAppendCodes()Returns true if this exception has to prefix the error message with Product and Message Ids. | 
| boolean | isExceptionInNonUIContext()This method returns true for warnings that must be treated as
 errors when the application is running in non-interactive context
 like webservices and batch programs. | 
| boolean | isLocalizable()Tests this message's localizability. | 
| boolean | isShowDetailExceptions() | 
| boolean | isWarning() | 
| java.lang.Object | refreshProperty(java.lang.String hintName)Retrieves the specified property, if it exists. | 
| void | setAppendCodes(boolean flag)Set false if this exception should not prefix the error message with Product and Message Ids. | 
| void | setDetails(java.lang.Object[] details)Sets the list of details. | 
| protected void | setErrorParameters(java.lang.Object[] params)Resets the error parameters. | 
| protected void | setErrorParametersMap(java.util.Map params)Resets the error parameters as a name-value pair. | 
| void | setLocaleContext(LocaleContext locale)Set the default locale for this exception to the given locale. | 
| void | setProperty(java.lang.String hintName,
           java.lang.Object hintValue)Sets a value for the specified property.. | 
| void | setSeverity(int severity)Sets the exception severity. | 
| void | setShowDetailExceptions(boolean flag) | 
| void | setSource(java.lang.Object id) | 
protected JboExceptionHelper mHelper
public static final int SEVERITY_ERROR
public static final int SEVERITY_RECOVERABLE_ERROR
public static final int SEVERITY_RAC_RECOVERABLE_ERROR
public static final int SEVERITY_VETOABLE_WARNING
public static final int SEVERITY_WARNING
public static final java.lang.String HIDE_DETAIL_EXCEPTIONS_HINT
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.ResourceBundlepublic 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.ResourceBundlepublic JboWarning(ResourceBundleDef resBundleDef, java.lang.String errorCode, java.lang.Object[] params)
resBundleDef - a ResourceBundleDef.errorCode - error code, a key associated with a message in the
 resource bundle.params - the error message's parameters.ResourceBundlepublic java.lang.String getMessage()
getMessage in interface JboMessagegetMessage in class java.lang.Throwablepublic java.lang.String getLocalizedMessage(java.util.Locale l)
Locale.getLocalizedMessage in interface JboMessagel - a locale.public java.lang.String getBaseMessage()
getBaseMessage in interface JboMessagepublic java.lang.Class getResourceClass()
getResourceClass in interface JboMessageResourceBundle.public java.lang.String getLocalizedBaseMessage(java.util.Locale l)
Locale, but without
 inserting parameters.getLocalizedBaseMessage in interface JboMessagel - a locale.public java.lang.String getResourceName()
ResourceBundle used to localize messages.getResourceName in interface JboMessagepublic java.lang.Object[] getErrorParameters()
getErrorParameters in interface JboMessageprotected void setErrorParameters(java.lang.Object[] params)
public java.util.Map getErrorParametersMap()
protected void setErrorParametersMap(java.util.Map params)
public java.lang.String getErrorCode()
getErrorCode in interface JboMessagepublic java.lang.String getProductCode()
getProductCode in interface JboMessageJBO_PRODUCT_CODE.public java.lang.Object[] getDetails()
getDetails in interface JboMessagepublic java.lang.String getDetailMessage()
getDetailMessage in interface JboMessagepublic void setDetails(java.lang.Object[] details)
setDetails in interface JboMessagedetails - an array which replaces the current list-of-details
 array in this warning object.public void addToDetails(java.lang.Object obj)
addToDetails in interface JboMessageobj - an object to add to the details list.public boolean isLocalizable()
isLocalizable in interface JboMessagetrue if this message can be localized.protected JboExceptionHelper getJboExceptionHelper()
JboExceptionHelperpublic void setSource(java.lang.Object id)
public java.lang.Object getSource()
public int getSeverity()
JboWarning.SEVERITY_ERROR, JboWarning.SEVERITY_RECOVERABLE_ERROR, JboWarning.SEVERITY_VETOABLE_WARNING and JboWarning.SEVERITY_WARNING.public void setSeverity(int severity)
severity - an int value representing the exception severitypublic static java.lang.String getTypeNameFromId(int id)
public java.lang.Object getProperty(java.lang.String hintName)
PropertiesgetProperty in interface PropertieshintName - Property name.null.public java.lang.Object getProperty(java.lang.String hintName,
                           LocaleContext locale)
getProperty in interface Propertiespublic java.lang.Object refreshProperty(java.lang.String hintName)
PropertiesgetProperty.refreshProperty in interface PropertieshintName - Property name.null.public java.util.Hashtable getProperties()
PropertiesgetProperties in interface Propertiespublic void setProperty(java.lang.String hintName,
               java.lang.Object hintValue)
hintName - Property name.hintValue - the value of the property.public void setLocaleContext(LocaleContext locale)
public boolean isAppendCodes()
public void setAppendCodes(boolean flag)
public boolean isWarning()
public boolean isExceptionInNonUIContext()
public boolean isShowDetailExceptions()
public void setShowDetailExceptions(boolean flag)