Class WebXmlMappableAttributesRetriever

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ResourceLoaderAware, MappableAttributesRetriever

    public class WebXmlMappableAttributesRetriever
    extends java.lang.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 
      Modifier and Type Field Description
      protected org.apache.commons.logging.Log logger  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      java.util.Set<java.lang.String> getMappableAttributes()
      Implementations of this method should return a set of all string attributes which can be mapped to GrantedAuthoritys.
      void setResourceLoader​(org.springframework.core.io.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​(org.springframework.core.io.ResourceLoader resourceLoader)
        Specified by:
        setResourceLoader in interface org.springframework.context.ResourceLoaderAware
      • getMappableAttributes

        public java.util.Set<java.lang.String> getMappableAttributes()
        Description copied from interface: MappableAttributesRetriever
        Implementations of this method should return a set of all string attributes which can be mapped to GrantedAuthoritys.
        Specified by:
        getMappableAttributes in interface MappableAttributesRetriever
        Returns:
        set of all mappable roles
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.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 org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception