1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.config.spring.parsers.specific; |
8 | |
|
9 | |
import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser; |
10 | |
import org.mule.config.spring.parsers.generic.ChildDefinitionParser; |
11 | |
|
12 | |
import org.w3c.dom.Element; |
13 | |
|
14 | |
public class ComponentDefinitionParser extends ChildDefinitionParser |
15 | |
{ |
16 | |
|
17 | |
public ComponentDefinitionParser(Class clazz) |
18 | |
{ |
19 | 0 | super("messageProcessor", clazz); |
20 | 0 | this.singleton = false; |
21 | 0 | addIgnored(AbstractMuleBeanDefinitionParser.ATTRIBUTE_CLASS); |
22 | 0 | } |
23 | |
|
24 | |
@Override |
25 | |
public String getPropertyName(Element e) |
26 | |
{ |
27 | 0 | String parent = e.getParentNode().getLocalName().toLowerCase(); |
28 | 0 | if ("service".equals(parent) || "custom-service".equals(parent)) |
29 | |
{ |
30 | 0 | return "component"; |
31 | |
} |
32 | |
else |
33 | |
{ |
34 | 0 | return super.getPropertyName(e); |
35 | |
} |
36 | |
} |
37 | |
} |