public class MockPortletSession
extends java.lang.Object
implements javax.portlet.PortletSession
PortletSession interface.| Constructor and Description |
|---|
MockPortletSession()
Create a new MockPortletSession with a default
MockPortletContext. |
MockPortletSession(javax.portlet.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(java.util.Map<java.lang.String,java.lang.Object> attributes) |
java.lang.Object |
getAttribute(java.lang.String name) |
java.lang.Object |
getAttribute(java.lang.String name,
int scope) |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributeMap() |
java.util.Map<java.lang.String,java.lang.Object> |
getAttributeMap(int scope) |
java.util.Enumeration<java.lang.String> |
getAttributeNames() |
java.util.Enumeration<java.lang.String> |
getAttributeNames(int scope) |
long |
getCreationTime() |
java.lang.String |
getId() |
long |
getLastAccessedTime() |
int |
getMaxInactiveInterval() |
javax.portlet.PortletContext |
getPortletContext() |
void |
invalidate() |
boolean |
isInvalid() |
boolean |
isNew() |
void |
removeAttribute(java.lang.String name) |
void |
removeAttribute(java.lang.String name,
int scope) |
void |
setAttribute(java.lang.String name,
java.lang.Object value) |
void |
setAttribute(java.lang.String name,
java.lang.Object value,
int scope) |
void |
setMaxInactiveInterval(int interval) |
void |
setNew(boolean value) |
public MockPortletSession()
MockPortletContext.MockPortletContextpublic MockPortletSession(javax.portlet.PortletContext portletContext)
portletContext - the PortletContext that the session runs inpublic void access()
public void clearAttributes()
public java.lang.Object getAttribute(java.lang.String name)
getAttribute in interface javax.portlet.PortletSessionpublic java.lang.Object getAttribute(java.lang.String name,
int scope)
getAttribute in interface javax.portlet.PortletSessionpublic java.util.Map<java.lang.String,java.lang.Object> getAttributeMap()
getAttributeMap in interface javax.portlet.PortletSessionpublic java.util.Map<java.lang.String,java.lang.Object> getAttributeMap(int scope)
getAttributeMap in interface javax.portlet.PortletSessionpublic java.util.Enumeration<java.lang.String> getAttributeNames()
getAttributeNames in interface javax.portlet.PortletSessionpublic java.util.Enumeration<java.lang.String> getAttributeNames(int scope)
getAttributeNames in interface javax.portlet.PortletSessionpublic long getCreationTime()
getCreationTime in interface javax.portlet.PortletSessionpublic java.lang.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 isInvalid()
public boolean isNew()
isNew in interface javax.portlet.PortletSessionpublic void removeAttribute(java.lang.String name)
removeAttribute in interface javax.portlet.PortletSessionpublic void removeAttribute(java.lang.String name,
int scope)
removeAttribute in interface javax.portlet.PortletSessionpublic void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in interface javax.portlet.PortletSessionpublic void setAttribute(java.lang.String name,
java.lang.Object value,
int scope)
setAttribute in interface javax.portlet.PortletSessionpublic void setMaxInactiveInterval(int interval)
setMaxInactiveInterval in interface javax.portlet.PortletSessionpublic void setNew(boolean value)
protected void doClearAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Copyright © 2020 Liferay, Inc.. All Rights Reserved.