Class GraciousProcessingReport
java.lang.Object
org.citrusframework.validation.json.report.GraciousProcessingReport
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 Summary
ConstructorsConstructorDescriptionCreates a newGraciousProcessingReportwith the initial success state beingfalse.GraciousProcessingReport(boolean success) Creates a newGraciousProcessingReportwith the given initial success state.GraciousProcessingReport(Set<com.networknt.schema.ValidationMessage> validationMessages) Creates a newGraciousProcessingReportconsidering the initial validation messages. -
Method Summary
Modifier and TypeMethodDescriptionList<com.networknt.schema.ValidationMessage>booleanvoidMerges thisGraciousProcessingReportwith the status information from the existing one.voidsetSuccess(boolean success)
-
Constructor Details
-
GraciousProcessingReport
public GraciousProcessingReport()Creates a newGraciousProcessingReportwith the initial success state beingfalse. -
GraciousProcessingReport
public GraciousProcessingReport(boolean success) Creates a newGraciousProcessingReportwith the given initial success state.- Parameters:
success- the default success state
-
GraciousProcessingReport
Creates a newGraciousProcessingReportconsidering 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
-
mergeWith
Merges thisGraciousProcessingReportwith the status information from the existing one.- Parameters:
validationMessages- the new validation messages to consider
-