Spring Security Framework

org.springframework.security.ui.preauth.j2ee
Class WebXmlMappableAttributesRetriever

java.lang.Object
  extended by org.springframework.security.authoritymapping.XmlMappableAttributesRetriever
      extended by org.springframework.security.ui.preauth.j2ee.WebXmlMappableAttributesRetriever
All Implemented Interfaces:
InitializingBean, MappableAttributesRetriever

public class WebXmlMappableAttributesRetriever
extends XmlMappableAttributesRetriever

This MappableAttributesRetriever implementation reads the list of defined J2EE roles from a web.xml file. It's functionality is based on the XmlMappableAttributesRetriever base class.

Example on how to configure this MappableAttributesRetriever in the Spring configuration file:



 <bean id="j2eeMappableRolesRetriever" class="org.springframework.security.ui.preauth.j2ee.WebXmlMappableAttributesRetriever">
     <property name="webXmlInputStream"><bean factory-bean="webXmlResource" factory-method="getInputStream"/></property>
 </bean>
 <bean id="webXmlResource" class="org.springframework.web.context.support.ServletContextResource">
     <constructor-arg><ref local="servletContext"/></constructor-arg>
     <constructor-arg><value>/WEB-INF/web.xml</value></constructor-arg>
 </bean>
 <bean id="servletContext" class="org.springframework.web.context.support.ServletContextFactoryBean"/>

 

Since:
2.0
Author:
Ruud Senden

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.security.authoritymapping.XmlMappableAttributesRetriever
XmlMappableAttributesRetriever.IgnoreCloseInputStream
 
Constructor Summary
WebXmlMappableAttributesRetriever()
          Constructor setting the XPath expression to use
 
Method Summary
 void setWebXmlInputStream(InputStream anInputStream)
           
 
Methods inherited from class org.springframework.security.authoritymapping.XmlMappableAttributesRetriever
afterPropertiesSet, getMappableAttributes, setCloseInputStream, setXmlInputStream, setXpathExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebXmlMappableAttributesRetriever

public WebXmlMappableAttributesRetriever()
Constructor setting the XPath expression to use

Method Detail

setWebXmlInputStream

public void setWebXmlInputStream(InputStream anInputStream)
Parameters:
anInputStream - The InputStream to read the XML data from

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.