1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.config.spring.parsers.specific.properties; |
8 | |
|
9 | |
import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser; |
10 | |
import org.mule.config.spring.parsers.assembly.MapEntryCombiner; |
11 | |
import org.mule.config.spring.parsers.collection.ChildSingletonMapDefinitionParser; |
12 | |
import org.mule.config.spring.parsers.delegate.AbstractSingleParentFamilyDefinitionParser; |
13 | |
import org.mule.config.spring.parsers.generic.AttributePropertiesDefinitionParser; |
14 | |
import org.mule.config.spring.parsers.processors.AddAttribute; |
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
public class NestedMapWithAttributesDefinitionParser extends AbstractSingleParentFamilyDefinitionParser |
24 | |
{ |
25 | |
|
26 | |
public NestedMapWithAttributesDefinitionParser(String mapSetter, String mapKey) |
27 | 0 | { |
28 | 0 | addDelegate(new ChildSingletonMapDefinitionParser(mapSetter)) |
29 | |
.addCollection(mapSetter) |
30 | |
.setIgnoredDefault(true) |
31 | |
.removeIgnored(MapEntryCombiner.KEY) |
32 | |
.registerPreProcessor(new AddAttribute(MapEntryCombiner.KEY, mapKey)); |
33 | 0 | addChildDelegate(new AttributePropertiesDefinitionParser(MapEntryCombiner.VALUE)) |
34 | |
.addIgnored(AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME) |
35 | |
.addIgnored(MapEntryCombiner.KEY); |
36 | 0 | } |
37 | |
|
38 | |
} |
39 | |
|