Interface IndexBindingContext
-
- All Known Subinterfaces:
IndexedEmbeddedBindingContext
,IndexedEntityBindingContext
public interface IndexBindingContext
The binding context associated to a specific node in the entity tree.The context includes in particular
the corresponding node in the index schema tree
.Provides entry points to add fields to the index schema and to generate new contexts for indexed-embeddeds.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<IndexedEmbeddedBindingContext>
addIndexedEmbeddedIfIncluded(IndexedEmbeddedDefinition definition, boolean multiValued)
default IndexFieldTypeFactory
createTypeFactory()
IndexFieldTypeFactory
createTypeFactory(IndexFieldTypeDefaultsProvider defaultsProvider)
Use this method to provide some defaults to the current request.IndexSchemaElement
schemaElement()
IndexSchemaElement
schemaElement(IndexSchemaContributionListener listener)
-
-
-
Method Detail
-
createTypeFactory
default IndexFieldTypeFactory createTypeFactory()
- Returns:
- The type factory of the bound index, allowing to create field types.
-
createTypeFactory
IndexFieldTypeFactory createTypeFactory(IndexFieldTypeDefaultsProvider defaultsProvider)
Use this method to provide some defaults to the current request.IndexFieldTypeDefaultsProvider
instance will be overridden by a subsequent request.- Parameters:
defaultsProvider
- The defaults to apply- Returns:
- The type factory of the bound index, allowing to create field types.
-
schemaElement
IndexSchemaElement schemaElement()
- Returns:
- The element in the index schema that this context points to.
-
schemaElement
IndexSchemaElement schemaElement(IndexSchemaContributionListener listener)
- Parameters:
listener
- A listener to notify when operations are executed on the returned schema element.- Returns:
- The element in the index schema that this context points to, with a wrapper that ensures the given listener will be called when operations are executed on the schema element.
-
addIndexedEmbeddedIfIncluded
Optional<IndexedEmbeddedBindingContext> addIndexedEmbeddedIfIncluded(IndexedEmbeddedDefinition definition, boolean multiValued)
- Parameters:
definition
- The indexed-embedded definition.multiValued
- Whether the property with an indexed-embedded is to be considered as multi-valued (i.e. multiple indexed-embedded objects may be processed for a single "embedding" object).- Returns:
- A new indexed-embedded binding context, or
Optional.empty()
.
-
-