Package com.networknt.schema
Class ExecutionConfig
- java.lang.Object
-
- com.networknt.schema.ExecutionConfig
-
public class ExecutionConfig extends Object
Configuration per execution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExecutionConfig.BuilderBuilder forExecutionConfig.static classExecutionConfig.BuilderSupport<T>Builder forExecutionConfig.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExecutionConfig.Builderbuilder()static ExecutionConfig.Builderbuilder(ExecutionConfig config)Predicate<String>getAnnotationCollectionFilter()Gets the predicate to determine if annotation collection is allowed for a particular keyword.BooleangetFormatAssertionsEnabled()Gets the format assertion enabled flag.static ExecutionConfiggetInstance()LocalegetLocale()Gets the locale to use for formatting messages.BooleangetReadOnly()Returns the value of the read only flag.BooleangetWriteOnly()Returns the value of the write only flag.booleanisAnnotationCollectionEnabled()Return if annotation collection is enabled.booleanisFailFast()Return if fast fail is enabled.
-
-
-
Method Detail
-
getInstance
public static ExecutionConfig getInstance()
-
getLocale
public Locale getLocale()
Gets the locale to use for formatting messages.- Returns:
- the locale
-
getFormatAssertionsEnabled
public Boolean getFormatAssertionsEnabled()
Gets the format assertion enabled flag.This defaults to null meaning that it will follow the defaults of the specification.
Since draft 2019-09 this will default to false unless enabled by using the $vocabulary keyword.
- Returns:
- the format assertions enabled flag
-
isFailFast
public boolean isFailFast()
Return if fast fail is enabled.- Returns:
- if fast fail is enabled
-
isAnnotationCollectionEnabled
public boolean isAnnotationCollectionEnabled()
Return if annotation collection is enabled.This does not affect annotation collection required for evaluating keywords such as unevaluatedItems or unevaluatedProperties and only affects reporting.
The annotations to collect can be customized using the annotation collection predicate.
- Returns:
- if annotation collection is enabled
-
getAnnotationCollectionFilter
public Predicate<String> getAnnotationCollectionFilter()
Gets the predicate to determine if annotation collection is allowed for a particular keyword. This only has an effect if annotation collection is enabled.The default value is to not collect any annotation keywords if annotation collection is enabled.
This does not affect annotation collection required for evaluating keywords such as unevaluatedItems or unevaluatedProperties and only affects reporting.
- Returns:
- the predicate to determine if annotation collection is allowed for the keyword
-
getReadOnly
public Boolean getReadOnly()
Returns the value of the read only flag.- Returns:
- the value of read only flag or null if not set
-
getWriteOnly
public Boolean getWriteOnly()
Returns the value of the write only flag.- Returns:
- the value of the write only flag or null if not set
-
builder
public static ExecutionConfig.Builder builder()
-
builder
public static ExecutionConfig.Builder builder(ExecutionConfig config)
-
-