1
2
3
4
5
6
7
8
9
10
11 package org.mule.config.spring.parsers.specific;
12
13 import org.mule.api.config.MuleProperties;
14 import org.mule.config.spring.parsers.generic.OrphanDefinitionParser;
15 import org.mule.construct.SimpleFlowConstruct;
16 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
17 import org.springframework.beans.factory.xml.ParserContext;
18 import org.w3c.dom.Element;
19
20 public class FlowDefinitionParser extends OrphanDefinitionParser
21 {
22
23 public FlowDefinitionParser()
24 {
25 super(SimpleFlowConstruct.class, true);
26 addIgnored("abstract");
27 addIgnored("name");
28 }
29
30 @java.lang.Override
31 protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
32 {
33 builder.addConstructorArgValue(element.getAttribute(ATTRIBUTE_NAME));
34 builder.addConstructorArgReference(MuleProperties.OBJECT_MULE_CONTEXT);
35 super.doParse(element, parserContext, builder);
36 }
37
38 }