Class DSSErrorHandlerAlert

java.lang.Object
eu.europa.esig.dss.alert.AbstractAlert<DSSErrorHandler>
eu.europa.esig.dss.xml.common.alert.DSSErrorHandlerAlert
All Implemented Interfaces:
eu.europa.esig.dss.alert.Alert<DSSErrorHandler>

public class DSSErrorHandlerAlert extends eu.europa.esig.dss.alert.AbstractAlert<DSSErrorHandler>
The default DSSErrorHandler alert. Throws a XSDValidationException containing a list of error messages if applicable.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected eu.europa.esig.dss.alert.detector.AlertDetector<DSSErrorHandler>
     
    protected eu.europa.esig.dss.alert.handler.AlertHandler<DSSErrorHandler>
     
    protected String
    Builds a validation message from SAXParseException
    void
    setEnablePosition(boolean enablePosition)
    Sets whether position (line and column number) of the error shall be extracted into returned validation messages NOTE : an instance of javax.xml.transform.stream.StreamSource shall be provided to the validation, in order to ensure the position is being extracted (e.g.
    void
    setEnableWarnings(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 of javax.xml.transform.stream.StreamSource shall be provided to the validation, in order to ensure the position is being extracted (e.g. will not work for javax.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

      protected eu.europa.esig.dss.alert.detector.AlertDetector<DSSErrorHandler> getAlertDetector()
      Overrides:
      getAlertDetector in class eu.europa.esig.dss.alert.AbstractAlert<DSSErrorHandler>
    • getAlertHandler

      protected eu.europa.esig.dss.alert.handler.AlertHandler<DSSErrorHandler> getAlertHandler()
      Overrides:
      getAlertHandler in class eu.europa.esig.dss.alert.AbstractAlert<DSSErrorHandler>
    • getValidationMessage

      protected String getValidationMessage(SAXParseException e)
      Builds a validation message from SAXParseException
      Parameters:
      e - SAXParseException containing information about a failed condition
      Returns:
      String user-friendly validation message