Package org.springframework.beans.factory.parsing

Examples of org.springframework.beans.factory.parsing.BeanComponentDefinition


                        BeanDefinitionParser parser = parserMap.get(localName);
                        if (parser != null) {
                            BeanDefinition definition = parser.parse(childElement, parserContext);
                            String id = childElement.getAttribute("id");
                            if (ObjectHelper.isNotEmpty(id)) {
                                parserContext.registerComponent(new BeanComponentDefinition(definition, id));
                                // set the templates with the camel context
                                if (localName.equals("template") || localName.equals("consumerTemplate")
                                    || localName.equals("proxy") || localName.equals("export")) {
                                    // set the camel context
                                    definition.getPropertyValues().addPropertyValue("camelContext", new RuntimeBeanReference(contextId));
View Full Code Here


    String mappedInterceptorName = parserContext.getReaderContext().registerWithGeneratedName(mappedCsInterceptorDef);
   
    //
    registerConfigFactory(element, source, parserContext);
   
    parserContext.registerComponent(new BeanComponentDefinition(annMappingDef, annMappingName));
    parserContext.registerComponent(new BeanComponentDefinition(annAdapterDef, annAdapterName));
    parserContext.registerComponent(new BeanComponentDefinition(mappedCsInterceptorDef, mappedInterceptorName));
    parserContext.popAndRegisterContainingComponent();
   
    return null;
  }
View Full Code Here

    else {
      RootBeanDefinition conversionDef = new RootBeanDefinition(FormattingConversionServiceFactoryBean.class);
      conversionDef.setSource(source);
      conversionDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
      String conversionName = parserContext.getReaderContext().registerWithGeneratedName(conversionDef);
      parserContext.registerComponent(new BeanComponentDefinition(conversionDef, conversionName));
      return new RuntimeBeanReference(conversionName);
    }
  }
View Full Code Here

    else if (jsr303Present) {
      RootBeanDefinition validatorDef = new RootBeanDefinition(LocalValidatorFactoryBean.class);
      validatorDef.setSource(source);
      validatorDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
      String validatorName = parserContext.getReaderContext().registerWithGeneratedName(validatorDef);
      parserContext.registerComponent(new BeanComponentDefinition(validatorDef, validatorName));
      return new RuntimeBeanReference(validatorName);
    }
    else {
      return null;
    }
View Full Code Here

      configFactoryDef.setSource(source);
      configFactoryDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
      configFactoryDef.getPropertyValues().add("configParser", configParserDef);
      configFactoryDef.getPropertyValues().add("cache", cache);
      parserContext.getReaderContext().registerWithGeneratedName(configFactoryDef);
      parserContext.registerComponent(new BeanComponentDefinition(configFactoryDef, ConfigFactory.KEY));
    }
  }
View Full Code Here

        // see if we have already auto registered this id
        BeanDefinition existing = autoRegisterMap.get(id);
        if (existing == null) {
            // no then add it to the map and register it
            autoRegisterMap.put(id, definition);
            parserContext.registerComponent(new BeanComponentDefinition(definition, id));
            if (LOG.isDebugEnabled()) {
                LOG.debug("Registered default: " + definition.getBeanClassName() + " with id: " + id + " on camel context: " + contextId);
            }
        } else {
            // ups we have already registered it before with same id, but on another camel context
View Full Code Here

                Method method = definition.getClass().getMethod("setDependsOn", String[].class);
                method.invoke(definition, (Object) new String[]{contextId});
            } catch (Exception e) {
                // Do nothing here
            }
            parserContext.registerBeanComponent(new BeanComponentDefinition(definition, id));
        }
    }
View Full Code Here

                        BeanDefinitionParser parser = parserMap.get(localName);
                        if (parser != null) {
                            BeanDefinition definition = parser.parse(childElement, parserContext);
                            String id = childElement.getAttribute("id");
                            if (ObjectHelper.isNotEmpty(id)) {
                                parserContext.registerComponent(new BeanComponentDefinition(definition, id));
                                // set the templates with the camel context
                                if (localName.equals("template") || localName.equals("consumerTemplate")
                                        || localName.equals("proxy") || localName.equals("export")) {
                                    // set the camel context
                                    definition.getPropertyValues().addPropertyValue("camelContext", new RuntimeBeanReference(contextId));
View Full Code Here

      }
    }
   
    // Register the original bean definition as it will be referenced by the scoped proxy and is relevant for tooling (validation, navigation).
    String targetBeanName = ScopedProxyUtils.getTargetBeanName(definition.getBeanName());
    parserContext.getReaderContext().fireComponentRegistered(new BeanComponentDefinition(definition.getBeanDefinition(), targetBeanName));
   
    return ScopedProxyUtils.createScopedProxy(definition, parserContext.getRegistry(), proxyTargetClass);
  }
View Full Code Here

    if (!parserContext.getRegistry().containsBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME)) {
      RootBeanDefinition def = new RootBeanDefinition();
      def.setBeanClassName(BEAN_CONFIGURER_ASPECT_CLASS_NAME);
      def.setFactoryMethodName("aspectOf");
      def.setSource(parserContext.extractSource(element));
      parserContext.registerBeanComponent(new BeanComponentDefinition(def, BEAN_CONFIGURER_ASPECT_BEAN_NAME));
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.parsing.BeanComponentDefinition

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.