Class WebAppConfigSource
- java.lang.Object
-
- org.springframework.extensions.config.source.BaseConfigSource
-
- org.springframework.extensions.config.source.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.ServletContextAwareConfigSource 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 fileWebAppConfigSource(java.util.List<java.lang.String> sourceStrings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetInputStream(java.lang.String sourceString)voidsetServletContext(javax.servlet.ServletContext servletContext)
-
-
-
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:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware- See Also:
ServletContextAware.setServletContext(javax.servlet.ServletContext)
-
getInputStream
public java.io.InputStream getInputStream(java.lang.String sourceString)
- Specified by:
getInputStreamin classorg.springframework.extensions.config.source.BaseConfigSource- See Also:
BaseConfigSource.getInputStream(java.lang.String)
-
-