View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.config.spring.parsers.specific.properties;
8   
9   import org.mule.config.spring.parsers.assembly.MapEntryCombiner;
10  import org.mule.config.spring.parsers.collection.ChildSingletonMapDefinitionParser;
11  
12  import org.w3c.dom.Element;
13  
14  public class SimplePropertyDefinitionParser extends ChildSingletonMapDefinitionParser
15  {
16  
17      public SimplePropertyDefinitionParser()
18      {
19          super(MapEntryCombiner.VALUE);
20      }
21  
22      protected void preProcess(Element element)
23      {
24          super.preProcess(element);
25          // this is crazy, but because we use a single property config for target and bean, and both
26          // are the same, and target properties are transient, and we only want target value to be
27          // a collection, we have to do this here!
28          getTargetPropertyConfiguration().addCollection(MapEntryCombiner.VALUE);
29      }
30      
31  }