org.springframework.web.context.support
Class WebApplicationObjectSupport
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
- All Implemented Interfaces:
- ApplicationContextAware
- Direct Known Subclasses:
- AbstractCachingViewResolver, AbstractHandlerMapping, AbstractView, BeanNameViewResolver, ComponentControllerSupport, TilesConfigurer, WebContentGenerator
- public abstract class WebApplicationObjectSupport
- extends ApplicationObjectSupport
Convenient superclass for application objects running in a WebApplicationContext.
Provides getWebApplicationContext, getServletContext, and getTempDir methods.
- Since:
- 28.08.2003
- Author:
- Juergen Hoeller
Method Summary |
protected javax.servlet.ServletContext |
getServletContext()
Return the current ServletContext. |
protected java.io.File |
getTempDir()
Return the temporary directory for the current web application,
as provided by the servlet container. |
protected WebApplicationContext |
getWebApplicationContext()
Return the current application context as WebApplicationContext. |
protected java.lang.Class |
requiredContextClass()
Determine the context class that any context passed to
setApplicationContext must be an instance of. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebApplicationObjectSupport
public WebApplicationObjectSupport()
requiredContextClass
protected java.lang.Class requiredContextClass()
- Description copied from class:
ApplicationObjectSupport
- Determine the context class that any context passed to
setApplicationContext must be an instance of.
Can be overridden in subclasses.
- Overrides:
requiredContextClass
in class ApplicationObjectSupport
getWebApplicationContext
protected final WebApplicationContext getWebApplicationContext()
- Return the current application context as WebApplicationContext.
getServletContext
protected final javax.servlet.ServletContext getServletContext()
- Return the current ServletContext.
getTempDir
protected final java.io.File getTempDir()
- Return the temporary directory for the current web application,
as provided by the servlet container.
- Returns:
- the File representing the temporary directory
Copyright (C) 2003-2004 The Spring Framework Project.