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.config.spring.util.ProcessingStrategyUtils;
16 import org.mule.construct.Flow;
17
18 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
19 import org.springframework.beans.factory.xml.ParserContext;
20 import org.w3c.dom.Element;
21
22 public class FlowDefinitionParser extends OrphanDefinitionParser
23 {
24 public FlowDefinitionParser()
25 {
26 super(Flow.class, true);
27 addIgnored("abstract");
28 addIgnored("name");
29 addIgnored("processingStrategy");
30 }
31
32 @java.lang.Override
33 protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
34 {
35 builder.addConstructorArgValue(element.getAttribute(ATTRIBUTE_NAME));
36 builder.addConstructorArgReference(MuleProperties.OBJECT_MULE_CONTEXT);
37 ProcessingStrategyUtils.configureProcessingStrategy(element, builder,
38 ProcessingStrategyUtils.QUEUED_ASYNC_PROCESSING_STRATEGY);
39 super.doParse(element, parserContext, builder);
40 }
41 }