Package com.networknt.schema
Class ExecutionContext
java.lang.Object
com.networknt.schema.ExecutionContext
Stores the execution context for the validation run.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an execution context.ExecutionContext(CollectorContext collectorContext) Creates an execution context.ExecutionContext(ExecutionConfig executionConfig) Creates an execution context.ExecutionContext(ExecutionConfig executionConfig, CollectorContext collectorContext) Creates an execution context. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidevaluationPathAddLast(int token) voidevaluationPathAddLast(String token) voidvoidexecutionConfig(Consumer<ExecutionConfig.Builder> customizer) Customize the execution configuration.Gets the collector context.Gets the execution configuration.Gets the walk configuration.booleanDetermines if the validator should immediately throw a fail fast exception if an error has occurred.booleanbooleanvoidsetCollectorContext(CollectorContext collectorContext) Sets the collector context.voidvoidsetExecutionConfig(ExecutionConfig executionConfig) Sets the execution configuration.voidsetFailFast(boolean failFast) Sets if the validator should immediately throw a fail fast exception if an error has occurred.voidsetUnevaluatedItemsPresent(boolean set) voidsetUnevaluatedPropertiesPresent(boolean set) voidsetWalkConfig(WalkConfig walkConfig) Sets the walk configuration.voidwalkConfig(Consumer<WalkConfig.Builder> customizer) Customize the walk configuration.
-
Constructor Details
-
ExecutionContext
public ExecutionContext()Creates an execution context. -
ExecutionContext
Creates an execution context.- Parameters:
collectorContext- the collector context
-
ExecutionContext
Creates an execution context.- Parameters:
executionConfig- the execution configuration
-
ExecutionContext
Creates an execution context.- Parameters:
executionConfig- the execution configurationcollectorContext- the collector context
-
-
Method Details
-
getEvaluationPath
-
evaluationPathAddLast
-
evaluationPathAddLast
public void evaluationPathAddLast(int token) -
evaluationPathRemoveLast
public void evaluationPathRemoveLast() -
getEvaluationSchema
-
getEvaluationSchemaPath
-
getDiscriminatorMapping
-
setWalkConfig
Sets the walk configuration.- Parameters:
walkConfig- the walk configuration
-
getWalkConfig
Gets the walk configuration.- Returns:
- the walk configuration
-
getCollectorContext
Gets the collector context.- Returns:
- the collector context
-
setCollectorContext
Sets the collector context.- Parameters:
collectorContext- the collector context
-
getExecutionConfig
Gets the execution configuration.- Returns:
- the execution configuration
-
setExecutionConfig
Sets the execution configuration.- Parameters:
executionConfig- the execution configuration
-
getAnnotations
-
isFailFast
public boolean isFailFast()Determines if the validator should immediately throw a fail fast exception if an error has occurred.This defaults to the execution config fail fast at the start of the execution.
- Returns:
- true if fail fast
-
setFailFast
public void setFailFast(boolean failFast) Sets if the validator should immediately throw a fail fast exception if an error has occurred.- Parameters:
failFast- true to fail fast
-
getErrors
-
addError
-
setErrors
-
executionConfig
Customize the execution configuration.- Parameters:
customizer- the customizer
-
walkConfig
Customize the walk configuration.- Parameters:
customizer- the customizer
-
isUnevaluatedPropertiesPresent
public boolean isUnevaluatedPropertiesPresent() -
isUnevaluatedItemsPresent
public boolean isUnevaluatedItemsPresent() -
setUnevaluatedPropertiesPresent
public void setUnevaluatedPropertiesPresent(boolean set) -
setUnevaluatedItemsPresent
public void setUnevaluatedItemsPresent(boolean set)
-