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

public class CPSCacheImpl extends Object implements CPSCache
Default implementation of CPSCache. Stores related artifacts in the hybris cache.
  • Constructor Details

    • CPSCacheImpl

      public CPSCacheImpl()
  • Method Details

    • setValuePricesMap

      public void setValuePricesMap(String kbId, String pricingProduct, Map<CPSMasterDataVariantPriceKey,CPSValuePrice> valuePricesMap)
      Description copied from interface: CPSCache
      Sets ValuePrice into cache
      Specified by:
      setValuePricesMap in interface CPSCache
      Parameters:
      kbId - knowledgebase id
      pricingProduct - productId of the pricing product
      valuePricesMap - map of value prices
    • getValuePricesMap

      public Map<CPSMasterDataVariantPriceKey,CPSValuePrice> getValuePricesMap(String kbId, String pricingProduct)
      Description copied from interface: CPSCache
      Get ValuePrice from cache
      Specified by:
      getValuePricesMap in interface CPSCache
      Parameters:
      kbId - knowledgebase id
      pricingProduct - productId of the pricing product
      Returns:
      map of value prices
    • setCookies

      public void setCookies(String configId, List<String> cookieList)
      Description copied from interface: CPSCache
      Sets cookies per configId
      Specified by:
      setCookies in interface CPSCache
      Parameters:
      configId - ID of runtime configuration
    • setCookies

      public void setCookies(String configId, List<String> cookieList, Map<String,String> contextAttr)
      Description copied from interface: CPSCache
      Sets cookies per configId
      Specified by:
      setCookies in interface CPSCache
      Parameters:
      configId - ID of runtime configuration
      contextAttr - context with cache key components
    • getCookies

      public List<String> getCookies(String configId)
      Specified by:
      getCookies in interface CPSCache
      Returns:
      List of cookies per configId
    • removeCookies

      public void removeCookies(String configId)
      Description copied from interface: CPSCache
      Removes cookies per configId
      Specified by:
      removeCookies in interface CPSCache
    • removeCookies

      public void removeCookies(String configId, Map<String,String> contextAttr)
      Description copied from interface: CPSCache
      Removes cookies per configId
      Specified by:
      removeCookies in interface CPSCache
    • populateCacheKeyContextAttributes

      public void populateCacheKeyContextAttributes(Map<String,String> contextAttr, String clientId)
      Description copied from interface: CPSCache
      Populates the map with all cache key components that depend on the current sessionContext, so a cache key for a given configId can re-created independently of the current session/thread context.
      Specified by:
      populateCacheKeyContextAttributes in interface CPSCache
    • getConfiguration

      public CPSConfiguration getConfiguration(String configId)
      Description copied from interface: CPSCache
      Retrieves the runtime configuration from cache.
      Specified by:
      getConfiguration in interface CPSCache
      Parameters:
      configId - runtime configuration id
      Returns:
      runtime configuration
    • setConfiguration

      public void setConfiguration(String configId, CPSConfiguration configuration)
      Description copied from interface: CPSCache
      Sets the runtime configuration into the cache
      Specified by:
      setConfiguration in interface CPSCache
      Parameters:
      configId - runtime configuration id
      configuration - runtime configuration to be set into cache
    • removeConfiguration

      public void removeConfiguration(String configId)
      Description copied from interface: CPSCache
      Removes the specified configuration from cache
      Specified by:
      removeConfiguration in interface CPSCache
      Parameters:
      configId - runtime configuration id
    • removeConfiguration

      public void removeConfiguration(String configId, Map<String,String> ctxtAttributes)
      Description copied from interface: CPSCache
      Removes the specified configuration from cache
      Specified by:
      removeConfiguration in interface CPSCache
      Parameters:
      configId - runtime configuration id
      ctxtAttributes - context attributes
    • getCookieCache

      protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,List<String>> getCookieCache()
    • setCookieCache

      public void setCookieCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,List<String>> cookieCache)
    • getKeyGenerator

      protected CPSCacheKeyGenerator getKeyGenerator()
    • setKeyGenerator

      public void setKeyGenerator(CPSCacheKeyGenerator keyGenerator)
    • getValuePricesCache

      protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,Map<CPSMasterDataVariantPriceKey,CPSValuePrice>> getValuePricesCache()
    • setValuePricesCache

      public void setValuePricesCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,Map<CPSMasterDataVariantPriceKey,CPSValuePrice>> valuePricesCache)
    • getConfigurationCache

      protected de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,CPSConfiguration> getConfigurationCache()
    • setConfigurationCache

      public void setConfigurationCache(de.hybris.platform.sap.productconfig.runtime.interf.cache.ProductConfigurationCacheAccess<de.hybris.platform.sap.productconfig.runtime.interf.cache.impl.ProductConfigurationCacheKey,CPSConfiguration> configurationCache)