org.apache.cocoon.core.container.spring.avalon
Class BridgeElementParser

java.lang.Object
  extended byorg.apache.cocoon.spring.configurator.impl.AbstractElementParser
      extended byorg.apache.cocoon.core.container.spring.avalon.BridgeElementParser
All Implemented Interfaces:
BeanDefinitionParser
Direct Known Subclasses:
SitemapElementParser

public class BridgeElementParser
extends org.apache.cocoon.spring.configurator.impl.AbstractElementParser

This is the main implementation of the Avalon-Spring-bridge. It creates the environment for Avalon components: a logger bean and a context bean, reads the Avalon style configurations and registers the components as beans in the Spring bean definition registry.

Since:
2.2
Version:
$Id: BridgeElementParser.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static String DEFAULT_COCOON_XCONF_LOCATION
           
 
Fields inherited from class org.apache.cocoon.spring.configurator.impl.AbstractElementParser
logger
 
Constructor Summary
BridgeElementParser()
           
 
Method Summary
protected  void addContext(Element element, BeanDefinitionRegistry registry)
           
protected  void addLogger(BeanDefinitionRegistry registry, String loggerCategory)
          Add the logger bean.
 void createComponents(Element element, ConfigurationInfo info, BeanDefinitionRegistry registry, BeanDefinitionReader reader, ResourceLoader resourceLoader)
           
 void createConfig(ConfigurationInfo info, BeanDefinitionRegistry registry)
           
protected  String getConfigurationLocation()
           
 BeanDefinition parse(Element element, ParserContext parserContext)
           
protected static void prepareSelector(org.apache.cocoon.components.pipeline.impl.PipelineComponentInfo info, ConfigurationInfo configInfo, String category)
           
protected  ConfigurationInfo readConfiguration(String location, ResourceLoader resourceLoader)
           
protected  void registerComponentInfo(ConfigurationInfo configInfo, BeanDefinitionRegistry registry)
           
 
Methods inherited from class org.apache.cocoon.spring.configurator.impl.AbstractElementParser
addComponent, addComponent, createBeanDefinition, createBeanDefinition, getAttributeValue, getChildElements, register, register, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COCOON_XCONF_LOCATION

public static final String DEFAULT_COCOON_XCONF_LOCATION
See Also:
Constant Field Values
Constructor Detail

BridgeElementParser

public BridgeElementParser()
Method Detail

parse

public BeanDefinition parse(Element element,
                            ParserContext parserContext)
See Also:
BeanDefinitionParser.parse(Element, ParserContext)

createComponents

public void createComponents(Element element,
                             ConfigurationInfo info,
                             BeanDefinitionRegistry registry,
                             BeanDefinitionReader reader,
                             ResourceLoader resourceLoader)
                      throws Exception
Parameters:
element - Can be null.
info - ConfigurationInfo.
registry - BeanDefinitionRegistry.
reader - Can be null.
resourceLoader - ResourceLoader.
Throws:
Exception - from called components.

readConfiguration

protected ConfigurationInfo readConfiguration(String location,
                                              ResourceLoader resourceLoader)
                                       throws Exception
Throws:
Exception

addContext

protected void addContext(Element element,
                          BeanDefinitionRegistry registry)

addLogger

protected void addLogger(BeanDefinitionRegistry registry,
                         String loggerCategory)
Add the logger bean.

Parameters:
registry - The bean registry.
loggerCategory - The optional category for the logger.

createConfig

public void createConfig(ConfigurationInfo info,
                         BeanDefinitionRegistry registry)
                  throws Exception
Throws:
Exception

registerComponentInfo

protected void registerComponentInfo(ConfigurationInfo configInfo,
                                     BeanDefinitionRegistry registry)

prepareSelector

protected static void prepareSelector(org.apache.cocoon.components.pipeline.impl.PipelineComponentInfo info,
                                      ConfigurationInfo configInfo,
                                      String category)

getConfigurationLocation

protected String getConfigurationLocation()


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.