Coverage Report - org.mule.config.spring.parsers.specific.ComponentDefinitionParser
 
Classes in this File Line Coverage Branch Coverage Complexity
ComponentDefinitionParser
0%
0/8
0%
0/4
0
 
 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;
 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  
 }