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 Summary
Modifier and Type Method Description void
addBucketPathValidationError(java.lang.String error)
Add a validation error about thebuckets_path
.void
addValidationError(java.lang.String error)
Add a validation error to this context.static PipelineAggregationBuilder.ValidationContext
forInsideTree(AggregationBuilder parent, ActionRequestValidationException validationFailuresSoFar)
Build the context for a node inside the aggregation tree.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.abstract java.util.Collection<AggregationBuilder>
getSiblingAggregations()
Aggregations that are siblings to the aggregation being validated.abstract java.util.Collection<PipelineAggregationBuilder>
getSiblingPipelineAggregations()
Pipeline aggregations that are siblings to the aggregation being validated.ActionRequestValidationException
getValidationException()
The validation exception, if there is one.abstract void
validateHasParent(java.lang.String type, java.lang.String name)
Validates that there is a parent aggregation.abstract void
validateParentAggSequentiallyOrdered(java.lang.String type, java.lang.String name)
Validates that the parent is sequentially ordered.
-
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
Aggregations that are siblings to the aggregation being validated. -
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 thebuckets_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
The validation exception, if there is one. It'll benull
if the context wasn't provided with any exception on creation and none were added.
-