Class ExecutionContext


  • public class ExecutionContext
    extends Object
    Stores the execution context for the validation run.
    • Constructor Detail

      • ExecutionContext

        public ExecutionContext()
        Creates an execution context.
      • ExecutionContext

        public ExecutionContext​(CollectorContext collectorContext)
        Creates an execution context.
        Parameters:
        collectorContext - the collector context
      • ExecutionContext

        public ExecutionContext​(ExecutionConfig executionConfig)
        Creates an execution context.
        Parameters:
        executionConfig - the execution configuration
      • ExecutionContext

        public ExecutionContext​(ExecutionConfig executionConfig,
                                CollectorContext collectorContext)
        Creates an execution context.
        Parameters:
        executionConfig - the execution configuration
        collectorContext - the collector context
    • Method Detail

      • getCollectorContext

        public CollectorContext getCollectorContext()
        Gets the collector context.
        Returns:
        the collector context
      • setCollectorContext

        public void setCollectorContext​(CollectorContext collectorContext)
        Sets the collector context.
        Parameters:
        collectorContext - the collector context
      • getExecutionConfig

        public ExecutionConfig getExecutionConfig()
        Gets the execution configuration.
        Returns:
        the execution configuration
      • setExecutionConfig

        public void setExecutionConfig​(ExecutionConfig executionConfig)
        Sets the execution configuration.
        Parameters:
        executionConfig - the execution configuration
      • 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
      • leaveDiscriminatorContextImmediately

        public void leaveDiscriminatorContextImmediately​(JsonNodePath instanceLocation)