org.springframework.security.ui.preauth.j2ee
Class WebXmlMappableAttributesRetriever
java.lang.Object
org.springframework.security.authoritymapping.XmlMappableAttributesRetriever
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebXmlMappableAttributesRetriever
public WebXmlMappableAttributesRetriever()
- Constructor setting the XPath expression to use
setWebXmlInputStream
public void setWebXmlInputStream(InputStream anInputStream)
- Parameters:
anInputStream
- The InputStream to read the XML data from
Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.