Class ContextProvidingValidationEventHandler

java.lang.Object
org.hibernate.boot.jaxb.internal.ContextProvidingValidationEventHandler
All Implemented Interfaces:
ValidationEventHandler

public class ContextProvidingValidationEventHandler extends Object implements ValidationEventHandler
ValidationEventHandler implementation providing easier access to where (line/column) an error occurred.
Author:
Steve Ebersole
  • Constructor Details

    • ContextProvidingValidationEventHandler

      public ContextProvidingValidationEventHandler()
  • Method Details

    • handleEvent

      public boolean handleEvent(ValidationEvent validationEvent)
      Description copied from interface: ValidationEventHandler
      Receive notification of a validation warning or error.

      The ValidationEvent will have a ValidationEventLocator embedded in it that indicates where the error or warning occurred.

      If an unchecked runtime exception is thrown from this method, the Jakarta XML Binding provider will treat it as if the method returned false and interrupt the current unmarshal, validate, or marshal operation.

      Specified by:
      handleEvent in interface ValidationEventHandler
      Parameters:
      validationEvent - the encapsulated validation event information. It is a provider error if this parameter is null.
      Returns:
      true if the Jakarta XML Binding Provider should attempt to continue the current unmarshal, validate, or marshal operation after handling this warning/error, false if the provider should terminate the current operation with the appropriate UnmarshalException, ValidationException, or MarshalException.
    • getLineNumber

      public int getLineNumber()
    • getColumnNumber

      public int getColumnNumber()
    • getMessage

      public String getMessage()