Package org.springframework.beans.factory.config

Examples of org.springframework.beans.factory.config.BeanExpressionContext


        addKieBaseModels(beanFactory, kieModuleModel);
        return kieModuleModel;
    }

    private void addKieBaseModels(ConfigurableListableBeanFactory beanFactory, KieModuleModelImpl kieModuleModel) {
        BeanExpressionContext context = new BeanExpressionContext(beanFactory, null);
        for (String beanDef : beanFactory.getBeanDefinitionNames()){
            BeanDefinition beanDefinition = beanFactory.getBeanDefinition(beanDef);
            if ( beanDefinition.getBeanClassName() != null && beanDefinition.getBeanClassName().equalsIgnoreCase(KBaseFactoryBean.class.getName())){
                KieBaseModelImpl kBase = new KieBaseModelImpl();
                kBase.setKModule(kieModuleModel);
View Full Code Here


  @Override
  public void setBeanFactory(BeanFactory beanFactory) {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      this.beanFactory = (ConfigurableBeanFactory) beanFactory;
      this.expressionContext = new BeanExpressionContext(this.beanFactory, new RequestScope());
    }
  }
View Full Code Here

   * and #{...} SpEL expressions in default values, or {@code null} if default
   * values are not expected to contain expressions
   */
  public AbstractNamedValueMethodArgumentResolver(ConfigurableBeanFactory beanFactory) {
    this.configurableBeanFactory = beanFactory;
    this.expressionContext = (beanFactory != null ? new BeanExpressionContext(beanFactory, new RequestScope()) : null);
  }
View Full Code Here

  @Override
  public void setBeanFactory(BeanFactory beanFactory) {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      this.beanFactory = (ConfigurableBeanFactory) beanFactory;
      this.expressionContext = new BeanExpressionContext(this.beanFactory, new RequestScope());
    }
  }
View Full Code Here

  protected Object evaluateBeanDefinitionString(String value, BeanDefinition beanDefinition) {
    if (this.beanExpressionResolver == null) {
      return value;
    }
    Scope scope = (beanDefinition != null ? getRegisteredScope(beanDefinition.getScope()) : null);
    return this.beanExpressionResolver.evaluate(value, new BeanExpressionContext(this, scope));
  }
View Full Code Here

   * values are not expected to contain expressions
   */
  protected AbstractNamedValueMethodArgumentResolver(ConversionService cs, ConfigurableBeanFactory beanFactory) {
    this.conversionService = (cs != null ? cs : new DefaultConversionService());
    this.configurableBeanFactory = beanFactory;
    this.expressionContext = (beanFactory != null ? new BeanExpressionContext(beanFactory, null) : null);
  }
View Full Code Here

  }

  public void setBeanFactory(BeanFactory beanFactory) {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      this.beanFactory = (ConfigurableBeanFactory) beanFactory;
      this.expressionContext = new BeanExpressionContext(this.beanFactory, new RequestScope());
    }
  }
View Full Code Here

  protected Object evaluateBeanDefinitionString(String value, BeanDefinition beanDefinition) {
    if (this.beanExpressionResolver == null) {
      return value;
    }
    Scope scope = getRegisteredScope(beanDefinition.getScope());
    return this.beanExpressionResolver.evaluate(value, new BeanExpressionContext(this, scope));
  }
View Full Code Here

  }

  public void setBeanFactory(BeanFactory beanFactory) {
    if (beanFactory instanceof ConfigurableBeanFactory) {
      this.beanFactory = (ConfigurableBeanFactory) beanFactory;
      this.expressionContext = new BeanExpressionContext(this.beanFactory, new RequestScope());
    }
  }
View Full Code Here

  protected Object evaluateBeanDefinitionString(String value, BeanDefinition beanDefinition) {
    if (this.beanExpressionResolver == null) {
      return value;
    }
    Scope scope = (beanDefinition != null ? getRegisteredScope(beanDefinition.getScope()) : null);
    return this.beanExpressionResolver.evaluate(value, new BeanExpressionContext(this, scope));
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.config.BeanExpressionContext

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.