Home » Spring-Framework-090522 » org.springframework » web » context » support » [javadoc | source]
org.springframework.web.context.support
abstract public class: WebApplicationObjectSupport [javadoc | source]
java.lang.Object
   org.springframework.context.support.ApplicationObjectSupport
      org.springframework.web.context.support.WebApplicationObjectSupport

All Implemented Interfaces:
    ServletContextAware, ApplicationContextAware

Convenient superclass for application objects running in a WebApplicationContext. Provides getWebApplicationContext(), getServletContext(), and getTempDir() methods.
Fields inherited from org.springframework.context.support.ApplicationObjectSupport:
logger
Method from org.springframework.web.context.support.WebApplicationObjectSupport Summary:
getServletContext,   getTempDir,   getWebApplicationContext,   initApplicationContext,   initServletContext,   isContextRequired,   setServletContext
Methods from org.springframework.context.support.ApplicationObjectSupport:
getApplicationContext,   getMessageSourceAccessor,   initApplicationContext,   initApplicationContext,   isContextRequired,   requiredContextClass,   setApplicationContext
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.web.context.support.WebApplicationObjectSupport Detail:
 protected final ServletContext getServletContext() throws IllegalStateException 
    Return the current ServletContext.
 protected final File getTempDir() throws IllegalStateException 
    Return the temporary directory for the current web application, as provided by the servlet container.
 protected final WebApplicationContext getWebApplicationContext() throws IllegalStateException 
    Return the current application context as WebApplicationContext.

    NOTE: Only use this if you actually need to access WebApplicationContext-specific functionality. Preferably use getApplicationContext() or getServletContext() else, to be able to run in non-WebApplicationContext environments as well.

 protected  void initApplicationContext(ApplicationContext context) 
 protected  void initServletContext(ServletContext servletContext) 
 protected boolean isContextRequired() 
    Overrides the base class behavior to enforce running in an ApplicationContext. All accessors will throw IllegalStateException if not running in a context.
 public final  void setServletContext(ServletContext servletContext)