org.springframework.web.portlet.context
abstract public class: PortletApplicationObjectSupport [javadoc |
source]
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.portlet.context.PortletApplicationObjectSupport
All Implemented Interfaces:
PortletContextAware, ApplicationContextAware
Direct Known Subclasses:
AnnotationMethodHandlerAdapter, ParameterizableViewController, AbstractWizardFormController, AbstractController, AbstractFormController, PortletContentGenerator, PortletWrappingController, AbstractCommandController, SimpleFormController, BaseCommandController
Convenient superclass for application objects running in a Portlet ApplicationContext.
Provides getApplicationContext, getServletContext, and getTempDir methods.
- author:
Juergen - Hoeller
- since:
2.0 -
| Method from org.springframework.web.portlet.context.PortletApplicationObjectSupport Detail: |
protected final PortletContext getPortletContext() throws IllegalStateException {
if (this.portletContext == null) {
throw new IllegalStateException(
"PortletApplicationObjectSupport instance [" + this + "] does not run within a PortletContext");
}
return this.portletContext;
}
Return the current PortletContext. |
protected final File getTempDir() throws IllegalStateException {
return PortletUtils.getTempDir(getPortletContext());
}
Return the temporary directory for the current web application,
as provided by the servlet container. |
protected boolean isContextRequired() {
return true;
}
Overrides the base class behavior to enforce running in an ApplicationContext.
All accessors will throw IllegalStateException if not running in a context. |
public void setPortletContext(PortletContext portletContext) {
this.portletContext = portletContext;
}
|