Class MockSessionService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.session.impl.DefaultSessionService
de.hybris.platform.servicelayer.session.MockSessionService
- All Implemented Interfaces:
SessionService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTONested classes/interfaces inherited from interface de.hybris.platform.servicelayer.session.SessionService
SessionService.SessionAttributeLoader<T> -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseSession(Session session) Closed the givenSessionCreates a newSession.Must be overwritten! Use <lookup-method> in spring.Executes the givenSessionExecutionBodyin a localSessionContextexecuteInLocalView(SessionExecutionBody body, UserModel model) Executes the givenSessionExecutionBodyin a localSessionContextand sets session user to given UserModel.<T> TgetOrLoadAttribute(String name, SessionService.SessionAttributeLoader<T> loader) Returns for the given name the content which is stored in the currentSessionor loads a new value atomically by calling the loader instance.getSession(String id) get session by Session idMethods inherited from class de.hybris.platform.servicelayer.session.impl.DefaultSessionService
closeCurrentSession, executeInLocalViewWithParams, getAllAttributes, getAttribute, getBoundSession, getRawSession, hasCurrentSession, removeAttribute, setAttribute, setModelServiceMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
MockSessionService
public MockSessionService()
-
-
Method Details
-
getCurrentSession
- Specified by:
getCurrentSessionin interfaceSessionService- Overrides:
getCurrentSessionin classDefaultSessionService- Returns:
- the current
Session
-
getSession
get session by Session id- Specified by:
getSessionin interfaceSessionService- Overrides:
getSessionin classDefaultSessionService
-
createNewSession
Description copied from interface:SessionServiceCreates a newSession.- Specified by:
createNewSessionin interfaceSessionService- Overrides:
createNewSessionin classDefaultSessionService
-
executeInLocalView
Description copied from interface:SessionServiceExecutes the givenSessionExecutionBodyin a localSessionContext- Specified by:
executeInLocalViewin interfaceSessionService- Overrides:
executeInLocalViewin classDefaultSessionService
-
closeSession
Description copied from interface:SessionServiceClosed the givenSession- Specified by:
closeSessionin interfaceSessionService- Overrides:
closeSessionin classDefaultSessionService- Parameters:
session- the session which will be closed
-
createSession
Description copied from class:DefaultSessionServiceMust be overwritten! Use <lookup-method> in spring.- Overrides:
createSessionin classDefaultSessionService
-
executeInLocalView
Description copied from interface:SessionServiceExecutes the givenSessionExecutionBodyin a localSessionContextand sets session user to given UserModel.- Specified by:
executeInLocalViewin interfaceSessionService- Overrides:
executeInLocalViewin classDefaultSessionService
-
getOrLoadAttribute
Description copied from interface:SessionServiceReturns for the given name the content which is stored in the currentSessionor loads a new value atomically by calling the loader instance.- Specified by:
getOrLoadAttributein interfaceSessionService- Overrides:
getOrLoadAttributein classDefaultSessionService
-