Class LoggingValidationHandler

java.lang.Object
gov.nist.secauto.metaschema.core.model.validation.AbstractValidationResultProcessor
gov.nist.secauto.metaschema.cli.util.LoggingValidationHandler

public final class LoggingValidationHandler extends gov.nist.secauto.metaschema.core.model.validation.AbstractValidationResultProcessor
Supports logging validation findings to the console using ANSI color codes to improve the visibility of warnings and errors.
  • Method Details

    • instance

      @NonNull public static LoggingValidationHandler instance()
      Get a singleton instance of the logging validation handler.

      This instance will not log exceptions.

      Returns:
      the instance
    • instance

      @NonNull public static LoggingValidationHandler instance(boolean logExceptions)
      Get a singleton instance of the logging validation handler.
      Parameters:
      logExceptions - true if this instance will log exceptions or false otherwise
      Returns:
      the instance
    • isLogExceptions

      public boolean isLogExceptions()
      Determine if exceptions should be logged.
      Returns:
      true if exceptions are logged or false otherwise
    • handleJsonValidationFinding

      protected void handleJsonValidationFinding(@NonNull gov.nist.secauto.metaschema.core.model.validation.JsonSchemaContentValidator.JsonValidationFinding finding)
      Specified by:
      handleJsonValidationFinding in class gov.nist.secauto.metaschema.core.model.validation.AbstractValidationResultProcessor
    • handleXmlValidationFinding

      protected void handleXmlValidationFinding(gov.nist.secauto.metaschema.core.model.validation.XmlSchemaContentValidator.XmlValidationFinding finding)
      Specified by:
      handleXmlValidationFinding in class gov.nist.secauto.metaschema.core.model.validation.AbstractValidationResultProcessor
    • handleConstraintValidationFinding

      protected void handleConstraintValidationFinding(@NonNull gov.nist.secauto.metaschema.core.model.constraint.ConstraintValidationFinding finding)
      Specified by:
      handleConstraintValidationFinding in class gov.nist.secauto.metaschema.core.model.validation.AbstractValidationResultProcessor