Class SAPMockSession
- java.lang.Object
-
- de.hybris.platform.servicelayer.session.impl.DefaultSession
-
- de.hybris.platform.sap.core.test.session.SAPMockSession
-
- All Implemented Interfaces:
Session,java.io.Serializable
public class SAPMockSession extends DefaultSession
Copy of MockSession enhanced by removeAttribute method.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SAPMockSession()Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.util.Map<java.lang.String,T>getAllAttributes()<T> TgetAttribute(java.lang.String name)Returns for the given session attribute name the valuejava.lang.StringgetSessionId()voidremoveAttribute(java.lang.String name)Removes the given attribute from the current session.voidsetAttribute(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, setJaloSession
-
-
-
-
Method Detail
-
getSessionId
public java.lang.String getSessionId()
- Specified by:
getSessionIdin interfaceSession- Overrides:
getSessionIdin classDefaultSession- Returns:
- the id of the session
-
getAllAttributes
public <T> java.util.Map<java.lang.String,T> getAllAttributes()
- Specified by:
getAllAttributesin interfaceSession- Overrides:
getAllAttributesin classDefaultSession- Returns:
- a Map with all session attributes
-
getAttribute
public <T> T getAttribute(java.lang.String name)
Description copied from interface:SessionReturns for the given session attribute name the value- Specified by:
getAttributein interfaceSession- Overrides:
getAttributein classDefaultSession- Parameters:
name- the attribute name- Returns:
nullif 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:SessionSets the given value Object to the Session as attribute with the given name- Specified by:
setAttributein interfaceSession- Overrides:
setAttributein classDefaultSession- Parameters:
name- the name of the attributevalue- the value to be set
-
removeAttribute
public void removeAttribute(java.lang.String name)
Description copied from interface:SessionRemoves the given attribute from the current session. Do nothing if the attribute doesn't exists in the session.- Specified by:
removeAttributein interfaceSession- Overrides:
removeAttributein classDefaultSession- Parameters:
name- the attribute name
-
-