Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanFactory.containsBean()


        return requestContext.getFlowScope().get(property);
      } else if (requestContext.getConversationScope().contains(property)) {
        return requestContext.getConversationScope().get(property);
      }
      BeanFactory bf = getBeanFactory(requestContext);
      if (bf.containsBean(property)) {
        return bf.getBean(property);
      }
      return delegate.getProperty(context, target, name);
    }
View Full Code Here


  private Object getModelValidator() {
    BeanFactory beanFactory = requestContext.getActiveFlow().getApplicationContext();
    if (beanFactory != null && StringUtils.hasText(modelName)) {
      String validatorName = modelName + "Validator";
      if (beanFactory.containsBean(validatorName)) {
        return beanFactory.getBean(validatorName);
      }
    }
    return null;
  }
View Full Code Here

  /**
   * Resolve the attribute as a Spring bean in the ApplicationContext.
   */
  protected Object resolveSpringBean(FacesContext facesContext, String name) {
    BeanFactory bf = getBeanFactory(facesContext);
    if (bf.containsBean(name)) {
      if (logger.isTraceEnabled()) {
        logger.trace("Successfully resolved variable '" + name + "' in Spring BeanFactory");
      }
      return bf.getBean(name);
    }
View Full Code Here

    if (containsSingleton(beanName) || containsBeanDefinition(beanName)) {
      return (!BeanFactoryUtils.isFactoryDereference(name) || isFactoryBean(name));
    }
    // Not found -> check parent.
    BeanFactory parentBeanFactory = getParentBeanFactory();
    return (parentBeanFactory != null && parentBeanFactory.containsBean(originalBeanName(name)));
  }

  public boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
    String beanName = transformedBeanName(name);
View Full Code Here

                }

                //
                // Check absolute ID first, then relative ID for a match
                //
                if (fullID != null && beanFactory.containsBean(fullID))
                    bean = (T)beanFactory.getBean(fullID, beanClass);
                else if (beanFactory.containsBean(id))
                    bean = (T)beanFactory.getBean(id, beanClass);
            }
View Full Code Here

                //
                // Check absolute ID first, then relative ID for a match
                //
                if (fullID != null && beanFactory.containsBean(fullID))
                    bean = (T)beanFactory.getBean(fullID, beanClass);
                else if (beanFactory.containsBean(id))
                    bean = (T)beanFactory.getBean(id, beanClass);
            }

            //
            // Look for a match based upon bean class name
View Full Code Here

            //
            // Look for a match based upon bean class name
            //
            String beanClassName = beanClass.getName();
            if (bean == null && beanFactory.containsBean(beanClassName))
                bean = (T)beanFactory.getBean(beanClassName, beanClass);

            if (bean != null)
            {
                //
View Full Code Here

    protected void init()
    throws Exception {
        PipelineComponentInfo parent = null;
        if ( this.beanFactory instanceof HierarchicalBeanFactory ) {
            BeanFactory parentFactory = ((HierarchicalBeanFactory)this.beanFactory).getParentBeanFactory();
            if ( parentFactory != null && parentFactory.containsBean(PipelineComponentInfo.ROLE) ) {
                parent = (PipelineComponentInfo)parentFactory.getBean(PipelineComponentInfo.ROLE);
            }
        }
        this.info = new PipelineComponentInfo(parent);
        if ( this.data != null ) {
View Full Code Here

  /**
   * Resolve the attribute as a Spring bean in the ApplicationContext.
   */
  protected Object resolveSpringBean(FacesContext facesContext, String name) {
    BeanFactory bf = getBeanFactory(facesContext);
    if (bf.containsBean(name)) {
      if (logger.isTraceEnabled()) {
        logger.trace("Successfully resolved variable '" + name + "' in Spring BeanFactory");
      }
      return bf.getBean(name);
    }
View Full Code Here

    if (containsSingleton(beanName) || containsBeanDefinition(beanName)) {
      return (!BeanFactoryUtils.isFactoryDereference(name) || isFactoryBean(name));
    }
    // Not found -> check parent.
    BeanFactory parentBeanFactory = getParentBeanFactory();
    return (parentBeanFactory != null && parentBeanFactory.containsBean(originalBeanName(name)));
  }

  public boolean isSingleton(String name) throws NoSuchBeanDefinitionException {
    String beanName = transformedBeanName(name);
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.