}
}
protected void registerComponentInfo(ConfigurationInfo configInfo,
BeanDefinitionRegistry registry) {
PipelineComponentInfo info = new PipelineComponentInfo(null);
final Iterator i = configInfo.getComponents().values().iterator();
while (i.hasNext()) {
final ComponentInfo current = (ComponentInfo) i.next();
info.componentAdded(current.getRole(), current.getComponentClassName(), current.getConfiguration());
}
prepareSelector(info, configInfo, Generator.ROLE);
prepareSelector(info, configInfo, Transformer.ROLE);
prepareSelector(info, configInfo, Serializer.ROLE);
prepareSelector(info, configInfo, ProcessingPipeline.ROLE);
prepareSelector(info, configInfo, Action.ROLE);
prepareSelector(info, configInfo, Selector.ROLE);
prepareSelector(info, configInfo, Matcher.ROLE);
prepareSelector(info, configInfo, Reader.ROLE);
info.lock();
if (!registry.containsBeanDefinition(PipelineComponentInfo.ROLE)) {
final RootBeanDefinition beanDef = new RootBeanDefinition();
beanDef.setBeanClass(PipelineComponentInfoFactoryBean.class);
beanDef.setSingleton(true);
beanDef.setLazyInit(false);
beanDef.setInitMethodName("init");
this.register(beanDef, PipelineComponentInfo.ROLE, registry);
}
BeanDefinitionBuilder initDefBuilder =
BeanDefinitionBuilder.rootBeanDefinition(PipelineComponentInfoInitializer.class);
initDefBuilder.addPropertyReference("info", PipelineComponentInfo.ROLE);
initDefBuilder.setSingleton(true);
initDefBuilder.setLazyInit(false);
initDefBuilder.setInitMethodName("init");
initDefBuilder.addPropertyValue("data", info.getData());
final String beanName = this.getClass().getName() + "/init";
this.register(initDefBuilder.getBeanDefinition(), beanName, registry);
final RootBeanDefinition ciBeanDef = new RootBeanDefinition();
ciBeanDef.setBeanClass(ConfigurationInfoFactoryBean.class);