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
  • Constructor Details

    • ReactiveExtensionAwareEvaluationContextProvider

      public ReactiveExtensionAwareEvaluationContextProvider()
    • ReactiveExtensionAwareEvaluationContextProvider

      public ReactiveExtensionAwareEvaluationContextProvider(org.springframework.beans.factory.ListableBeanFactory beanFactory)
      Create a new ReactiveExtensionAwareEvaluationContextProvider with extensions looked up lazily from the given ListableBeanFactory.
      Parameters:
      beanFactory - the ListableBeanFactory to lookup extensions from.
    • ReactiveExtensionAwareEvaluationContextProvider

      public ReactiveExtensionAwareEvaluationContextProvider(Collection<? extends ExtensionIdAware> extensions)
      Parameters:
      extensions - must not be null.
  • Method Details

    • getEvaluationContext

      public org.springframework.expression.EvaluationContext getEvaluationContext(Object rootObject)
      Description copied from interface: EvaluationContextProvider
      Return a EvaluationContext built using the given parameter values.
      Specified by:
      getEvaluationContext in interface EvaluationContextProvider
      Parameters:
      rootObject - the root object to set in the EvaluationContext.
      Returns:
    • getEvaluationContext

      public org.springframework.expression.EvaluationContext getEvaluationContext(Object rootObject, ExpressionDependencies dependencies)
      Description copied from interface: EvaluationContextProvider
      Return a tailored EvaluationContext built using the given parameter values and considering expression dependencies. The returned EvaluationContext may contain a reduced visibility of methods and properties/fields according to the required expression dependencies.
      Specified by:
      getEvaluationContext in interface EvaluationContextProvider
      Parameters:
      rootObject - the root object to set in the EvaluationContext.
      dependencies - the requested expression dependencies to be available.
      Returns:
    • getEvaluationContextLater

      public reactor.core.publisher.Mono<org.springframework.expression.spel.support.StandardEvaluationContext> getEvaluationContextLater(Object rootObject)
      Description copied from interface: ReactiveEvaluationContextProvider
      Return a EvaluationContext built using the given parameter values.
      Specified by:
      getEvaluationContextLater in interface ReactiveEvaluationContextProvider
      Parameters:
      rootObject - the root object to set in the EvaluationContext.
      Returns:
      a mono that emits exactly one EvaluationContext.
    • getEvaluationContextLater

      public reactor.core.publisher.Mono<org.springframework.expression.spel.support.StandardEvaluationContext> getEvaluationContextLater(Object rootObject, ExpressionDependencies dependencies)
      Description copied from interface: ReactiveEvaluationContextProvider
      Return a tailored EvaluationContext built using the given parameter values and considering expression dependencies. The returned EvaluationContext may contain a reduced visibility of methods and properties/fields according to the required expression dependencies.
      Specified by:
      getEvaluationContextLater in interface ReactiveEvaluationContextProvider
      Parameters:
      rootObject - the root object to set in the EvaluationContext.
      dependencies - the requested expression dependencies to be available.
      Returns:
      a mono that emits exactly one EvaluationContext.