Class ExpressionsSupport


  • public class ExpressionsSupport
    extends java.lang.Object
    Provides utility support for SpEL integration Supports registering SpEL functions, ACLs to classes (via allow list)
    • Constructor Detail

      • ExpressionsSupport

        public ExpressionsSupport​(java.lang.Class<?> extraAllowedReturnType,
                                  ExpressionProperties expressionProperties)
      • ExpressionsSupport

        public ExpressionsSupport​(java.lang.Class<?>[] extraAllowedReturnTypes,
                                  java.util.List<com.netflix.spinnaker.kork.api.expressions.ExpressionFunctionProvider> extraExpressionFunctionProviders,
                                  org.pf4j.PluginManager pluginManager,
                                  ExpressionProperties expressionProperties)
    • Method Detail

      • getExpressionFunctionProviders

        public java.util.List<com.netflix.spinnaker.kork.api.expressions.ExpressionFunctionProvider> getExpressionFunctionProviders()
      • buildEvaluationContext

        public org.springframework.expression.spel.support.StandardEvaluationContext buildEvaluationContext​(java.lang.Object rootObject,
                                                                                                            boolean allowUnknownKeys)
        Creates a configured SpEL evaluation context
        Parameters:
        rootObject - the root object to transform
        allowUnknownKeys - flag to control what helper functions are available
        Returns:
        an evaluation context hooked with helper functions and correct ACL via allow list