Examples of StandardEvaluationContext


Examples of org.springframework.expression.spel.support.StandardEvaluationContext

     * @param invocation the invocation (filter, method, channel)
     * @return the context object for use in evaluating the expression, populated with a suitable root object.
     */
    public final EvaluationContext createEvaluationContext(Authentication authentication, T invocation) {
        SecurityExpressionOperations root = createSecurityExpressionRoot(authentication, invocation);
        StandardEvaluationContext ctx = createEvaluationContextInternal(authentication, invocation);
        ctx.setBeanResolver(br);
        ctx.setRootObject(root);

        return ctx;
    }
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

     * @param authentication the current authentication object
     * @param invocation the invocation (filter, method, channel)
     * @return A {@code StandardEvaluationContext} or potentially a custom subclass if overridden.
     */
    protected StandardEvaluationContext createEvaluationContextInternal(Authentication authentication, T invocation) {
        return new StandardEvaluationContext();
    }
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

    @Before
    public void createContext() {
        user = mock(Authentication.class);
        root = new MethodSecurityExpressionRoot(user);
        ctx = new StandardEvaluationContext();
        ctx.setRootObject(root);
        trustResolver = mock(AuthenticationTrustResolver.class);
        root.setTrustResolver(trustResolver);
    }
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

     * Subclasses can override this methode if they want to use a different EL root context
     *
     * @return EL root context which is used to evaluate the expression
     */
    public EvaluationContext createELContext(HttpServletRequest request) {
        return new StandardEvaluationContext(new ELRequestMatcherContext(request));
    }
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

                    (EvaluationContext) processingContext.getContext().getVariables().
                            get(ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME);

            if (baseEvaluationContext == null) {
                // Using a standard one as base: we are losing bean resolution and conversion service!!
                baseEvaluationContext = new StandardEvaluationContext();
            }

            final ThymeleafEvaluationContextWrapper evaluationContext =
                    new ThymeleafEvaluationContextWrapper(baseEvaluationContext, contextVariables);
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

                    (EvaluationContext) processingContext.getContext().getVariables().
                            get(ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME);

            if (baseEvaluationContext == null) {
                // Using a standard one as base: we are losing bean resolution and conversion service!!
                baseEvaluationContext = new StandardEvaluationContext();
            }

            final ThymeleafEvaluationContextWrapper evaluationContext =
                    new ThymeleafEvaluationContextWrapper(baseEvaluationContext, contextVariables);
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

   * @param conversionService the conversion service.
   * @return the evaluation context.
   */
  private static StandardEvaluationContext createStandardEvaluationContext(ConversionService conversionService,
      BeanFactory beanFactory) {
    StandardEvaluationContext evaluationContext = new StandardEvaluationContext();
    evaluationContext.addPropertyAccessor(new MapAccessor());
    if (conversionService != null) {
      evaluationContext.setTypeConverter(new StandardTypeConverter(conversionService));
    }
    if (beanFactory != null) {
      evaluationContext.setBeanResolver(new BeanFactoryResolver(beanFactory));
    }
    return evaluationContext;
  }
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

    return doCreateContext(beanFactory);
  }

  private static StandardEvaluationContext doCreateContext(BeanFactory beanFactory) {
    ConversionService conversionService = null;
    StandardEvaluationContext evaluationContext = null;
    if (beanFactory != null) {
      evaluationContext = YarnContextUtils.getEvaluationContext(beanFactory);
    }
    if (evaluationContext == null) {
      if (beanFactory != null) {
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

  public final Object getValue(ExpressionState expressionState) throws EvaluationException {
    if (expressionState != null) {
      return getValueInternal(expressionState).getValue();
    } else {
      // configuration not set - does that matter?
      return getValue(new ExpressionState(new StandardEvaluationContext()));
    }
  }
View Full Code Here

Examples of org.springframework.expression.spel.support.StandardEvaluationContext

  public final TypedValue getTypedValue(ExpressionState expressionState) throws EvaluationException {
    if (expressionState != null) {
      return getValueInternal(expressionState);
    } else {
      // configuration not set - does that matter?
      return getTypedValue(new ExpressionState(new StandardEvaluationContext()));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.