org.apache.shale.test.mock
Class MockPortletSession

java.lang.Object
  extended by org.apache.shale.test.mock.MockPortletSession
All Implemented Interfaces:
javax.portlet.PortletSession

public class MockPortletSession
extends Object
implements javax.portlet.PortletSession

Mock implementation of PortletSession.

$Id: MockPortletSession.java 516091 2007-03-08 16:25:17Z greddin $


Field Summary
 
Fields inherited from interface javax.portlet.PortletSession
APPLICATION_SCOPE, PORTLET_SCOPE
 
Constructor Summary
MockPortletSession()
           Configure a default instance.
MockPortletSession(javax.portlet.PortletContext portletContext)
           Configure a session instance associated with the specified servlet context.
 
Method Summary
 Object getAttribute(String name)
          
 Object getAttribute(String name, int scope)
          
 Enumeration getAttributeNames()
          
 Enumeration getAttributeNames(int scope)
          
 long getCreationTime()
          
 String getId()
          
 long getLastAccessedTime()
          
 int getMaxInactiveInterval()
          
 javax.portlet.PortletContext getPortletContext()
          
 void invalidate()
          
 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 setId(String id)
           Set the session identifier of this session.
 void setMaxInactiveInterval(int arg0)
          
 void setPortletContext(javax.portlet.PortletContext portletContext)
           Set the PortletContext associated with this session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockPortletSession

public MockPortletSession()

Configure a default instance.


MockPortletSession

public MockPortletSession(javax.portlet.PortletContext portletContext)

Configure a session instance associated with the specified servlet context.

Parameters:
servletContext - The associated servlet context
Method Detail

setPortletContext

public void setPortletContext(javax.portlet.PortletContext portletContext)

Set the PortletContext associated with this session.

Parameters:
servletContext - The associated servlet context

setId

public void setId(String id)

Set the session identifier of this session.

Parameters:
id - The new session identifier

getAttribute

public Object getAttribute(String name)

Specified by:
getAttribute in interface javax.portlet.PortletSession

getAttribute

public Object getAttribute(String name,
                           int scope)

Specified by:
getAttribute in interface javax.portlet.PortletSession

getAttributeNames

public Enumeration getAttributeNames()

Specified by:
getAttributeNames in interface javax.portlet.PortletSession

getAttributeNames

public Enumeration getAttributeNames(int scope)

Specified by:
getAttributeNames in interface javax.portlet.PortletSession

getCreationTime

public long getCreationTime()

Specified by:
getCreationTime in interface javax.portlet.PortletSession

getId

public String getId()

Specified by:
getId in interface javax.portlet.PortletSession

getLastAccessedTime

public long getLastAccessedTime()

Specified by:
getLastAccessedTime in interface javax.portlet.PortletSession

getMaxInactiveInterval

public int getMaxInactiveInterval()

Specified by:
getMaxInactiveInterval in interface javax.portlet.PortletSession

getPortletContext

public javax.portlet.PortletContext getPortletContext()

Specified by:
getPortletContext in interface javax.portlet.PortletSession

invalidate

public void invalidate()

Specified by:
invalidate in interface javax.portlet.PortletSession

isNew

public boolean isNew()

Specified by:
isNew in interface javax.portlet.PortletSession

removeAttribute

public void removeAttribute(String name)

Specified by:
removeAttribute in interface javax.portlet.PortletSession

removeAttribute

public void removeAttribute(String name,
                            int scope)

Specified by:
removeAttribute in interface javax.portlet.PortletSession

setAttribute

public void setAttribute(String name,
                         Object value)

Specified by:
setAttribute in interface javax.portlet.PortletSession

setAttribute

public void setAttribute(String name,
                         Object value,
                         int scope)

Specified by:
setAttribute in interface javax.portlet.PortletSession

setMaxInactiveInterval

public void setMaxInactiveInterval(int arg0)

Specified by:
setMaxInactiveInterval in interface javax.portlet.PortletSession


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.