public class MockPortletSession extends Object implements javax.portlet.PortletSession
Mock implementation of PortletSession.
| Constructor and Description |
|---|
MockPortletSession()
Configure a default instance.
|
MockPortletSession(javax.portlet.PortletContext portletContext)
Configure a session instance associated with the specified servlet
context.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
public MockPortletSession()
Configure a default instance.
public MockPortletSession(javax.portlet.PortletContext portletContext)
Configure a session instance associated with the specified servlet context.
servletContext - The associated servlet contextpublic void setPortletContext(javax.portlet.PortletContext portletContext)
Set the PortletContext associated with this session.
servletContext - The associated servlet contextpublic void setId(String id)
Set the session identifier of this session.
id - The new session identifierpublic Object getAttribute(String name)
getAttribute in interface javax.portlet.PortletSessionpublic Object getAttribute(String name, int scope)
getAttribute in interface javax.portlet.PortletSessionpublic Enumeration getAttributeNames()
getAttributeNames in interface javax.portlet.PortletSessionpublic Enumeration getAttributeNames(int scope)
getAttributeNames in interface javax.portlet.PortletSessionpublic long getCreationTime()
getCreationTime in interface javax.portlet.PortletSessionpublic String getId()
getId in interface javax.portlet.PortletSessionpublic long getLastAccessedTime()
getLastAccessedTime in interface javax.portlet.PortletSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface javax.portlet.PortletSessionpublic javax.portlet.PortletContext getPortletContext()
getPortletContext in interface javax.portlet.PortletSessionpublic void invalidate()
invalidate in interface javax.portlet.PortletSessionpublic boolean isNew()
isNew in interface javax.portlet.PortletSessionpublic void removeAttribute(String name)
removeAttribute in interface javax.portlet.PortletSessionpublic void removeAttribute(String name, int scope)
removeAttribute in interface javax.portlet.PortletSessionpublic void setAttribute(String name, Object value)
setAttribute in interface javax.portlet.PortletSessionpublic void setAttribute(String name, Object value, int scope)
setAttribute in interface javax.portlet.PortletSessionpublic void setMaxInactiveInterval(int arg0)
setMaxInactiveInterval in interface javax.portlet.PortletSessionCopyright © 2017 The Apache Software Foundation. All rights reserved.