类 PortletApplicationObjectSupport
- java.lang.Object
- org.springframework.context.support.ApplicationObjectSupport
- org.springframework.web.portlet.context.PortletApplicationObjectSupport
- 所有已实现的接口:
Aware
,ApplicationContextAware
,PortletContextAware
- 直接已知子类:
PortletContentGenerator
public abstract class PortletApplicationObjectSupport extends ApplicationObjectSupport implements PortletContextAware
Convenient superclass for application objects running in a Portlet ApplicationContext. Provides getApplicationContext, getServletContext, and getTempDir methods.- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
字段概要
从类继承的字段 org.springframework.context.support.ApplicationObjectSupport
logger
构造器概要
构造器 构造器 说明 PortletApplicationObjectSupport()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, requiredContextClass, setApplicationContext
构造器详细资料
PortletApplicationObjectSupport
public PortletApplicationObjectSupport()
方法详细资料
setPortletContext
public void setPortletContext(PortletContext portletContext)
从接口复制的说明:PortletContextAware
Set the PortletContext that this object runs in.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
在接口中PortletContextAware
- 参数:
portletContext
- PortletContext object to be used by this object
isContextRequired
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.
getPortletContext
protected final PortletContext getPortletContext() throws IllegalStateException
Return the current PortletContext.- 抛出:
IllegalStateException
- if not running within a PortletContext
getTempDir
protected final File getTempDir() throws IllegalStateException
Return the temporary directory for the current web application, as provided by the servlet container.- 返回:
- the File representing the temporary directory
- 抛出:
IllegalStateException
- if not running within a PortletContext- 另请参阅:
PortletUtils.getTempDir(javax.portlet.PortletContext)