01: /*
02: * $Id: MuleBeanDefinitionDocumentReader.java 10256 2008-01-08 15:20:25Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10: package org.mule.config.spring;
11:
12: import org.springframework.beans.factory.xml.BeanDefinitionParserDelegate;
13: import org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader;
14: import org.springframework.beans.factory.xml.XmlReaderContext;
15: import org.w3c.dom.Element;
16:
17: /**
18: * Allows us to hook in our own Hierarchical Parser delegate. this enables the parsing of custom spring bean
19: * elements nested within each other
20: */
21: public class MuleBeanDefinitionDocumentReader extends
22: DefaultBeanDefinitionDocumentReader {
23:
24: protected BeanDefinitionParserDelegate createHelper(
25: XmlReaderContext readerContext, Element root) {
26: BeanDefinitionParserDelegate delegate = new MuleHierarchicalBeanDefinitionParserDelegate(
27: readerContext, this);
28: delegate.initDefaults(root);
29: return delegate;
30: }
31:
32: }
|