Class SessionAccessServiceImpl
java.lang.Object
de.hybris.platform.sap.productconfig.services.impl.SessionAccessServiceImpl
- All Implemented Interfaces:
SessionAccessService
Default implementation of
SessionAccessService-
Field Summary
Fields inherited from interface de.hybris.platform.sap.productconfig.services.SessionAccessService
PRODUCT_CONFIG_SESSION_ATTRIBUTE_CONTAINER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindConfigIdInMap(String configId, Map<String, String> sessionCartEntryConfigurations) getCartEntryForConfigId(String configId) Retrieves cart entry key belonging to a specific config IDgetCartEntryForDraftConfigId(String configId) get cart entry linked to the given draft configurationgetConfigIdForCartEntry(String cartEntryKey) Retrieves config identifier from the session for a given cart entry keygetConfigIdForProduct(String productCode) Get the runtime configuration currently associated with the given productgetDraftConfigIdForCartEntry(String cartEntryKey) gets the config id linked as draft to the given cart entrygetProductForConfigId(String configId) Get the product for the given runtime configuration idprotected SessionService<T> TgetUiStatusForCartEntry(String cartEntryKey) Retrieves object from the session for a given cart entry keygetUiStatusForProduct(String productKey) Retrieves object from the session for a given cart entry keyprotected <T> TgetUiStatusFromSession(String key, boolean forCart, String traceMessage) Retrieves UiStatus from sessionvoidpurge()Purges the entire session (with regards to CPQ artifacts)voidremoveConfigIdForCartEntry(String cartEntryKey) Removes config ID for cart entryvoidremoveConfigIdForProduct(String pCode) Removes the link between product code and runtime configurationvoidremoveDraftConfigIdForCartEntry(String cartEntryKey) Removes draft config ID for cart entryprotected voidremoveProductRelatedSessionArtifacts(String configId) voidremoveSessionArtifactsForCartEntry(String cartEntryId) Removes all session artifacts belonging to a cart entryvoidremoveUiStatusForCartEntry(String cartEntryKey) Removes object for a cart entryvoidremoveUiStatusForProduct(String productKey) Removes object for a productprotected voidremoveUiStatusFromSession(String key, boolean forCart, String traceMessage) Removes UiStatus object from sessionprotected ProductConfigSessionAttributeContainerprotected ProductConfigSessionAttributeContainerretrieveSessionAttributeContainer(boolean createLazy) voidsetConfigIdForCartEntry(String cartEntryKey, String configId) Stores configuration ID for a cart entry key into the sessionvoidsetConfigIdForProduct(String productCode, String configId) Links a product code with a given runtime configurationvoidsetDraftConfigIdForCartEntry(String cartEntryKey, String configId) Stores darfat configuration ID for a cart entry key into the sessionvoidsetSessionService(SessionService sessionService) voidsetUiStatusForCartEntry(String cartEntryKey, Object uiStatus) Stores object for a cart entry key into the sessionvoidsetUiStatusForProduct(String productKey, Object uiStatus) Stores object for a product key into the sessionprotected voidsetUiStatusIntoSession(String key, Object uiStatus, boolean forCart, String traceMessage) Puts UiStatus object into session
-
Constructor Details
-
SessionAccessServiceImpl
public SessionAccessServiceImpl()
-
-
Method Details
-
setConfigIdForCartEntry
Description copied from interface:SessionAccessServiceStores configuration ID for a cart entry key into the session- Specified by:
setConfigIdForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- String representation of the cart entry primary keyconfigId- ID of a runtime configuration object
-
getConfigIdForCartEntry
Description copied from interface:SessionAccessServiceRetrieves config identifier from the session for a given cart entry key- Specified by:
getConfigIdForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- String representation of the cart entry primary key- Returns:
- ID of a runtime configuration object
-
getDraftConfigIdForCartEntry
Description copied from interface:SessionAccessServicegets the config id linked as draft to the given cart entry- Specified by:
getDraftConfigIdForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- cart entry key- Returns:
- config Id
-
getUiStatusForCartEntry
Description copied from interface:SessionAccessServiceRetrieves object from the session for a given cart entry key- Specified by:
getUiStatusForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- String representation of the cart entry primary key- Returns:
- ui status for cart entry
-
getUiStatusFromSession
Retrieves UiStatus from session- Parameters:
key- Key of object in mapforCart- true for UI Statuses for cart entries, false for catalog productstraceMessage- Post fix of the trace message which identifies the type of key- Returns:
- UiStatus
-
setUiStatusForCartEntry
Description copied from interface:SessionAccessServiceStores object for a cart entry key into the session- Specified by:
setUiStatusForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- String representation of the cart entry primary keyuiStatus- ui status for cart entry
-
getUiStatusForProduct
Description copied from interface:SessionAccessServiceRetrieves object from the session for a given cart entry key- Specified by:
getUiStatusForProductin interfaceSessionAccessService- Parameters:
productKey- Product key- Returns:
- ui status for product
-
setUiStatusForProduct
Description copied from interface:SessionAccessServiceStores object for a product key into the session- Specified by:
setUiStatusForProductin interfaceSessionAccessService- Parameters:
productKey- Product keyuiStatus- ui status for product
-
setUiStatusIntoSession
protected void setUiStatusIntoSession(String key, Object uiStatus, boolean forCart, String traceMessage) Puts UiStatus object into session- Parameters:
key- Key for objectuiStatus- The object we want to store in sessionforCart- true for UI Statuses for cart entries, false for catalog productstraceMessage- Post fix of the trace message which identifies the type of key
-
removeUiStatusForCartEntry
Description copied from interface:SessionAccessServiceRemoves object for a cart entry- Specified by:
removeUiStatusForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- String representation of the cart entry primary key
-
removeUiStatusFromSession
Removes UiStatus object from session- Parameters:
key- Key for objectforCart- true for UI Statuses for cart entries, false for catalog productstraceMessage- Post fix of the trace message which identifies the type of key
-
removeUiStatusForProduct
Description copied from interface:SessionAccessServiceRemoves object for a product- Specified by:
removeUiStatusForProductin interfaceSessionAccessService- Parameters:
productKey- Product key
-
getCartEntryForConfigId
Description copied from interface:SessionAccessServiceRetrieves cart entry key belonging to a specific config ID- Specified by:
getCartEntryForConfigIdin interfaceSessionAccessService- Parameters:
configId- id of the configuration- Returns:
- String representation of the cart entry primary key
-
getCartEntryForDraftConfigId
Description copied from interface:SessionAccessServiceget cart entry linked to the given draft configuration- Specified by:
getCartEntryForDraftConfigIdin interfaceSessionAccessService- Parameters:
configId- runtime configuration id- Returns:
- cartItemHandle
-
findConfigIdInMap
-
removeSessionArtifactsForCartEntry
Description copied from interface:SessionAccessServiceRemoves all session artifacts belonging to a cart entry- Specified by:
removeSessionArtifactsForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryId- cart entry key
-
removeProductRelatedSessionArtifacts
-
removeConfigIdForCartEntry
Description copied from interface:SessionAccessServiceRemoves config ID for cart entry- Specified by:
removeConfigIdForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- cart entry key
-
getCartEntryConfigCache
- Returns:
- Map: Configuration ID's for cart entry
-
getCartEntryDraftConfigCache
-
retrieveSessionAttributeContainer
-
retrieveSessionAttributeContainer
protected ProductConfigSessionAttributeContainer retrieveSessionAttributeContainer(boolean createLazy) -
purge
public void purge()Description copied from interface:SessionAccessServicePurges the entire session (with regards to CPQ artifacts)- Specified by:
purgein interfaceSessionAccessService
-
setSessionService
- Parameters:
sessionService- the sessionService to set
-
getSessionService
-
getConfigIdForProduct
Description copied from interface:SessionAccessServiceGet the runtime configuration currently associated with the given product- Specified by:
getConfigIdForProductin interfaceSessionAccessService- Parameters:
productCode- code of product, for which the link to the runtime configuration should be returned- Returns:
- runtime configuration id that is currently linked to the given product
-
setConfigIdForProduct
Description copied from interface:SessionAccessServiceLinks a product code with a given runtime configuration- Specified by:
setConfigIdForProductin interfaceSessionAccessService- Parameters:
productCode- code of product, for which the link to the runtime configuration should be createdconfigId- runtime configuration id
-
removeConfigIdForProduct
Description copied from interface:SessionAccessServiceRemoves the link between product code and runtime configuration- Specified by:
removeConfigIdForProductin interfaceSessionAccessService- Parameters:
pCode- code of product, for which the link to the runtime configuration should be deleted
-
setDraftConfigIdForCartEntry
Description copied from interface:SessionAccessServiceStores darfat configuration ID for a cart entry key into the session- Specified by:
setDraftConfigIdForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- String representation of the cart entry primary keyconfigId- ID of a runtime configuration object
-
removeDraftConfigIdForCartEntry
Description copied from interface:SessionAccessServiceRemoves draft config ID for cart entry- Specified by:
removeDraftConfigIdForCartEntryin interfaceSessionAccessService- Parameters:
cartEntryKey- cart entry key
-
getProductForConfigId
Description copied from interface:SessionAccessServiceGet the product for the given runtime configuration id- Specified by:
getProductForConfigIdin interfaceSessionAccessService- Parameters:
configId- configuration id- Returns:
- product code if link is present, otherwise null
-