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  
  * $Id: AddAttribute.java 10494 2008-01-23 21:09:56Z acooke $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.PostProcessor;
 14  
 import org.mule.config.spring.parsers.PreProcessor;
 15  
 import org.mule.config.spring.parsers.assembly.BeanAssembler;
 16  
 import org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration;
 17  
 
 18  
 import org.w3c.dom.Element;
 19  
 import org.springframework.beans.factory.xml.ParserContext;
 20  
 
 21  
 public class AddAttribute implements PreProcessor, PostProcessor
 22  
 {
 23  
 
 24  
     private String name;
 25  
     private String value;
 26  
 
 27  
     public AddAttribute(String name, String value)
 28  0
     {
 29  0
         this.name = name;
 30  0
         this.value = value;
 31  0
     }
 32  
 
 33  
     public void postProcess(ParserContext unused, BeanAssembler assembler, Element element)
 34  
     {
 35  0
         element.setAttribute(name, value);
 36  0
     }
 37  
 
 38  
     public void preProcess(PropertyConfiguration config, Element element)
 39  
     {
 40  0
         element.setAttribute(name, value);
 41  0
     }
 42  
 
 43  
 }