Class WebXmlMappableAttributesRetriever
java.lang.Object
org.springframework.security.web.authentication.preauth.j2ee.WebXmlMappableAttributesRetriever
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ResourceLoaderAware,MappableAttributesRetriever
public class WebXmlMappableAttributesRetriever
extends Object
implements org.springframework.context.ResourceLoaderAware, MappableAttributesRetriever, org.springframework.beans.factory.InitializingBean
This MappableAttributesRetriever implementation reads the list of defined J2EE
roles from a web.xml file and returns these from {
getMappableAttributes().- Since:
- 2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLoads the web.xml file using the configured ResourceLoader and parses the role-name elements from it, using these as the set of mappableAttributes.Implementations of this method should return a set of all string attributes which can be mapped to GrantedAuthoritys.voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
WebXmlMappableAttributesRetriever
public WebXmlMappableAttributesRetriever()
-
-
Method Details
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
setResourceLoaderin interfaceorg.springframework.context.ResourceLoaderAware
-
getMappableAttributes
Description copied from interface:MappableAttributesRetrieverImplementations of this method should return a set of all string attributes which can be mapped to GrantedAuthoritys.- Specified by:
getMappableAttributesin interfaceMappableAttributesRetriever- Returns:
- set of all mappable roles
-
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.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-