Package org.springframework.data.spel
Class ReactiveExtensionAwareEvaluationContextProvider
java.lang.Object
org.springframework.data.spel.ReactiveExtensionAwareEvaluationContextProvider
- All Implemented Interfaces:
EvaluationContextProvider
,ReactiveEvaluationContextProvider
public class ReactiveExtensionAwareEvaluationContextProvider
extends Object
implements ReactiveEvaluationContextProvider
A reactive
EvaluationContextProvider
that assembles an EvaluationContext
from a list of
ReactiveEvaluationContextExtension
and EvaluationContextExtension
instances.- Since:
- 2.4
- Author:
- Mark Paluch
-
Field Summary
Fields inherited from interface org.springframework.data.spel.EvaluationContextProvider
DEFAULT
-
Constructor Summary
ConstructorDescriptionReactiveExtensionAwareEvaluationContextProvider
(Collection<? extends ExtensionIdAware> extensions) Creates a newReactiveExtensionAwareEvaluationContextProvider
for the givenEvaluationContextExtension
s.Create a newReactiveExtensionAwareEvaluationContextProvider
with extensions looked up lazily from the givenListableBeanFactory
. -
Method Summary
Modifier and TypeMethodDescriptiongetEvaluationContext
(Object rootObject) Return aEvaluationContext
built using the given parameter values.getEvaluationContext
(Object rootObject, ExpressionDependencies dependencies) Return a tailoredEvaluationContext
built using the given parameter values and consideringexpression dependencies
.reactor.core.publisher.Mono<StandardEvaluationContext>
getEvaluationContextLater
(Object rootObject) Return aEvaluationContext
built using the given parameter values.reactor.core.publisher.Mono<StandardEvaluationContext>
getEvaluationContextLater
(Object rootObject, ExpressionDependencies dependencies) Return a tailoredEvaluationContext
built using the given parameter values and consideringexpression dependencies
.
-
Constructor Details
-
ReactiveExtensionAwareEvaluationContextProvider
public ReactiveExtensionAwareEvaluationContextProvider() -
ReactiveExtensionAwareEvaluationContextProvider
Create a newReactiveExtensionAwareEvaluationContextProvider
with extensions looked up lazily from the givenListableBeanFactory
.- Parameters:
beanFactory
- theListableBeanFactory
to lookup extensions from.
-
ReactiveExtensionAwareEvaluationContextProvider
public ReactiveExtensionAwareEvaluationContextProvider(Collection<? extends ExtensionIdAware> extensions) Creates a newReactiveExtensionAwareEvaluationContextProvider
for the givenEvaluationContextExtension
s.- Parameters:
extensions
- must not be null.
-
-
Method Details
-
getEvaluationContext
Description copied from interface:EvaluationContextProvider
Return aEvaluationContext
built using the given parameter values.- Specified by:
getEvaluationContext
in interfaceEvaluationContextProvider
- Parameters:
rootObject
- the root object to set in theEvaluationContext
.- Returns:
-
getEvaluationContext
public EvaluationContext getEvaluationContext(Object rootObject, ExpressionDependencies dependencies) Description copied from interface:EvaluationContextProvider
Return a tailoredEvaluationContext
built using the given parameter values and consideringexpression dependencies
. The returnedEvaluationContext
may contain a reduced visibility of methods and properties/fields according to the requiredexpression dependencies
.- Specified by:
getEvaluationContext
in interfaceEvaluationContextProvider
- Parameters:
rootObject
- the root object to set in theEvaluationContext
.dependencies
- the requested expression dependencies to be available.- Returns:
-
getEvaluationContextLater
public reactor.core.publisher.Mono<StandardEvaluationContext> getEvaluationContextLater(@Nullable Object rootObject) Description copied from interface:ReactiveEvaluationContextProvider
Return aEvaluationContext
built using the given parameter values.- Specified by:
getEvaluationContextLater
in interfaceReactiveEvaluationContextProvider
- Parameters:
rootObject
- the root object to set in theEvaluationContext
.- Returns:
- a mono that emits exactly one
EvaluationContext
.
-
getEvaluationContextLater
public reactor.core.publisher.Mono<StandardEvaluationContext> getEvaluationContextLater(@Nullable Object rootObject, ExpressionDependencies dependencies) Description copied from interface:ReactiveEvaluationContextProvider
Return a tailoredEvaluationContext
built using the given parameter values and consideringexpression dependencies
. The returnedEvaluationContext
may contain a reduced visibility of methods and properties/fields according to the requiredexpression dependencies
.- Specified by:
getEvaluationContextLater
in interfaceReactiveEvaluationContextProvider
- Parameters:
rootObject
- the root object to set in theEvaluationContext
.dependencies
- the requested expression dependencies to be available.- Returns:
- a mono that emits exactly one
EvaluationContext
.
-