Class AbstractCollectingPSErrorHandler

java.lang.Object
com.helger.schematron.pure.errorhandler.AbstractPSErrorHandler
com.helger.schematron.pure.errorhandler.AbstractCollectingPSErrorHandler
All Implemented Interfaces:
com.helger.schematron.ISchematronErrorHandler, IPSErrorHandler
Direct Known Subclasses:
CollectingPSErrorHandler, WrappedCollectingPSErrorHandler

public abstract class AbstractCollectingPSErrorHandler extends AbstractPSErrorHandler
Abstract collecting IPSErrorHandler that collects all error messages in an error list.
Since:
4.2.1
Author:
Philip Helger
  • Constructor Details

    • AbstractCollectingPSErrorHandler

      public AbstractCollectingPSErrorHandler(@Nonnull com.helger.commons.error.list.ErrorList aErrorList, @Nullable IPSErrorHandler aNestedErrorHandler)
  • Method Details

    • handleInternally

      protected void handleInternally(@Nonnull com.helger.commons.error.IError aError)
      Description copied from class: AbstractPSErrorHandler
      The internal method to handle warnings and errors.
      Specified by:
      handleInternally in class AbstractPSErrorHandler
      Parameters:
      aError - The structured error. May not be null.
    • getErrorList

      @Nonnull @ReturnsMutableCopy public com.helger.commons.error.list.IErrorList getErrorList()
    • getAllFailures

      @Nonnull @ReturnsMutableCopy public com.helger.commons.error.list.IErrorList getAllFailures()
    • getAllErrors

      @Nonnull @ReturnsMutableCopy public com.helger.commons.error.list.IErrorList getAllErrors()
    • clearResourceErrors

      @Nonnull public com.helger.commons.state.EChange clearResourceErrors()
      Clear all currently stored errors. This might be helpful, if the same error handler is used several times.
      Returns:
      EChange.CHANGED if at least one item was cleared.
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if no error is contained, false if at least one error is contained.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractPSErrorHandler