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 Summary
Modifier and TypeMethodDescriptionprotected void
handleConstraintValidationFinding
(gov.nist.secauto.metaschema.core.model.constraint.ConstraintValidationFinding finding) protected void
handleJsonValidationFinding
(gov.nist.secauto.metaschema.core.model.validation.JsonSchemaContentValidator.JsonValidationFinding finding) protected void
handleXmlValidationFinding
(gov.nist.secauto.metaschema.core.model.validation.XmlSchemaContentValidator.XmlValidationFinding finding) static LoggingValidationHandler
instance()
Get a singleton instance of the logging validation handler.static LoggingValidationHandler
instance
(boolean logExceptions) Get a singleton instance of the logging validation handler.boolean
Determine if exceptions should be logged.Methods inherited from class gov.nist.secauto.metaschema.core.model.validation.AbstractValidationResultProcessor
handleResults, handleValidationFindings
-
Method Details
-
instance
Get a singleton instance of the logging validation handler.This instance will not log exceptions.
- Returns:
- the instance
-
instance
Get a singleton instance of the logging validation handler.- Parameters:
logExceptions
-true
if this instance will log exceptions orfalse
otherwise- Returns:
- the instance
-
isLogExceptions
Determine if exceptions should be logged.- Returns:
true
if exceptions are logged orfalse
otherwise
-
handleJsonValidationFinding
protected void handleJsonValidationFinding(@NonNull gov.nist.secauto.metaschema.core.model.validation.JsonSchemaContentValidator.JsonValidationFinding finding) - Specified by:
handleJsonValidationFinding
in classgov.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 classgov.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 classgov.nist.secauto.metaschema.core.model.validation.AbstractValidationResultProcessor
-