站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

MockPortletSession (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.mock.web.portlet
Class MockPortletSession

java.lang.Object
  extended by org.springframework.mock.web.portlet.MockPortletSession
All Implemented Interfaces:
PortletSession

public class MockPortletSession
extends Object
implements PortletSession

Mock implementation of the PortletSession interface.

Since:
2.0
Author:
John A. Lewis, Juergen Hoeller

Field Summary
 
Fields inherited from interface javax.portlet.PortletSession
APPLICATION_SCOPE, PORTLET_SCOPE
 
Constructor Summary
MockPortletSession()
          Create a new MockPortletSession with a default MockPortletContext.
MockPortletSession(PortletContext portletContext)
          Create a new MockPortletSession.
 
Method Summary
 void access()
           
 Object getAttribute(String name)
           
 Object getAttribute(String name, int scope)
           
 Enumeration getAttributeNames()
           
 Enumeration getAttributeNames(int scope)
           
 long getCreationTime()
           
 String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 PortletContext getPortletContext()
           
 void invalidate()
           
 boolean isInvalid()
           
 boolean isNew()
           
 void removeAttribute(String name)
           
 void removeAttribute(String name, int scope)
           
 void setAttribute(String name, Object value)
           
 void setAttribute(String name, Object value, int scope)
           
 void setMaxInactiveInterval(int interval)
           
 void setNew(boolean value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockPortletSession

public MockPortletSession()
Create a new MockPortletSession with a default MockPortletContext.

See Also:
MockPortletContext

MockPortletSession

public MockPortletSession(PortletContext portletContext)
Create a new MockPortletSession.

Parameters:
portletContext - the PortletContext that the session runs in
Method Detail

getAttribute

public Object getAttribute(String name)
Specified by:
getAttribute in interface PortletSession

getAttribute

public Object getAttribute(String name,
                           int scope)
Specified by:
getAttribute in interface PortletSession

getAttributeNames

public Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface PortletSession

getAttributeNames

public Enumeration getAttributeNames(int scope)
Specified by:
getAttributeNames in interface PortletSession

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface PortletSession

getId

public String getId()
Specified by:
getId in interface PortletSession

access

public void access()

getLastAccessedTime

public long getLastAccessedTime()
Specified by:
getLastAccessedTime in interface PortletSession

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface PortletSession

invalidate

public void invalidate()
Specified by:
invalidate in interface PortletSession

isInvalid

public boolean isInvalid()

setNew

public void setNew(boolean value)

isNew

public boolean isNew()
Specified by:
isNew in interface PortletSession

removeAttribute

public void removeAttribute(String name)
Specified by:
removeAttribute in interface PortletSession

removeAttribute

public void removeAttribute(String name,
                            int scope)
Specified by:
removeAttribute in interface PortletSession

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface PortletSession

setAttribute

public void setAttribute(String name,
                         Object value,
                         int scope)
Specified by:
setAttribute in interface PortletSession

setMaxInactiveInterval

public void setMaxInactiveInterval(int interval)
Specified by:
setMaxInactiveInterval in interface PortletSession

getPortletContext

public PortletContext getPortletContext()
Specified by:
getPortletContext in interface PortletSession

The Spring Framework

Copyright © 2002-2007 The Spring Framework.