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  
  * $Id: ProvideDefaultName.java 20321 2010-11-24 15:21:24Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.config.spring.parsers.processors;
 12  
 
 13  
 import org.mule.config.spring.parsers.PreProcessor;
 14  
 import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser;
 15  
 import org.mule.config.spring.parsers.generic.AutoIdUtils;
 16  
 import org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration;
 17  
 
 18  
 import org.w3c.dom.Element;
 19  
 
 20  
 public class ProvideDefaultName implements PreProcessor
 21  
 {
 22  
     
 23  
     private String prefix;
 24  
 
 25  
     public ProvideDefaultName(String prefix)
 26  0
     {
 27  0
         this.prefix = prefix;
 28  0
     }
 29  
 
 30  
     public void preProcess(PropertyConfiguration config, Element element)
 31  
     {
 32  0
         element.setAttribute(AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME,
 33  
                 AutoIdUtils.getUniqueName(element, prefix));
 34  0
     }
 35  
 
 36  
 }