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> TgetAttribute(Class<T> type)ObjectgetAttribute(String key)Map<String,Object>getAttributes()SessionKeygetKey()voidinvalidate()<T> voidremoveAttribute(Class<T> type)voidremoveAttribute(String key)voidsetAttribute(String key, Object value)<T> voidsetAttribute(T value)
-
-
-
Method Detail
-
getKey
public SessionKey getKey()
-
getAttribute
public Object getAttribute(String key)
- Specified by:
getAttributein interfaceScopeAttributes
-
getAttribute
public <T> T getAttribute(Class<T> type)
- Specified by:
getAttributein interfaceScopeAttributes
-
setAttribute
public void setAttribute(String key, Object value)
- Specified by:
setAttributein interfaceMutableAttributes
-
setAttribute
public <T> void setAttribute(T value)
- Specified by:
setAttributein interfaceMutableAttributes
-
getAttributes
public Map<String,Object> getAttributes()
- Specified by:
getAttributesin interfaceScopeAttributes
-
removeAttribute
public void removeAttribute(String key)
- Specified by:
removeAttributein interfaceMutableAttributes
-
removeAttribute
public <T> void removeAttribute(Class<T> type)
- Specified by:
removeAttributein interfaceMutableAttributes
-
invalidate
public void invalidate()
- Specified by:
invalidatein interfaceSession
-
-