| 
 | BEA Systems, Inc. | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectweblogic.apache.xerces.impl.XMLErrorReporter
This class is a common element of all parser configurations and is used to report errors that occur. This component can be queried by parser components from the component manager using the following property ID:
http://apache.org/xml/properties/internal/error-reporter
 Errors are separated into domains that categorize a class of errors.
 In a parser configuration, the parser would register a
 MessageFormatter for each domain that is capable of
 localizing error messages and formatting them based on information 
 about the error. Any parser component can invent new error domains
 and register additional message formatters to localize messages in
 those domains.
 
This component requires the following features and properties from the component manager that uses it:
This component can use the following features and properties but they are not required:
MessageFormatter| Field Summary | |
| protected static String | CONTINUE_AFTER_FATAL_ERRORDeprecated. Feature identifier: continue after fatal error. | 
| protected static String | ERROR_HANDLERDeprecated. Property identifier: error handler. | 
| protected  boolean | fContinueAfterFatalErrorDeprecated. Continue after fatal error feature. | 
| protected  XMLErrorHandler | fDefaultErrorHandlerDeprecated. Default error handler. | 
| protected  XMLErrorHandler | fErrorHandlerDeprecated. Error handler. | 
| protected  Locale | fLocaleDeprecated. The locale to be used to format error messages. | 
| protected  XMLLocator | fLocatorDeprecated. Document locator. | 
| protected  Hashtable | fMessageFormattersDeprecated. Mapping of Message formatters for domains. | 
| static short | SEVERITY_ERRORDeprecated. Severity: error. | 
| static short | SEVERITY_FATAL_ERRORDeprecated. Severity: fatal error. | 
| static short | SEVERITY_WARNINGDeprecated. Severity: warning. | 
| Constructor Summary | |
| XMLErrorReporter()Deprecated. Constructs an error reporter with a locator. | |
| Method Summary | |
|  XMLErrorHandler | getErrorHandler()Deprecated. Get the internal XMLErrrorHandler. | 
|  boolean | getFeature(String featureId)Deprecated. | 
|  Locale | getLocale()Deprecated. Gets the current locale. | 
|  MessageFormatter | getMessageFormatter(String domain)Deprecated. Returns the message formatter associated with the specified domain, or null if no message formatter is registered for that domain. | 
|  String[] | getRecognizedFeatures()Deprecated. Returns a list of feature identifiers that are recognized by this component. | 
|  String[] | getRecognizedProperties()Deprecated. Returns a list of property identifiers that are recognized by this component. | 
|  void | putMessageFormatter(String domain,
                    MessageFormatter messageFormatter)Deprecated. Registers a message formatter for the specified domain. | 
|  MessageFormatter | removeMessageFormatter(String domain)Deprecated. Removes the message formatter for the specified domain and returns the removed message formatter. | 
|  void | reportError(String domain,
            String key,
            Object[] arguments,
            short severity)Deprecated. Reports an error. | 
|  void | reportError(XMLLocator location,
            String domain,
            String key,
            Object[] arguments,
            short severity)Deprecated. Reports an error at a specific location. | 
|  void | reset(XMLComponentManager componentManager)Deprecated. Resets the component. | 
|  void | setDocumentLocator(XMLLocator locator)Deprecated. Sets the document locator. | 
|  void | setFeature(String featureId,
           boolean state)Deprecated. Sets the state of a feature. | 
|  void | setLocale(Locale locale)Deprecated. Sets the current locale. | 
|  void | setProperty(String propertyId,
            Object value)Deprecated. Sets the value of a property. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected static final String CONTINUE_AFTER_FATAL_ERROR
protected static final String ERROR_HANDLER
protected boolean fContinueAfterFatalError
protected XMLErrorHandler fDefaultErrorHandler
protected XMLErrorHandler fErrorHandler
protected Locale fLocale
protected XMLLocator fLocator
protected Hashtable fMessageFormatters
public static final short SEVERITY_ERROR
public static final short SEVERITY_FATAL_ERROR
Note: The parser does have a "continue after fatal error" feature but it should be used with extreme caution and care.
public static final short SEVERITY_WARNING
| Constructor Detail | 
public XMLErrorReporter()
| Method Detail | 
public XMLErrorHandler getErrorHandler()
public boolean getFeature(String featureId)
                   throws XMLConfigurationException
XMLConfigurationExceptionpublic Locale getLocale()
public MessageFormatter getMessageFormatter(String domain)
domain - The domain of the message formatter.public String[] getRecognizedFeatures()
getRecognizedFeatures in interface XMLComponentpublic String[] getRecognizedProperties()
getRecognizedProperties in interface XMLComponent
public void putMessageFormatter(String domain,
                                MessageFormatter messageFormatter)
Note: Registering a message formatter for a domain when there is already a formatter registered will cause the previous formatter to be lost. This method replaces any previously registered message formatter for the specified domain.
domain - messageFormatter - public MessageFormatter removeMessageFormatter(String domain)
domain - The domain of the message formatter.
public void reportError(String domain,
                        String key,
                        Object[] arguments,
                        short severity)
                 throws XNIException
domain - The error domain.key - The key of the error message.arguments - The replacement arguments for the error message,
                  if needed.severity - The severity of the error.
XNIExceptionSEVERITY_WARNING, 
SEVERITY_ERROR, 
SEVERITY_FATAL_ERROR
public void reportError(XMLLocator location,
                        String domain,
                        String key,
                        Object[] arguments,
                        short severity)
                 throws XNIException
location - The error location.domain - The error domain.key - The key of the error message.arguments - The replacement arguments for the error message,
                  if needed.severity - The severity of the error.
XNIExceptionSEVERITY_WARNING, 
SEVERITY_ERROR, 
SEVERITY_FATAL_ERROR
public void reset(XMLComponentManager componentManager)
           throws XNIException
reset in interface XMLComponentcomponentManager - The component manager.
SAXException - Thrown by component on initialization error.
                      For example, if a feature or property is
                      required for the operation of the component, the
                      component manager may throw a 
                      SAXNotRecognizedException or a
                      SAXNotSupportedException.
XNIExceptionpublic void setDocumentLocator(XMLLocator locator)
locator - The locator.
public void setFeature(String featureId,
                       boolean state)
                throws XMLConfigurationException
Note: Components should silently ignore features that do not affect the operation of the component.
setFeature in interface XMLComponentfeatureId - The feature identifier.state - The state of the feature.
SAXNotRecognizedException - The component should not throw
                                   this exception.
SAXNotSupportedException - The component should not throw
                                  this exception.
XMLConfigurationException - Thrown for configuration error.
                                   In general, components should
                                   only throw this exception if
                                   it is really
                                   a critical error.public void setLocale(Locale locale)
locale - The new locale.
public void setProperty(String propertyId,
                        Object value)
                 throws XMLConfigurationException
Note: Components should silently ignore properties that do not affect the operation of the component.
setProperty in interface XMLComponentpropertyId - The property identifier.value - The value of the property.
SAXNotRecognizedException - The component should not throw
                                   this exception.
SAXNotSupportedException - The component should not throw
                                  this exception.
XMLConfigurationException - Thrown for configuration error.
                                   In general, components should
                                   only throw this exception if
                                   it is really
                                   a critical error.| 
 | Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs91 Copyright 2005 BEA Systems Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||