Package com.helger.jaxb.validation
Class CollectingValidationEventHandler
java.lang.Object
com.helger.jaxb.validation.AbstractValidationEventHandler
com.helger.jaxb.validation.CollectingValidationEventHandler
- All Implemented Interfaces:
IValidationEventHandler,jakarta.xml.bind.ValidationEventHandler
An implementation of the JAXB
ValidationEventHandler
interface. It collects all events that occurred!- Author:
- Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.helger.commons.concurrent.SimpleReadWriteLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.helger.commons.state.EChangeClear all currently stored errors.voidforEachResourceError(Consumer<? super com.helger.commons.error.IError> aConsumer) Call the provided consumer for all contained resource errors.com.helger.commons.error.list.IErrorListprotected voidonEvent(com.helger.commons.error.IError aEvent) Callback method invoked when an error occurs.toString()Methods inherited from class com.helger.jaxb.validation.AbstractValidationEventHandler
continueProcessing, getErrorFieldName, getErrorLevel, getLocationResourceID, handleEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.jaxb.validation.IValidationEventHandler
andThen
-
Field Details
-
m_aRWLock
protected final com.helger.commons.concurrent.SimpleReadWriteLock m_aRWLock
-
-
Constructor Details
-
CollectingValidationEventHandler
public CollectingValidationEventHandler()
-
-
Method Details
-
onEvent
Description copied from class:AbstractValidationEventHandlerCallback method invoked when an error occurs.- Specified by:
onEventin classAbstractValidationEventHandler- Parameters:
aEvent- The occurred error.
-
getErrorList
-
forEachResourceError
public void forEachResourceError(@Nonnull Consumer<? super com.helger.commons.error.IError> aConsumer) Call the provided consumer for all contained resource errors.- Parameters:
aConsumer- The consumer to be invoked. May not benull. May only perform reading actions!
-
clearResourceErrors
Clear all currently stored errors.- Returns:
EChange.CHANGEDif at least one item was cleared.
-
toString
- Overrides:
toStringin classAbstractValidationEventHandler
-