public abstract class PortletApplicationObjectSupport extends ApplicationObjectSupport implements PortletContextAware
logger
Constructor and Description |
---|
PortletApplicationObjectSupport() |
Modifier and Type | Method and Description |
---|---|
protected PortletContext |
getPortletContext()
Return the current PortletContext.
|
protected File |
getTempDir()
Return the temporary directory for the current web application,
as provided by the servlet container.
|
protected boolean |
isContextRequired()
Overrides the base class behavior to enforce running in an ApplicationContext.
|
void |
setPortletContext(PortletContext portletContext)
Set the PortletContext that this object runs in.
|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, requiredContextClass, setApplicationContext
public void setPortletContext(PortletContext portletContext)
PortletContextAware
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked after ApplicationContextAware's setApplicationContext.
setPortletContext
in interface PortletContextAware
portletContext
- PortletContext object to be used by this objectprotected boolean isContextRequired()
protected final PortletContext getPortletContext() throws IllegalStateException
IllegalStateException
- if not running within a PortletContextprotected final File getTempDir() throws IllegalStateException
IllegalStateException
- if not running within a PortletContextPortletUtils.getTempDir(javax.portlet.PortletContext)