Coverage Report - org.mule.config.spring.parsers.processors.ProvideDefaultName
 
Classes in this File Line Coverage Branch Coverage Complexity
ProvideDefaultName
0%
0/5
N/A
1
 
 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.processors;
 8  
 
 9  
 import org.mule.config.spring.parsers.PreProcessor;
 10  
 import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser;
 11  
 import org.mule.config.spring.parsers.generic.AutoIdUtils;
 12  
 import org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration;
 13  
 
 14  
 import org.w3c.dom.Element;
 15  
 
 16  
 public class ProvideDefaultName implements PreProcessor
 17  
 {
 18  
     
 19  
     private String prefix;
 20  
 
 21  
     public ProvideDefaultName(String prefix)
 22  0
     {
 23  0
         this.prefix = prefix;
 24  0
     }
 25  
 
 26  
     public void preProcess(PropertyConfiguration config, Element element)
 27  
     {
 28  0
         element.setAttribute(AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME,
 29  
                 AutoIdUtils.getUniqueName(element, prefix));
 30  0
     }
 31  
 
 32  
 }