spring-security-web

org.springframework.security.web.authentication.preauth.j2ee
Class WebXmlMappableAttributesRetriever

java.lang.Object
  extended by org.springframework.security.web.authentication.preauth.j2ee.WebXmlMappableAttributesRetriever
All Implemented Interfaces:
InitializingBean, ResourceLoaderAware, org.springframework.security.core.authority.mapping.MappableAttributesRetriever

public class WebXmlMappableAttributesRetriever
extends Object
implements ResourceLoaderAware, org.springframework.security.core.authority.mapping.MappableAttributesRetriever, InitializingBean

This MappableAttributesRetriever implementation reads the list of defined J2EE roles from a web.xml file and returns these from {getMappableAttributes().

Since:
2.0
Author:
Ruud Senden, Luke Taylor

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
WebXmlMappableAttributesRetriever()
           
 
Method Summary
 void afterPropertiesSet()
          Loads the web.xml file using the configured ResourceLoader and parses the role-name elements from it, using these as the set of mappableAttributes.
 Set<String> getMappableAttributes()
           
 void setResourceLoader(ResourceLoader resourceLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

WebXmlMappableAttributesRetriever

public WebXmlMappableAttributesRetriever()
Method Detail

setResourceLoader

public void setResourceLoader(ResourceLoader resourceLoader)
Specified by:
setResourceLoader in interface ResourceLoaderAware

getMappableAttributes

public Set<String> getMappableAttributes()
Specified by:
getMappableAttributes in interface org.springframework.security.core.authority.mapping.MappableAttributesRetriever

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Loads the web.xml file using the configured ResourceLoader and parses the role-name elements from it, using these as the set of mappableAttributes.

Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

spring-security-web