public class DefaultPunchOutSessionService extends java.lang.Object implements PunchOutSessionService
PunchOutSessionService based on the use of SessionService.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
PUNCHOUT_SESSION_ID |
protected static java.lang.String |
PUNCHOUT_SESSION_KEY |
| Constructor and Description |
|---|
DefaultPunchOutSessionService() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(PunchOutSession punchoutSession)
Activates a
PunchOutSession for the current user session. |
protected java.util.Date |
calculateCutOutTime(java.util.Date sessionCreationDate) |
protected java.lang.String |
generatePunchoutSessionId() |
CartService |
getCartService() |
ConfigurationService |
getConfigurationService() |
PunchOutSession |
getCurrentPunchOutSession()
Retrieves the currently loaded
PunchOutSession. |
java.lang.String |
getCurrentPunchOutSessionId()
Gets the currently active punchOut session.
|
FlexibleSearchService |
getFlexibleSearchService() |
ModelService |
getModelService() |
SessionService |
getSessionService() |
PunchOutSession |
loadPunchOutSession(java.lang.String punchoutSessionId)
Loads and activates a
PunchOutSession by its ID. |
StoredPunchOutSessionModel |
loadStoredPunchOutSessionModel(java.lang.String punchoutSessionId)
Loads a given
StoredPunchOutSessionModel by sid. |
void |
saveCurrentPunchoutSession()
Saves current
StoredPunchOutSessionModel in the db. |
void |
setCartService(CartService cartService) |
void |
setConfigurationService(ConfigurationService configurationService) |
void |
setCurrentCartFromPunchOutSetup(java.lang.String punchoutSessionId)
Set the cart for the current session using the cart saved in a given punch out session.
|
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
void |
setModelService(ModelService modelService) |
void |
setSessionService(SessionService sessionService) |
protected static final java.lang.String PUNCHOUT_SESSION_KEY
protected static final java.lang.String PUNCHOUT_SESSION_ID
public void activate(PunchOutSession punchoutSession)
PunchOutSessionServicePunchOutSession for the current user session.activate in interface PunchOutSessionServicepunchoutSession - the new punchOut sessionpublic void saveCurrentPunchoutSession()
PunchOutSessionServiceStoredPunchOutSessionModel in the db.saveCurrentPunchoutSession in interface PunchOutSessionServiceprotected java.lang.String generatePunchoutSessionId()
public StoredPunchOutSessionModel loadStoredPunchOutSessionModel(java.lang.String punchoutSessionId)
PunchOutSessionServiceStoredPunchOutSessionModel by sid.loadStoredPunchOutSessionModel in interface PunchOutSessionServicepunchoutSessionId - The sid to search.StoredPunchOutSessionModel, or null if stored session does not exists.public PunchOutSession loadPunchOutSession(java.lang.String punchoutSessionId)
PunchOutSessionServicePunchOutSession by its ID.loadPunchOutSession in interface PunchOutSessionServicepunchoutSessionId - the punchOut session IDpublic void setCurrentCartFromPunchOutSetup(java.lang.String punchoutSessionId)
PunchOutSessionServicesetCurrentCartFromPunchOutSetup in interface PunchOutSessionServicepunchoutSessionId - The punch out session ID.protected java.util.Date calculateCutOutTime(java.util.Date sessionCreationDate)
sessionCreationDate - the creating time of the punchout sessionpublic java.lang.String getCurrentPunchOutSessionId()
PunchOutSessionServicegetCurrentPunchOutSessionId in interface PunchOutSessionServicepublic PunchOutSession getCurrentPunchOutSession()
PunchOutSessionServicePunchOutSession.getCurrentPunchOutSession in interface PunchOutSessionServicenull if none has been loaded yetpublic SessionService getSessionService()
public void setSessionService(SessionService sessionService)
public ConfigurationService getConfigurationService()
public void setConfigurationService(ConfigurationService configurationService)
public FlexibleSearchService getFlexibleSearchService()
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
public CartService getCartService()
public void setCartService(CartService cartService)
public ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.