Package org.springframework.context.expression

Examples of org.springframework.context.expression.BeanFactoryResolver


    if (accessor != null) {
      evaluationContext.addPropertyAccessor(accessor);
    }

    if (factory != null) {
      evaluationContext.setBeanResolver(new BeanFactoryResolver(factory));
    }

    return evaluationContext;
  }
View Full Code Here


      Object[] parameterValues) {

    StandardEvaluationContext ec = new StandardEvaluationContext();

    if (beanFactory != null) {
      ec.setBeanResolver(new BeanFactoryResolver(beanFactory));
    }

    ExtensionAwarePropertyAccessor accessor = new ExtensionAwarePropertyAccessor(getExtensions());

    ec.addPropertyAccessor(accessor);
View Full Code Here

         StandardEvaluationContext sec = new StandardEvaluationContext();
         sec.setRootObject(beanEvaluationContext);
         sec.addPropertyAccessor(new BeanExpressionContextAccessor());
         sec.addPropertyAccessor(new BeanFactoryAccessor());
         sec.addPropertyAccessor(new MapAccessor());
         sec.setBeanResolver(new BeanFactoryResolver(beanEvaluationContext.getBeanFactory()));
         sec.setTypeLocator(new StandardTypeLocator(beanEvaluationContext.getBeanFactory().getBeanClassLoader()));
         ConversionService conversionService = beanEvaluationContext.getBeanFactory().getConversionService();
         if (conversionService != null) {
            sec.setTypeConverter(new StandardTypeConverter(conversionService));
         }
View Full Code Here

   * @throws BeansException if setting the application context did go wrong.
   */
  @Override
  public void setApplicationContext(final ApplicationContext applicationContext) throws BeansException {
    context.addPropertyAccessor(new BeanFactoryAccessor());
    context.setBeanResolver(new BeanFactoryResolver(applicationContext));
    context.setRootObject(applicationContext);
  }
View Full Code Here

    public void setPermissionEvaluator(PermissionEvaluator permissionEvaluator) {
        this.permissionEvaluator = permissionEvaluator;
    }

    public void setApplicationContext(ApplicationContext applicationContext) {
        br = new BeanFactoryResolver(applicationContext);
    }
View Full Code Here

        super();

        Validate.notNull(beanFactory, "Bean factory cannot be null");
        // ConversionService CAN be null

        this.setBeanResolver(new BeanFactoryResolver(beanFactory));
        if (conversionService != null) {
            this.setTypeConverter(new StandardTypeConverter(conversionService));
        }

        this.addPropertyAccessor(VariablesMapPropertyAccessor.INSTANCE);
View Full Code Here

        super();

        Validate.notNull(beanFactory, "Bean factory cannot be null");
        // ConversionService CAN be null

        this.setBeanResolver(new BeanFactoryResolver(beanFactory));
        if (conversionService != null) {
            this.setTypeConverter(new StandardTypeConverter(conversionService));
        }

        this.addPropertyAccessor(VariablesMapPropertyAccessor.INSTANCE);
View Full Code Here

  public void setBeanFactory(final BeanFactory beanFactory) {
    if (beanFactory != null) {
      this.beanFactory = beanFactory;
      this.typeConverter.setBeanFactory(beanFactory);
      if (this.evaluationContext != null && this.evaluationContext.getBeanResolver() == null) {
        this.evaluationContext.setBeanResolver(new BeanFactoryResolver(beanFactory));
      }
    }
  }
View Full Code Here

    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

  private EvaluationContext createEvaluationContext(PageContext pageContext) {
    StandardEvaluationContext context = new StandardEvaluationContext();
    context.addPropertyAccessor(new JspPropertyAccessor(pageContext));
    context.addPropertyAccessor(new MapAccessor());
    context.addPropertyAccessor(new EnvironmentAccessor());
    context.setBeanResolver(new BeanFactoryResolver(getRequestContext().getWebApplicationContext()));
    ConversionService conversionService = getConversionService(pageContext);
    if (conversionService != null) {
      context.setTypeConverter(new StandardTypeConverter(conversionService));
    }
    return context;
View Full Code Here

TOP

Related Classes of org.springframework.context.expression.BeanFactoryResolver

Copyright © 2018 www.massapicom. 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.