Class DSSErrorHandlerAlert
java.lang.Object
eu.europa.esig.dss.alert.AbstractAlert<DSSErrorHandler>
eu.europa.esig.dss.xml.common.alert.DSSErrorHandlerAlert
- All Implemented Interfaces:
Alert<DSSErrorHandler>
The default
DSSErrorHandler alert.
Throws a XSDValidationException containing a list of error messages if applicable.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AlertDetector<DSSErrorHandler> Gets the alert detectorprotected AlertHandler<DSSErrorHandler> Gets the alert handlerprotected StringBuilds a validation message fromSAXParseExceptionvoidsetEnablePosition(boolean enablePosition) Sets whether position (line and column number) of the error shall be extracted into returned validation messages NOTE : an instance ofjavax.xml.transform.stream.StreamSourceshall be provided to the validation, in order to ensure the position is being extracted (e.g. will not work forjavax.xml.transform.dom.DOMSource).voidsetEnableWarnings(boolean enableWarnings) Sets whether validation warnings shall be returned within the error list Default : FALSE (warnings a logged, but not returned)Methods inherited from class eu.europa.esig.dss.alert.AbstractAlert
alert
-
Constructor Details
-
DSSErrorHandlerAlert
public DSSErrorHandlerAlert()The default constructor
-
-
Method Details
-
setEnableWarnings
public void setEnableWarnings(boolean enableWarnings) Sets whether validation warnings shall be returned within the error list Default : FALSE (warnings a logged, but not returned)- Parameters:
enableWarnings- whether validation warnings shall be returned
-
setEnablePosition
public void setEnablePosition(boolean enablePosition) Sets whether position (line and column number) of the error shall be extracted into returned validation messages NOTE : an instance ofjavax.xml.transform.stream.StreamSourceshall be provided to the validation, in order to ensure the position is being extracted (e.g. will not work forjavax.xml.transform.dom.DOMSource). Default : FALSE (line and column numbers are not returned)- Parameters:
enablePosition- whether position (line and column number) shall be returned
-
getAlertDetector
Description copied from class:AbstractAlertGets the alert detector- Overrides:
getAlertDetectorin classAbstractAlert<DSSErrorHandler>- Returns:
AlertDetector
-
getAlertHandler
Description copied from class:AbstractAlertGets the alert handler- Overrides:
getAlertHandlerin classAbstractAlert<DSSErrorHandler>- Returns:
AlertHandler
-
getValidationMessage
Builds a validation message fromSAXParseException- Parameters:
e-SAXParseExceptioncontaining information about a failed condition- Returns:
Stringuser-friendly validation message
-