AbstractChildElementIterator (Mule ESB 2.2.1 API)
Keywords: org.mule.config.spring.parsers.processors.AbstractChildElementIterator class

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.processors
Class AbstractChildElementIterator

    java.lang.Object
      org.mule.config.spring.parsers.processors.AbstractChildElementIterator

All Implemented Interfaces:
  PostProcessor

Direct Known Subclasses:
  NamedSetterChildElementIterator

    public abstract class AbstractChildElementIterator

extends Object
implements PostProcessor

This iterates over child elements, parsing them and calling `insertBean(org.mule.config.spring.parsers.assembly.BeanAssembler, org.springframework.beans.factory.config.BeanDefinition, org.w3c.dom.Element, org.w3c.dom.Element)`.

There are two ways we can parse a tree of elements - have an external loop or let each parser iterate over its own children. Mule uses the first strategy, but some (most? all?) third party BDPs use the second. This processor lets us use third party beans inside the Mule framework.

So this is a very specialised parser that should only be used when trying to inter-operate with beans from third party packages which themselves control how their children are parsed.

Since for Mule beans the iteration over child elements (at least currently) is done via `MuleHierarchicalBeanDefinitionParserDelegate` the calling parser needs to set the flag `MuleHierarchicalBeanDefinitionParserDelegate.MULE_NO_RECURSE` - this stops the Mule recursion from working.

NOTE - IMHO (ac) the Mule approach was probably a mistake; this processor could be used as a way to slowly migrate the Mule code to the more common approach.

Constructor Summary
`AbstractChildElementIterator(BeanAssemblerFactory beanAssemblerFactory, PropertyConfiguration configuration)`

Method Summary
`protected abstract void` | `insertBean(BeanAssembler targetAssembler, org.springframework.beans.factory.config.BeanDefinition childBean, Element parent, Element child)`
`void` | `postProcess(org.springframework.beans.factory.xml.ParserContext context, BeanAssembler assembler, Element element)`
`protected void` | `processChildElement(org.springframework.beans.factory.xml.ParserContext context, BeanAssembler assembler, Element parent, Element child)`

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

Constructor Detail

### AbstractChildElementIterator

    public AbstractChildElementIterator(BeanAssemblerFactory beanAssemblerFactory,
                                        PropertyConfiguration configuration)

Method Detail

### postProcess

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

  Specified by:
    `postProcess` in interface `PostProcessor`

### processChildElement

    protected void processChildElement(org.springframework.beans.factory.xml.ParserContext context,
                                       BeanAssembler assembler,
                                       Element parent,
                                       Element child)

### insertBean

    protected abstract void insertBean(BeanAssembler targetAssembler,
                                       org.springframework.beans.factory.config.BeanDefinition childBean,
                                       Element parent,
                                       Element child)

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.