Class CPSCacheKeyGeneratorImpl
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.runtime.cps.cache.impl.CPSCacheKeyGeneratorImpl
-
- All Implemented Interfaces:
CPSCacheKeyGenerator
public class CPSCacheKeyGeneratorImpl extends java.lang.Object implements CPSCacheKeyGenerator
Default implementation ofCPSCacheKeyGenerator
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCONFIGRATION_SERVICE_IDprotected static java.lang.StringKB_DETERMINATION_SERVICE_IDstatic java.lang.StringKEY_KB_IDKey for accessing the knowledgebase idstatic java.lang.StringKEY_LANGUAGEKey for accessing the languageprotected static java.lang.StringMASTER_DATA_SERVICE_IDprotected static java.lang.StringPRICING_SERVICE_IDprotected static java.lang.StringTYPECODE_COOKIEprotected static java.lang.StringTYPECODE_KNOWLEDGEBASESprotected static java.lang.StringTYPECODE_MASTER_DATAprotected static java.lang.StringTYPECODE_PRICING_DOCUMENT_DATAprotected static java.lang.StringTYPECODE_RUNTIME_CONFIGURATIONprotected static java.lang.StringTYPECODE_VALUE_PRICES
-
Constructor Summary
Constructors Constructor Description CPSCacheKeyGeneratorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductConfigurationCacheKeycreateConfigurationCacheKey(java.lang.String configId)Creates a cache key for the configuration cache regionProductConfigurationCacheKeycreateCookieCacheKey(java.lang.String configId)Creates a cache key for the cookie cache regionProductConfigurationCacheKeycreateKnowledgeBaseHeadersCacheKey(java.lang.String product)Creates a cache key for the knowledgebase headers cache regionProductConfigurationCacheKeycreateMasterDataCacheKey(java.lang.String kbId, java.lang.String lang)Creates a cache key for the master data cache regionProductConfigurationCacheKeycreateValuePricesCacheKey(java.lang.String kbId, java.lang.String pricingProduct)Creates a cache key for the value prices cache regionprotected BaseSiteServicegetBaseSiteService()protected ConsumedDestinationLocatorStrategygetConsumedDestinationLocatorStrategy()protected org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>getCPSServiceParameter(java.lang.String serviceId)protected java.lang.StringgetCurrentBaseSite()protected java.lang.StringgetTenantId()protected ProductConfigurationUserIdProvidergetUserIdProvider()protected java.util.Map<java.lang.String,java.lang.String>retrieveBasicCPSParameters(java.lang.String serviceId)voidsetBaseSiteService(BaseSiteService baseSiteService)voidsetConsumedDestinationLocatorStrategy(ConsumedDestinationLocatorStrategy consumedDestinationLocatorStrategy)voidsetUserIdProvider(ProductConfigurationUserIdProvider userIdProvider)
-
-
-
Field Detail
-
CONFIGRATION_SERVICE_ID
protected static final java.lang.String CONFIGRATION_SERVICE_ID
-
KB_DETERMINATION_SERVICE_ID
protected static final java.lang.String KB_DETERMINATION_SERVICE_ID
-
MASTER_DATA_SERVICE_ID
protected static final java.lang.String MASTER_DATA_SERVICE_ID
-
PRICING_SERVICE_ID
protected static final java.lang.String PRICING_SERVICE_ID
-
TYPECODE_COOKIE
protected static final java.lang.String TYPECODE_COOKIE
- See Also:
- Constant Field Values
-
TYPECODE_MASTER_DATA
protected static final java.lang.String TYPECODE_MASTER_DATA
- See Also:
- Constant Field Values
-
TYPECODE_KNOWLEDGEBASES
protected static final java.lang.String TYPECODE_KNOWLEDGEBASES
- See Also:
- Constant Field Values
-
TYPECODE_PRICING_DOCUMENT_DATA
protected static final java.lang.String TYPECODE_PRICING_DOCUMENT_DATA
- See Also:
- Constant Field Values
-
TYPECODE_VALUE_PRICES
protected static final java.lang.String TYPECODE_VALUE_PRICES
- See Also:
- Constant Field Values
-
TYPECODE_RUNTIME_CONFIGURATION
protected static final java.lang.String TYPECODE_RUNTIME_CONFIGURATION
- See Also:
- Constant Field Values
-
KEY_LANGUAGE
public static final java.lang.String KEY_LANGUAGE
Key for accessing the language- See Also:
- Constant Field Values
-
KEY_KB_ID
public static final java.lang.String KEY_KB_ID
Key for accessing the knowledgebase id- See Also:
- Constant Field Values
-
-
Method Detail
-
createMasterDataCacheKey
public ProductConfigurationCacheKey createMasterDataCacheKey(java.lang.String kbId, java.lang.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 ProductConfigurationCacheKey createKnowledgeBaseHeadersCacheKey(java.lang.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 ProductConfigurationCacheKey createCookieCacheKey(java.lang.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
-
createValuePricesCacheKey
public ProductConfigurationCacheKey createValuePricesCacheKey(java.lang.String kbId, java.lang.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 ProductConfigurationCacheKey createConfigurationCacheKey(java.lang.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
-
retrieveBasicCPSParameters
protected java.util.Map<java.lang.String,java.lang.String> retrieveBasicCPSParameters(java.lang.String serviceId)
-
getTenantId
protected java.lang.String getTenantId()
-
getCurrentBaseSite
protected java.lang.String getCurrentBaseSite()
-
getCPSServiceParameter
protected org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> getCPSServiceParameter(java.lang.String serviceId)
-
getBaseSiteService
protected BaseSiteService getBaseSiteService()
-
setBaseSiteService
public void setBaseSiteService(BaseSiteService baseSiteService)
-
getUserIdProvider
protected ProductConfigurationUserIdProvider getUserIdProvider()
-
setUserIdProvider
public void setUserIdProvider(ProductConfigurationUserIdProvider userIdProvider)
-
getConsumedDestinationLocatorStrategy
protected ConsumedDestinationLocatorStrategy getConsumedDestinationLocatorStrategy()
-
setConsumedDestinationLocatorStrategy
public void setConsumedDestinationLocatorStrategy(ConsumedDestinationLocatorStrategy consumedDestinationLocatorStrategy)
- Parameters:
consumedDestinationLocatorStrategy- the consumedDestinationLocatorStrategy to set
-
-