Class EmptyValidationReport

java.lang.Object
com.atlassian.oai.validator.report.EmptyValidationReport
All Implemented Interfaces:
ValidationReport

public class EmptyValidationReport extends Object implements ValidationReport
An empty ValidationReport which contains no ValidationReport.Message. An EmptyValidationReport can't have any error by definition.

This EmptyValidationReport is immutable.

  • Method Details

    • hasErrors

      public boolean hasErrors()
      Description copied from interface: ValidationReport
      Return if this validation report contains errors.
      Specified by:
      hasErrors in interface ValidationReport
      Returns:
      true if a validation error exists; false otherwise.
    • getMessages

      @Nonnull public List<ValidationReport.Message> getMessages()
      Description copied from interface: ValidationReport
      Get the validation messages on this report.
      Specified by:
      getMessages in interface ValidationReport
      Returns:
      The messages recorded on this report
    • withAdditionalContext

      public ValidationReport withAdditionalContext(ValidationReport.MessageContext context)
      Description copied from interface: ValidationReport
      Apply the given additional message context to each message in this validation report, returning a new unmodifiable report.
      Specified by:
      withAdditionalContext in interface ValidationReport
      Parameters:
      context - The additional context to apply to each message in the report
      Returns:
      A new, unmodifiable validation report containing all of the messages from this report, enhanced with the additional supplied context