public final class ElasticsearchExtension extends Object implements SearchPredicateFactoryContextExtension<ElasticsearchSearchPredicateFactoryContext>, SearchSortContainerContextExtension<ElasticsearchSearchSortContainerContext>, IndexSchemaFieldContextExtension<ElasticsearchIndexSchemaFieldContext>
WARNING: while this type is API, because instances should be manipulated by users, all of its methods are considered SPIs and therefore should never be called directly by users. In short, users are only expected to get instances of this type from an API and pass it to another API.
Modifier and Type | Method and Description |
---|---|
<C,B> Optional<ElasticsearchSearchPredicateFactoryContext> |
extendOptional(SearchPredicateFactoryContext original,
SearchPredicateBuilderFactory<C,B> factory)
Attempt to extend a given context, returning an empty
Optional in case of failure. |
<C,B> Optional<ElasticsearchSearchSortContainerContext> |
extendOptional(SearchSortContainerContext original,
SearchSortBuilderFactory<C,B> factory,
SearchSortDslContext<? super B> dslContext)
Attempt to extend a given context, returning an empty
Optional in case of failure. |
ElasticsearchIndexSchemaFieldContext |
extendOrFail(IndexSchemaFieldContext original)
Attempt to extend a given context, throwing an exception in case of failure.
|
static ElasticsearchExtension |
get() |
public static ElasticsearchExtension get()
public <C,B> Optional<ElasticsearchSearchPredicateFactoryContext> extendOptional(SearchPredicateFactoryContext original, SearchPredicateBuilderFactory<C,B> factory)
Optional
in case of failure.
WARNING: this method is not API, see comments at the type level.
extendOptional
in interface SearchPredicateFactoryContextExtension<ElasticsearchSearchPredicateFactoryContext>
C
- The type of query element collector for the given DSL context.B
- The implementation type of builders for the given DSL context.original
- The original, non-extended SearchPredicateFactoryContext
.factory
- A SearchPredicateBuilderFactory
.T
) in case
of success, or an empty optional otherwise.public <C,B> Optional<ElasticsearchSearchSortContainerContext> extendOptional(SearchSortContainerContext original, SearchSortBuilderFactory<C,B> factory, SearchSortDslContext<? super B> dslContext)
Optional
in case of failure.
WARNING: this method is not API, see comments at the type level.
extendOptional
in interface SearchSortContainerContextExtension<ElasticsearchSearchSortContainerContext>
C
- The type of query element collector for the given DSL context.B
- The implementation type of builders for the given DSL context.original
- The original, non-extended SearchSortContainerContext
.factory
- A SearchSortBuilderFactory
.dslContext
- A SearchSortDslContext
.T
) in case
of success, or an empty optional otherwise.public ElasticsearchIndexSchemaFieldContext extendOrFail(IndexSchemaFieldContext original)
WARNING: this method is not API, see comments at the type level.
extendOrFail
in interface IndexSchemaFieldContextExtension<ElasticsearchIndexSchemaFieldContext>
original
- The original, non-extended IndexSchemaFieldContext
.T
)Copyright © 2006-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.