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  
  * $Id: MessageFilterDefinitionParser.java 20320 2010-11-24 15:03:31Z 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.specific;
 12  
 
 13  
 import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser;
 14  
 import org.mule.config.spring.parsers.PostProcessor;
 15  
 import org.mule.config.spring.parsers.assembly.BeanAssembler;
 16  
 import org.mule.routing.MessageFilter;
 17  
 import org.springframework.beans.factory.xml.ParserContext;
 18  
 import org.w3c.dom.Element;
 19  
 
 20  
 public class MessageFilterDefinitionParser extends MessageProcessorDefinitionParser implements PostProcessor
 21  
 {
 22  
     private static final String ATTRIBUTE_UNACCEPTED = "onUnaccepted";
 23  
 
 24  
     public MessageFilterDefinitionParser()
 25  
     {
 26  0
         super(MessageFilter.class);
 27  0
         addIgnored(AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME);
 28  0
         addIgnored(ATTRIBUTE_UNACCEPTED);
 29  0
         registerPostProcessor(this);
 30  0
     }
 31  
 
 32  
     public void postProcess(ParserContext context, BeanAssembler assembler, Element element)
 33  
     {
 34  0
         String onUnaccepted = element.getAttribute(ATTRIBUTE_UNACCEPTED);
 35  0
         if (onUnaccepted != null)
 36  
         {
 37  0
             assembler.extendBean("unacceptedMessageProcessor", onUnaccepted, true);
 38  
         }
 39  0
     }
 40  
 }