Coverage Report - org.mule.config.spring.parsers.specific.InterceptorStackDefinitionParser
 
Classes in this File Line Coverage Branch Coverage Complexity
InterceptorStackDefinitionParser
0%
0/6
N/A
1
 
 1  
 /*
 2  
  * $Id: InterceptorStackDefinitionParser.java 19191 2010-08-25 21:05:23Z tcarlson $
 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.MuleDefinitionParser;
 15  
 import org.mule.config.spring.parsers.delegate.ParentContextDefinitionParser;
 16  
 import org.mule.config.spring.parsers.generic.MuleOrphanDefinitionParser;
 17  
 import org.mule.config.spring.parsers.generic.ParentDefinitionParser;
 18  
 import org.mule.interceptor.InterceptorStack;
 19  
 
 20  
 /**
 21  
  * This allows a interceptor-stack to be defined globally, or configured on a
 22  
  * service.
 23  
  */
 24  
 public class InterceptorStackDefinitionParser extends ParentContextDefinitionParser
 25  
 {
 26  
 
 27  
     public static final String INTERCEPTOR_STACK = "interceptor";
 28  
     public static final String ATTRIBUTE_NAME = AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME;
 29  
 
 30  
     /**
 31  
      * For custom transformers
 32  
      */
 33  
     public InterceptorStackDefinitionParser()
 34  
     {
 35  0
         super(MuleOrphanDefinitionParser.ROOT_ELEMENT, new MuleOrphanDefinitionParser(InterceptorStack.class,
 36  
             true));
 37  0
         otherwise(addAlias(new ParentDefinitionParser(), AbstractMuleBeanDefinitionParser.ATTRIBUTE_REF,
 38  
             INTERCEPTOR_STACK));
 39  0
         super.addIgnored(ATTRIBUTE_NAME);
 40  0
     }
 41  
 
 42  
     private static MuleDefinitionParser addAlias(MuleDefinitionParser parser, String alias, String name)
 43  
     {
 44  0
         parser.addAlias(alias, name);
 45  0
         return parser;
 46  
     }
 47  
 
 48  
 }