Class MockSession
- java.lang.Object
-
- de.hybris.platform.servicelayer.session.impl.DefaultSession
-
- de.hybris.platform.servicelayer.session.MockSession
-
- All Implemented Interfaces:
Session
,java.io.Serializable
public class MockSession extends DefaultSession
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MockSession()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.util.Map<java.lang.String,T>
getAllAttributes()
<T> T
getAttribute(java.lang.String name)
Returns for the given session attribute name the valuejava.lang.String
getSessionId()
void
setAttribute(java.lang.String name, java.lang.Object value)
Sets the given value Object to the Session as attribute with the given name-
Methods inherited from class de.hybris.platform.servicelayer.session.impl.DefaultSession
equals, getJaloSession, hashCode, init, removeAttribute, setJaloSession
-
-
-
-
Method Detail
-
getSessionId
public java.lang.String getSessionId()
- Specified by:
getSessionId
in interfaceSession
- Overrides:
getSessionId
in classDefaultSession
- Returns:
- the id of the session
-
getAllAttributes
public <T> java.util.Map<java.lang.String,T> getAllAttributes()
- Specified by:
getAllAttributes
in interfaceSession
- Overrides:
getAllAttributes
in classDefaultSession
- Returns:
- a Map with all session attributes
-
getAttribute
public <T> T getAttribute(java.lang.String name)
Description copied from interface:Session
Returns for the given session attribute name the value- Specified by:
getAttribute
in interfaceSession
- Overrides:
getAttribute
in classDefaultSession
- Parameters:
name
- the attribute name- Returns:
null
if no attribute with the given name is stored in the session
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object value)
Description copied from interface:Session
Sets the given value Object to the Session as attribute with the given name- Specified by:
setAttribute
in interfaceSession
- Overrides:
setAttribute
in classDefaultSession
- Parameters:
name
- the name of the attributevalue
- the value to be set
-
-