public class ErrorCollectorHandler extends Object implements ErrorHandler
ErrorHandler that collects SAXParseExceptions by severity
instead of throwing immediately, allowing callers to inspect all validation
errors after parsing completes.
If a XOPValidationHandler is supplied and detects an XOP element,
errors and fatals are silently suppressed (XOP payloads are not fully inlined
and will always produce schema violations).
| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR |
static String |
FATAL |
static String |
WARNING |
| Constructor and Description |
|---|
ErrorCollectorHandler() |
ErrorCollectorHandler(XOPValidationHandler xopHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
error(SAXParseException ex) |
void |
fatalError(SAXParseException ex) |
List<String> |
getExceptionList(String... errorTypes)
Returns all collected messages for the requested severity levels.
|
boolean |
hasExceptions(String... errorTypes)
Returns
true if any messages were collected for the requested severity levels. |
void |
warning(SAXParseException ex) |
public static final String WARNING
public static final String ERROR
public static final String FATAL
public ErrorCollectorHandler()
public ErrorCollectorHandler(XOPValidationHandler xopHandler)
public void warning(SAXParseException ex)
warning in interface ErrorHandlerpublic void error(SAXParseException ex)
error in interface ErrorHandlerpublic void fatalError(SAXParseException ex)
fatalError in interface ErrorHandlerpublic List<String> getExceptionList(String... errorTypes)
WARNING, ERROR, and FATAL.errorTypes - one or more severity constantspublic boolean hasExceptions(String... errorTypes)
true if any messages were collected for the requested severity levels.errorTypes - one or more severity constants
Connector Packaging PERSPODOLOGIST 4.9.5 API
Copyright © {inceptionYear}-2026 eHealth. All Rights Reserved.