Class PipelineAggregationBuilder.ValidationContext

java.lang.Object
org.elasticsearch.search.aggregations.PipelineAggregationBuilder.ValidationContext
Enclosing class:
PipelineAggregationBuilder

public abstract static class PipelineAggregationBuilder.ValidationContext
extends java.lang.Object
  • Method Details

    • forTreeRoot

      public static PipelineAggregationBuilder.ValidationContext forTreeRoot​(java.util.Collection<AggregationBuilder> siblingAggregations, java.util.Collection<PipelineAggregationBuilder> siblingPipelineAggregations, ActionRequestValidationException validationFailuresSoFar)
      Build the context for the root of the aggregation tree.
    • forInsideTree

      public static PipelineAggregationBuilder.ValidationContext forInsideTree​(AggregationBuilder parent, ActionRequestValidationException validationFailuresSoFar)
      Build the context for a node inside the aggregation tree.
    • getSiblingAggregations

      public abstract java.util.Collection<AggregationBuilder> getSiblingAggregations()
      Aggregations that are siblings to the aggregation being validated.
    • getSiblingPipelineAggregations

      public abstract java.util.Collection<PipelineAggregationBuilder> getSiblingPipelineAggregations()
      Pipeline aggregations that are siblings to the aggregation being validated.
    • addValidationError

      public void addValidationError​(java.lang.String error)
      Add a validation error to this context. All validation errors are accumulated in a list and, if there are any, the request is not executed and the entire list is returned as the error response.
    • addBucketPathValidationError

      public void addBucketPathValidationError​(java.lang.String error)
      Add a validation error about the buckets_path.
    • validateHasParent

      public abstract void validateHasParent​(java.lang.String type, java.lang.String name)
      Validates that there is a parent aggregation.
    • validateParentAggSequentiallyOrdered

      public abstract void validateParentAggSequentiallyOrdered​(java.lang.String type, java.lang.String name)
      Validates that the parent is sequentially ordered.
    • getValidationException

      public ActionRequestValidationException getValidationException()
      The validation exception, if there is one. It'll be null if the context wasn't provided with any exception on creation and none were added.