Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.config.spring.parsers
Class AbstractChildDefinitionParser

    java.lang.Object
      org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
          org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser
              org.mule.config.spring.parsers.AbstractHierarchicalDefinitionParser
                  org.mule.config.spring.parsers.AbstractChildDefinitionParser

All Implemented Interfaces:
  MuleChildDefinitionParser, MuleDefinitionParser, MuleDefinitionParserConfiguration, org.springframework.beans.factory.xml.BeanDefinitionParser

Direct Known Subclasses:
  AttributeListEntryDefinitionParser, ChildDefinitionParser, ObjectFactoryDefinitionParser

    public abstract class AbstractChildDefinitionParser

extends AbstractHierarchicalDefinitionParser
implements MuleChildDefinitionParser

This definition parser supports the definition of beans that are then set on the parent bean - it extends `AbstractHierarchicalDefinitionParser` with methods that assume the data are associated with a single property. This supports collections and Maps. For collections if a child element is repeated it will be assumed that it is a collection. If the Bean Class for this element is set to `ChildMapEntryDefinitionParser.KeyValuePair` it is assumed that a Map is being processed and any child elements will be added to the parent Map. Similarly for `ChildListEntryDefinitionParser`. A single method needs to be overriden called `getPropertyName(org.w3c.dom.Element)` that determines the name of the property to set on the parent bean with this bean. Note that the property name can be dynamically resolved depending on the parent element.

See Also:
  `ChildDefinitionParser`, `ChildMapEntryDefinitionParser.KeyValuePair`, `AbstractMuleBeanDefinitionParser`

Field Summary

Fields inherited from class org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser
`ATTRIBUTE_CLASS, ATTRIBUTE_ID, ATTRIBUTE_NAME, ATTRIBUTE_REF, ATTRIBUTE_REF_SUFFIX, ATTRIBUTE_REFS, ATTRIBUTE_REFS_SUFFIX, beanPropertyConfiguration, logger, ROOT_ELEMENT, singleton`

Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
`ID_ATTRIBUTE`

Constructor Summary
`AbstractChildDefinitionParser()`

Method Summary
`protected void` | `doParse(Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)` Parse the supplied `Element` and populate the supplied `BeanDefinitionBuilder` as required.
`String` | `getBeanName(Element e)`
`abstract String` | `getPropertyName(Element element)`
`protected void` | `parseChild(Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)`
`protected void` | `postProcess(org.springframework.beans.factory.xml.ParserContext context, BeanAssembler assembler, Element element)` Hook method that derived classes can implement to inspect/change a bean definition after parsing is complete.

Methods inherited from class org.mule.config.spring.parsers.AbstractHierarchicalDefinitionParser
`forceParent, getBeanAssembler, getOrphanBeanAssembler, getParentBeanDefinition, getParentBeanName, getTargetPropertyConfiguration, preProcess`

Methods inherited from class org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser
`addAlias, addBeanFlag, addCollection, addIgnored, addMapping, addMapping, addMapping, addReference, checkElementNameUnique, createBeanDefinitionBuilder, getBeanAssemblerFactory, getBeanClass, getBeanClassFromAttribute, getClassConstraint, getClassInternal, getParserContext, getRegistry, isAllowClassAttribute, isSingleton, isTopLevel, muleParse, parseInternal, processProperty, registerPostProcessor, registerPreProcessor, removeIgnored, resolveId, setAllowClassAttribute, setBeanAssemblerFactory, setClassConstraint, setIgnoredDefault, setParserContext, setRegistry`

Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
`parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.mule.config.spring.parsers.MuleChildDefinitionParser
`forceParent, getTargetPropertyConfiguration`

Methods inherited from interface org.mule.config.spring.parsers.MuleDefinitionParser
`muleParse`

Methods inherited from interface org.springframework.beans.factory.xml.BeanDefinitionParser
`parse`

Methods inherited from interface org.mule.config.spring.parsers.MuleDefinitionParserConfiguration
`addAlias, addBeanFlag, addCollection, addIgnored, addMapping, addMapping, addMapping, addReference, registerPostProcessor, registerPreProcessor, removeIgnored, setIgnoredDefault`

Constructor Detail

### AbstractChildDefinitionParser

    public AbstractChildDefinitionParser()

Method Detail

### doParse

    protected final void doParse(Element element,
                                 org.springframework.beans.factory.xml.ParserContext parserContext,
                                 org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

  Description copied from class: `AbstractMuleBeanDefinitionParser`
  Parse the supplied `Element` and populate the supplied `BeanDefinitionBuilder` as required.

  The default implementation delegates to the `doParse` version without ParserContext argument.

  Overrides:
    `doParse` in class `AbstractMuleBeanDefinitionParser`
  Parameters:
    `element` - the XML element being parsed
    `parserContext` - the object encapsulating the current state of the parsing process
    `builder` - used to define the `BeanDefinition`

### parseChild

    protected void parseChild(Element element,
                              org.springframework.beans.factory.xml.ParserContext parserContext,
                              org.springframework.beans.factory.support.BeanDefinitionBuilder builder)

### postProcess

    protected void postProcess(org.springframework.beans.factory.xml.ParserContext context,
                               BeanAssembler assembler,
                               Element element)

  Description copied from class: `AbstractMuleBeanDefinitionParser`
  Hook method that derived classes can implement to inspect/change a bean definition after parsing is complete.

  Overrides:
    `postProcess` in class `AbstractHierarchicalDefinitionParser`
    `assembler` - the parsed (and probably totally defined) bean definition being built
    `element` - the XML element that was the source of the bean definition's metadata

### getBeanName

    public String getBeanName(Element e)

  Specified by:
    `getBeanName` in interface `MuleDefinitionParser`
  Overrides:
    `getBeanName` in class `AbstractMuleBeanDefinitionParser`

### getPropertyName

    public abstract String getPropertyName(Element element)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.