类 MockPortletSession
- java.lang.Object
- org.springframework.mock.web.portlet.MockPortletSession
- 所有已实现的接口:
PortletSession
public class MockPortletSession extends Object implements PortletSession
Mock implementation of thePortletSessioninterface.- 从以下版本开始:
- 2.0
- 作者:
- John A. Lewis, Juergen Hoeller
字段概要
从接口继承的字段 javax.portlet.PortletSession
APPLICATION_SCOPE, PORTLET_SCOPE
构造器概要
构造器 构造器 说明 MockPortletSession()Create a new MockPortletSession with a defaultMockPortletContext.MockPortletSession(PortletContext portletContext)Create a new MockPortletSession.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaccess()voidclearAttributes()Clear all of this session's attributes.protected voiddoClearAttributes(Map<String,Object> attributes)ObjectgetAttribute(String name)ObjectgetAttribute(String name, int scope)Map<String,Object>getAttributeMap()Map<String,Object>getAttributeMap(int scope)Enumeration<String>getAttributeNames()Enumeration<String>getAttributeNames(int scope)longgetCreationTime()StringgetId()longgetLastAccessedTime()intgetMaxInactiveInterval()PortletContextgetPortletContext()voidinvalidate()booleanisInvalid()booleanisNew()voidremoveAttribute(String name)voidremoveAttribute(String name, int scope)voidsetAttribute(String name, Object value)voidsetAttribute(String name, Object value, int scope)voidsetMaxInactiveInterval(int interval)voidsetNew(boolean value)
构造器详细资料
MockPortletSession
public MockPortletSession()
Create a new MockPortletSession with a defaultMockPortletContext.- 另请参阅:
MockPortletContext
MockPortletSession
public MockPortletSession(PortletContext portletContext)
Create a new MockPortletSession.- 参数:
portletContext- the PortletContext that the session runs in
方法详细资料
getAttribute
public Object getAttribute(String name)
- 指定者:
getAttribute在接口中PortletSession
getAttribute
public Object getAttribute(String name, int scope)
- 指定者:
getAttribute在接口中PortletSession
getAttributeNames
public Enumeration<String> getAttributeNames()
- 指定者:
getAttributeNames在接口中PortletSession
getAttributeNames
public Enumeration<String> getAttributeNames(int scope)
- 指定者:
getAttributeNames在接口中PortletSession
getCreationTime
public long getCreationTime()
- 指定者:
getCreationTime在接口中PortletSession
getId
public String getId()
- 指定者:
getId在接口中PortletSession
access
public void access()
getLastAccessedTime
public long getLastAccessedTime()
- 指定者:
getLastAccessedTime在接口中PortletSession
getMaxInactiveInterval
public int getMaxInactiveInterval()
- 指定者:
getMaxInactiveInterval在接口中PortletSession
clearAttributes
public void clearAttributes()
Clear all of this session's attributes.
doClearAttributes
protected void doClearAttributes(Map<String,Object> attributes)
invalidate
public void invalidate()
- 指定者:
invalidate在接口中PortletSession
isInvalid
public boolean isInvalid()
setNew
public void setNew(boolean value)
isNew
public boolean isNew()
- 指定者:
isNew在接口中PortletSession
removeAttribute
public void removeAttribute(String name)
- 指定者:
removeAttribute在接口中PortletSession
removeAttribute
public void removeAttribute(String name, int scope)
- 指定者:
removeAttribute在接口中PortletSession
setAttribute
public void setAttribute(String name, Object value)
- 指定者:
setAttribute在接口中PortletSession
setAttribute
public void setAttribute(String name, Object value, int scope)
- 指定者:
setAttribute在接口中PortletSession
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval)
- 指定者:
setMaxInactiveInterval在接口中PortletSession
getPortletContext
public PortletContext getPortletContext()
- 指定者:
getPortletContext在接口中PortletSession
getAttributeMap
public Map<String,Object> getAttributeMap()
- 指定者:
getAttributeMap在接口中PortletSession
getAttributeMap
public Map<String,Object> getAttributeMap(int scope)
- 指定者:
getAttributeMap在接口中PortletSession