Package com.enonic.xp.session
Class SessionMock
- java.lang.Object
-
- com.enonic.xp.session.SessionMock
-
- All Implemented Interfaces:
MutableAttributes
,ScopeAttributes
,Session
public class SessionMock extends Object implements Session
-
-
Constructor Summary
Constructors Constructor Description SessionMock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getAttribute(Class<T> type)
Object
getAttribute(String key)
Map<String,Object>
getAttributes()
SessionKey
getKey()
void
invalidate()
<T> void
removeAttribute(Class<T> type)
void
removeAttribute(String key)
void
setAttribute(String key, Object value)
<T> void
setAttribute(T value)
-
-
-
Method Detail
-
getKey
public SessionKey getKey()
-
getAttribute
public Object getAttribute(String key)
- Specified by:
getAttribute
in interfaceScopeAttributes
-
getAttribute
public <T> T getAttribute(Class<T> type)
- Specified by:
getAttribute
in interfaceScopeAttributes
-
setAttribute
public void setAttribute(String key, Object value)
- Specified by:
setAttribute
in interfaceMutableAttributes
-
setAttribute
public <T> void setAttribute(T value)
- Specified by:
setAttribute
in interfaceMutableAttributes
-
getAttributes
public Map<String,Object> getAttributes()
- Specified by:
getAttributes
in interfaceScopeAttributes
-
removeAttribute
public void removeAttribute(String key)
- Specified by:
removeAttribute
in interfaceMutableAttributes
-
removeAttribute
public <T> void removeAttribute(Class<T> type)
- Specified by:
removeAttribute
in interfaceMutableAttributes
-
invalidate
public void invalidate()
- Specified by:
invalidate
in interfaceSession
-
-