Class GraciousProcessingReport

java.lang.Object
org.citrusframework.validation.json.report.GraciousProcessingReport

public class GraciousProcessingReport extends Object
This class implements a report that represents a gracious interpretation of a list of JSON schema validation messages (e.g. a List<com.networknt.schema.ValidationMessage>).

Its main use-case is this: We cannot sincerely determine the matching JSON schema when validating messages in JsonSchemaValidation. Therefore, if at least one schema validates the message without any exceptions, the message will be marked as valid and thus accepted by this class.

  • Constructor Details

    • GraciousProcessingReport

      public GraciousProcessingReport()
      Creates a new GraciousProcessingReport with the initial success state being false.
    • GraciousProcessingReport

      public GraciousProcessingReport(boolean success)
      Creates a new GraciousProcessingReport with the given initial success state.
      Parameters:
      success - the default success state
    • GraciousProcessingReport

      public GraciousProcessingReport(Set<com.networknt.schema.ValidationMessage> validationMessages)
      Creates a new GraciousProcessingReport considering the initial validation messages.
      Parameters:
      validationMessages - The list of validation messages to merge the existing report
  • Method Details

    • isSuccess

      public boolean isSuccess()
    • setSuccess

      public void setSuccess(boolean success)
    • getValidationMessages

      public List<com.networknt.schema.ValidationMessage> getValidationMessages()
    • mergeWith

      public void mergeWith(Set<com.networknt.schema.ValidationMessage> validationMessages)
      Merges this GraciousProcessingReport with the status information from the existing one.
      Parameters:
      validationMessages - the new validation messages to consider