Package com.networknt.schema
Interface OutputFormat<T>
-
- Type Parameters:
T- the result type
- All Known Implementing Classes:
OutputFormat.Boolean,OutputFormat.Default,OutputFormat.Flag
public interface OutputFormat<T>Formats the validation results.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classOutputFormat.BooleanThe Boolean output format.static classOutputFormat.DefaultThe Default output format.static classOutputFormat.FlagThe Flag output format.static classOutputFormat.FlagOutputThe Flag output results.
-
Field Summary
Fields Modifier and Type Field Description static OutputFormat.FlagBOOLEANThe Boolean output format.static OutputFormat.DefaultDEFAULTThe Default output format.static OutputFormat.FlagFLAGThe Flag output format.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidcustomize(ExecutionContext executionContext, ValidationContext validationContext)Customize the execution context before validation.Tformat(Set<ValidationMessage> validationMessages, ExecutionContext executionContext, ValidationContext validationContext)Formats the validation results.
-
-
-
Field Detail
-
DEFAULT
static final OutputFormat.Default DEFAULT
The Default output format.
-
BOOLEAN
static final OutputFormat.Flag BOOLEAN
The Boolean output format.
-
FLAG
static final OutputFormat.Flag FLAG
The Flag output format.
-
-
Method Detail
-
customize
default void customize(ExecutionContext executionContext, ValidationContext validationContext)
Customize the execution context before validation.The validation context should only be used for reference as it is shared.
- Parameters:
executionContext- the execution contextvalidationContext- the validation context for reference
-
format
T format(Set<ValidationMessage> validationMessages, ExecutionContext executionContext, ValidationContext validationContext)
Formats the validation results.- Parameters:
validationMessages-executionContext-- Returns:
- the result
-
-