Coverage Report - org.mule.config.spring.parsers.specific.MessageFilterDefinitionParser
 
Classes in this File Line Coverage Branch Coverage Complexity
MessageFilterDefinitionParser
0%
0/9
0%
0/2
1.5
 
 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.PostProcessor;
 11  
 import org.mule.config.spring.parsers.assembly.BeanAssembler;
 12  
 import org.mule.routing.MessageFilter;
 13  
 import org.springframework.beans.factory.xml.ParserContext;
 14  
 import org.w3c.dom.Element;
 15  
 
 16  
 public class MessageFilterDefinitionParser extends MessageProcessorDefinitionParser implements PostProcessor
 17  
 {
 18  
     private static final String ATTRIBUTE_UNACCEPTED = "onUnaccepted";
 19  
 
 20  
     public MessageFilterDefinitionParser()
 21  
     {
 22  0
         super(MessageFilter.class);
 23  0
         addIgnored(AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME);
 24  0
         addIgnored(ATTRIBUTE_UNACCEPTED);
 25  0
         registerPostProcessor(this);
 26  0
     }
 27  
 
 28  
     public void postProcess(ParserContext context, BeanAssembler assembler, Element element)
 29  
     {
 30  0
         String onUnaccepted = element.getAttribute(ATTRIBUTE_UNACCEPTED);
 31  0
         if (onUnaccepted != null)
 32  
         {
 33  0
             assembler.extendBean("unacceptedMessageProcessor", onUnaccepted, true);
 34  
         }
 35  0
     }
 36  
 }