org.springframework.extensions.config.source
Class WebAppConfigSource
java.lang.Object
org.springframework.extensions.config.source.BaseConfigSource
org.springframework.extensions.config.source.WebAppConfigSource
- All Implemented Interfaces:
- ConfigSource, org.springframework.web.context.ServletContextAware
public class WebAppConfigSource
- extends 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebAppConfigSource
public WebAppConfigSource(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(List<String> sourceStrings)
- Parameters:
sourceStrings
- List of paths to files in a web application
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 InputStream getInputStream(String sourceString)
- Description copied from class:
BaseConfigSource
- Retrieves an InputStream to the source represented by the given
source location. The meaning of the source location will depend
on the implementation.
- Specified by:
getInputStream
in class BaseConfigSource
- Parameters:
sourceString
- the source location
- Returns:
- Returns an InputStream to the named source location
- See Also:
BaseConfigSource.getInputStream(java.lang.String)
Copyright © 2009 SpringSource, Inc. All Rights Reserved.