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.delegate;
8   
9   import org.mule.config.spring.parsers.MuleChildDefinitionParser;
10  import org.mule.config.spring.parsers.MuleDefinitionParser;
11  import org.mule.config.spring.parsers.MuleDefinitionParserConfiguration;
12  import org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration;
13  
14  import org.springframework.beans.factory.config.BeanDefinition;
15  
16  
17  public class AbstractSingleParentFamilyChildDefinitionParser
18      extends AbstractSingleParentFamilyDefinitionParser implements MuleChildDefinitionParser
19  {
20  
21      protected MuleDefinitionParserConfiguration addDelegate(MuleDefinitionParser delegate)
22      {
23          return addDelegateAsChild(delegate);
24      }
25  
26      public void forceParent(BeanDefinition parent)
27      {
28          ((MuleChildDefinitionParser) getDelegate(0)).forceParent(parent);
29      }
30  
31      public PropertyConfiguration getTargetPropertyConfiguration()
32      {
33          return ((MuleChildDefinitionParser) getDelegate(0)).getTargetPropertyConfiguration();
34      }
35  
36  }