Class CPSCacheKeyGeneratorImpl

java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.cache.impl.CPSCacheKeyGeneratorImpl
All Implemented Interfaces:
CPSCacheKeyGenerator

public class CPSCacheKeyGeneratorImpl extends Object implements CPSCacheKeyGenerator
Default implementation of CPSCacheKeyGenerator
  • Field Details

  • 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: CPSCacheKeyGenerator
      Creates a cache key for the master data cache region
      Specified by:
      createMasterDataCacheKey in interface CPSCacheKeyGenerator
      Parameters:
      kbId - knowledgebase id
      lang - 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: CPSCacheKeyGenerator
      Creates a cache key for the knowledgebase headers cache region
      Specified by:
      createKnowledgeBaseHeadersCacheKey in interface CPSCacheKeyGenerator
      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: CPSCacheKeyGenerator
      Creates a cache key for the cookie cache region
      Specified by:
      createCookieCacheKey in interface CPSCacheKeyGenerator
      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: CPSCacheKeyGenerator
      Creates a cache key for the cookie cache region. Cache key components provided via context attribute map have precedence.
      Specified by:
      createCookieCacheKey in interface CPSCacheKeyGenerator
      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: CPSCacheKeyGenerator
      Creates a cache key for the value prices cache region
      Specified by:
      createValuePricesCacheKey in interface CPSCacheKeyGenerator
      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: CPSCacheKeyGenerator
      Creates a cache key for the configuration cache region
      Specified by:
      createConfigurationCacheKey in interface CPSCacheKeyGenerator
      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: CPSCacheKeyGenerator
      Creates a cache key for the configuration cache region
      Specified by:
      createConfigurationCacheKey in interface CPSCacheKeyGenerator
      Parameters:
      configId - configuration id
      contextAttr - context attributes
      Returns:
      the created cache key
    • populateCacheKeyContextAttributes

      public void populateCacheKeyContextAttributes(Map<String,String> ctxtAttributes, String serviceId)
      Description copied from interface: CPSCacheKeyGenerator
      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.
      Specified by:
      populateCacheKeyContextAttributes in interface CPSCacheKeyGenerator
      Parameters:
      ctxtAttributes - context attribute map to populate
    • getCurrencyIso

      protected String getCurrencyIso()
    • retrieveBasicCPSParameters

      protected Map<String,String> retrieveBasicCPSParameters(String serviceId)
    • retrieveBasicCPSParametersFromContext

      protected Map<String,String> retrieveBasicCPSParametersFromContext(Map<String,String> contextAttr)
    • getTenantId

      protected String getTenantId()
    • getCurrentBaseSite

      protected String getCurrentBaseSite()
    • getCPSServiceParameter

      protected org.apache.commons.lang3.tuple.Pair<String,String> getCPSServiceParameter(String serviceId)
    • 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()