Coverage Report - org.mule.config.spring.parsers.processors.AddAttribute
 
Classes in this File Line Coverage Branch Coverage Complexity
AddAttribute
0%
0/8
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.PostProcessor;
 10  
 import org.mule.config.spring.parsers.PreProcessor;
 11  
 import org.mule.config.spring.parsers.assembly.BeanAssembler;
 12  
 import org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration;
 13  
 
 14  
 import org.w3c.dom.Element;
 15  
 import org.springframework.beans.factory.xml.ParserContext;
 16  
 
 17  
 public class AddAttribute implements PreProcessor, PostProcessor
 18  
 {
 19  
 
 20  
     private String name;
 21  
     private String value;
 22  
 
 23  
     public AddAttribute(String name, String value)
 24  0
     {
 25  0
         this.name = name;
 26  0
         this.value = value;
 27  0
     }
 28  
 
 29  
     public void postProcess(ParserContext unused, BeanAssembler assembler, Element element)
 30  
     {
 31  0
         element.setAttribute(name, value);
 32  0
     }
 33  
 
 34  
     public void preProcess(PropertyConfiguration config, Element element)
 35  
     {
 36  0
         element.setAttribute(name, value);
 37  0
     }
 38  
 
 39  
 }