public class MockPortletSession extends Object implements PortletSession
PortletSession interface.APPLICATION_SCOPE, PORTLET_SCOPE| Constructor and Description |
|---|
MockPortletSession()
Create a new MockPortletSession with a default
MockPortletContext. |
MockPortletSession(PortletContext portletContext)
Create a new MockPortletSession.
|
| Modifier and Type | Method and Description |
|---|---|
void |
access() |
void |
clearAttributes()
Clear all of this session's attributes.
|
protected void |
doClearAttributes(Map<String,Object> attributes) |
Object |
getAttribute(String name) |
Object |
getAttribute(String name,
int scope) |
Map<String,Object> |
getAttributeMap() |
Map<String,Object> |
getAttributeMap(int scope) |
Enumeration<String> |
getAttributeNames() |
Enumeration<String> |
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) |
public MockPortletSession()
MockPortletContext.MockPortletContextpublic MockPortletSession(PortletContext portletContext)
portletContext - the PortletContext that the session runs inpublic Object getAttribute(String name)
getAttribute in interface PortletSessionpublic Object getAttribute(String name, int scope)
getAttribute in interface PortletSessionpublic Enumeration<String> getAttributeNames()
getAttributeNames in interface PortletSessionpublic Enumeration<String> getAttributeNames(int scope)
getAttributeNames in interface PortletSessionpublic long getCreationTime()
getCreationTime in interface PortletSessionpublic String getId()
getId in interface PortletSessionpublic void access()
public long getLastAccessedTime()
getLastAccessedTime in interface PortletSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface PortletSessionpublic void clearAttributes()
public void invalidate()
invalidate in interface PortletSessionpublic boolean isInvalid()
public void setNew(boolean value)
public boolean isNew()
isNew in interface PortletSessionpublic void removeAttribute(String name)
removeAttribute in interface PortletSessionpublic void removeAttribute(String name, int scope)
removeAttribute in interface PortletSessionpublic void setAttribute(String name, Object value)
setAttribute in interface PortletSessionpublic void setAttribute(String name, Object value, int scope)
setAttribute in interface PortletSessionpublic void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface PortletSessionpublic PortletContext getPortletContext()
getPortletContext in interface PortletSessionpublic Map<String,Object> getAttributeMap()
getAttributeMap in interface PortletSessionpublic Map<String,Object> getAttributeMap(int scope)
getAttributeMap in interface PortletSession