Class WebAppConfigSource

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.extensions.config.ConfigSource, org.springframework.web.context.ServletContextAware

    public class WebAppConfigSource
    extends org.springframework.extensions.config.source.BaseConfigSource
    implements org.springframework.web.context.ServletContextAware
    ConfigSource implementation that gets its data via files in a web application. TODO: Also deal with the source being specified as an init param i.e. param:config.files
    Author:
    gavinc
    • Constructor Summary

      Constructors 
      Constructor Description
      WebAppConfigSource​(java.lang.String filename)
      Constructs a webapp configuration source that uses a single file
      WebAppConfigSource​(java.util.List<java.lang.String> sourceStrings)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream​(java.lang.String sourceString)  
      void setServletContext​(javax.servlet.ServletContext servletContext)  
      • Methods inherited from class org.springframework.extensions.config.source.BaseConfigSource

        addSourceString, getConfigDeployments
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebAppConfigSource

        public WebAppConfigSource​(java.lang.String filename)
        Constructs a webapp configuration source that uses a single file
        Parameters:
        filename - the name of the file from which to get config
        See Also:
        WebAppConfigSource(java.util.List)
      • WebAppConfigSource

        public WebAppConfigSource​(java.util.List<java.lang.String> sourceStrings)
        Parameters:
        sourceStrings - List of paths to files in a web application
    • Method Detail

      • setServletContext

        public void setServletContext​(javax.servlet.ServletContext servletContext)
        Specified by:
        setServletContext in interface org.springframework.web.context.ServletContextAware
        See Also:
        ServletContextAware.setServletContext(javax.servlet.ServletContext)
      • getInputStream

        public java.io.InputStream getInputStream​(java.lang.String sourceString)
        Specified by:
        getInputStream in class org.springframework.extensions.config.source.BaseConfigSource
        See Also:
        BaseConfigSource.getInputStream(java.lang.String)