Coverage Report - org.mule.module.acegi.config.AcegiNamespaceHandler
 
Classes in this File Line Coverage Branch Coverage Complexity
AcegiNamespaceHandler
100%
6/6
N/A
1
 
 1  
 /*
 2  
  * $Id: AcegiNamespaceHandler.java 10789 2008-02-12 20:04:43Z dfeist $
 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  
 package org.mule.module.acegi.config;
 11  
 
 12  
 import org.mule.api.config.MuleProperties;
 13  
 import org.mule.config.spring.parsers.collection.ChildMapEntryDefinitionParser;
 14  
 import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
 15  
 import org.mule.config.spring.parsers.generic.DescendentDefinitionParser;
 16  
 import org.mule.config.spring.parsers.generic.NamedDefinitionParser;
 17  
 import org.mule.module.acegi.AcegiProviderAdapter;
 18  
 import org.mule.module.acegi.filters.http.HttpBasicAuthenticationFilter;
 19  
 
 20  
 import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
 21  
 
 22  
 /**
 23  
  * Registers a Bean Definition Parser for handling Acegi related elements.
 24  
  */
 25  46
 public class AcegiNamespaceHandler extends NamespaceHandlerSupport
 26  
 {
 27  
     public void init()
 28  
     {
 29  46
         registerBeanDefinitionParser("security-manager", new NamedDefinitionParser(MuleProperties.OBJECT_SECURITY_MANAGER));
 30  46
         registerBeanDefinitionParser("delegate-security-provider", new ChildDefinitionParser("provider", AcegiProviderAdapter.class));
 31  46
         registerBeanDefinitionParser("http-security-filter", new DescendentDefinitionParser("securityFilter", HttpBasicAuthenticationFilter.class));
 32  46
         registerBeanDefinitionParser("security-property", new ChildMapEntryDefinitionParser("securityProperty", "name", "value"));
 33  46
     }
 34  
 
 35  
 }