Class CPSCacheKeyGeneratorImpl
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.cache.impl.CPSCacheKeyGeneratorImpl
- All Implemented Interfaces:
CPSCacheKeyGenerator
Default implementation of
CPSCacheKeyGenerator-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringstatic final StringKey for accessing the currencystatic final StringKey for accessing the knowledgebase idstatic final StringKey for accessing the languageprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionCPSCacheKeyGeneratorImpl(de.hybris.platform.site.BaseSiteService baseSiteService, de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationUserIdProvider userIdProvider, de.hybris.platform.apiregistryservices.strategies.ConsumedDestinationLocatorStrategy consumedDestinationLocatorStrategy, de.hybris.platform.servicelayer.i18n.CommonI18NService i18nService) -
Method Summary
Modifier and TypeMethodDescriptionde.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKeycreateConfigurationCacheKey(String configId) Creates a cache key for the configuration cache regionde.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKeycreateConfigurationCacheKey(String configId, Map<String, String> contextAttr) Creates a cache key for the configuration cache regionde.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKeycreateCookieCacheKey(String configId) Creates a cache key for the cookie cache regionde.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKeycreateCookieCacheKey(String configId, Map<String, String> contextAttr) Creates a cache key for the cookie cache region.de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKeycreateKnowledgeBaseHeadersCacheKey(String product) Creates a cache key for the knowledgebase headers cache regionde.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKeycreateMasterDataCacheKey(String kbId, String lang) Creates a cache key for the master data cache regionde.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKeycreateValuePricesCacheKey(String kbId, String pricingProduct) Creates a cache key for the value prices cache regionprotected de.hybris.platform.site.BaseSiteServiceprotected de.hybris.platform.apiregistryservices.strategies.ConsumedDestinationLocatorStrategygetCPSServiceParameter(String serviceId) protected Stringprotected Stringprotected de.hybris.platform.servicelayer.i18n.CommonI18NServiceprotected Stringprotected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationUserIdProvidervoidpopulateCacheKeyContextAttributes(Map<String, String> ctxtAttributes, String serviceId) Populates the map with all cache key components that depend on the current sessionContext, so a cache key for a given configId can be re-created independently of the current session/thread context.retrieveBasicCPSParameters(String serviceId) retrieveBasicCPSParametersFromContext(Map<String, String> contextAttr)
-
Field Details
-
KEY_LANGUAGE
Key for accessing the language- See Also:
-
KEY_CURRENCY
Key for accessing the currency- See Also:
-
KEY_KB_ID
Key for accessing the knowledgebase id- See Also:
-
KEY_TENANT_ID
- See Also:
-
CONFIGRATION_SERVICE_ID
-
KB_DETERMINATION_SERVICE_ID
-
MASTER_DATA_SERVICE_ID
-
PRICING_SERVICE_ID
-
TYPECODE_COOKIE
- See Also:
-
TYPECODE_MASTER_DATA
- See Also:
-
TYPECODE_KNOWLEDGEBASES
- See Also:
-
TYPECODE_PRICING_DOCUMENT_DATA
- See Also:
-
TYPECODE_VALUE_PRICES
- See Also:
-
TYPECODE_RUNTIME_CONFIGURATION
- See Also:
-
-
Constructor Details
-
CPSCacheKeyGeneratorImpl
public CPSCacheKeyGeneratorImpl(de.hybris.platform.site.BaseSiteService baseSiteService, de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationUserIdProvider userIdProvider, de.hybris.platform.apiregistryservices.strategies.ConsumedDestinationLocatorStrategy consumedDestinationLocatorStrategy, de.hybris.platform.servicelayer.i18n.CommonI18NService i18nService)
-
-
Method Details
-
createMasterDataCacheKey
public de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey createMasterDataCacheKey(String kbId, String lang) Description copied from interface:CPSCacheKeyGeneratorCreates a cache key for the master data cache region- Specified by:
createMasterDataCacheKeyin interfaceCPSCacheKeyGenerator- Parameters:
kbId- knowledgebase idlang- language- Returns:
- the created cache key
-
createKnowledgeBaseHeadersCacheKey
public de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey createKnowledgeBaseHeadersCacheKey(String product) Description copied from interface:CPSCacheKeyGeneratorCreates a cache key for the knowledgebase headers cache region- Specified by:
createKnowledgeBaseHeadersCacheKeyin interfaceCPSCacheKeyGenerator- Parameters:
product- product for which knowledgebases are looked up- Returns:
- the created cache key
-
createCookieCacheKey
public de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey createCookieCacheKey(String configId) Description copied from interface:CPSCacheKeyGeneratorCreates a cache key for the cookie cache region- Specified by:
createCookieCacheKeyin interfaceCPSCacheKeyGenerator- Parameters:
configId- configuration runtime id- Returns:
- the created cache key
-
createCookieCacheKey
public de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey createCookieCacheKey(String configId, Map<String, String> contextAttr) Description copied from interface:CPSCacheKeyGeneratorCreates a cache key for the cookie cache region. Cache key components provided via context attribute map have precedence.- Specified by:
createCookieCacheKeyin interfaceCPSCacheKeyGenerator- Parameters:
configId- configuration runtime id- Returns:
- the created cache key
-
createValuePricesCacheKey
public de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey createValuePricesCacheKey(String kbId, String pricingProduct) Description copied from interface:CPSCacheKeyGeneratorCreates a cache key for the value prices cache region- Specified by:
createValuePricesCacheKeyin interfaceCPSCacheKeyGenerator- Parameters:
kbId- knowledgebase id for which all value prices are calculated- Returns:
- the created cache key
-
createConfigurationCacheKey
public de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey createConfigurationCacheKey(String configId) Description copied from interface:CPSCacheKeyGeneratorCreates a cache key for the configuration cache region- Specified by:
createConfigurationCacheKeyin interfaceCPSCacheKeyGenerator- Parameters:
configId- configuration id- Returns:
- the created cache key
-
createConfigurationCacheKey
public de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey createConfigurationCacheKey(String configId, Map<String, String> contextAttr) Description copied from interface:CPSCacheKeyGeneratorCreates a cache key for the configuration cache region- Specified by:
createConfigurationCacheKeyin interfaceCPSCacheKeyGenerator- Parameters:
configId- configuration idcontextAttr- context attributes- Returns:
- the created cache key
-
populateCacheKeyContextAttributes
Description copied from interface:CPSCacheKeyGeneratorPopulates the map with all cache key components that depend on the current sessionContext, so a cache key for a given configId can be re-created independently of the current session/thread context.- Specified by:
populateCacheKeyContextAttributesin interfaceCPSCacheKeyGenerator- Parameters:
ctxtAttributes- context attribute map to populate
-
getCurrencyIso
-
retrieveBasicCPSParameters
-
retrieveBasicCPSParametersFromContext
-
getTenantId
-
getCurrentBaseSite
-
getCPSServiceParameter
-
getBaseSiteService
protected de.hybris.platform.site.BaseSiteService getBaseSiteService() -
getUserIdProvider
protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationUserIdProvider getUserIdProvider() -
getConsumedDestinationLocatorStrategy
protected de.hybris.platform.apiregistryservices.strategies.ConsumedDestinationLocatorStrategy getConsumedDestinationLocatorStrategy() -
getI18NService
protected de.hybris.platform.servicelayer.i18n.CommonI18NService getI18NService()
-