Class KnowledgeBaseHeadersCacheValueLoader
- java.lang.Object
-
- de.hybris.platform.sap.productconfig.runtime.cps.cache.impl.KnowledgeBaseHeadersCacheValueLoader
-
- All Implemented Interfaces:
CacheValueLoader<java.util.List<CPSMasterDataKBHeaderInfo>>
public class KnowledgeBaseHeadersCacheValueLoader extends java.lang.Object implements CacheValueLoader<java.util.List<CPSMasterDataKBHeaderInfo>>
Queries the CPS kb determination service to fill the CPS KB Header Info cache.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPASSPORT_GET_KB
-
Constructor Summary
Constructors Constructor Description KnowledgeBaseHeadersCacheValueLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ApiRegistryClientServicegetApiRegistryClientService()protected KbDeterminationClientBasegetClient()protected java.util.List<CPSMasterDataKBHeaderInfo>getKbHeadersFromService(java.lang.String product)protected com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()protected ProductConfigurationPassportServicegetProductConfigurationPassportService()protected rx.SchedulergetScheduler()java.util.List<CPSMasterDataKBHeaderInfo>load(CacheKey paramCacheKey)Used by cache region to load missing value.
This method does not have to be thread safe.
If CacheValueLoadException thrown unit is not added to cache.voidsetApiRegistryClientService(ApiRegistryClientService apiRegistryClientService)voidsetClient(KbDeterminationClientBase newClient)Set Charon client from outside (only used for testing)voidsetProductConfigurationPassportService(ProductConfigurationPassportService productConfigurationPassportService)protected voidtraceJsonRequestBody(java.lang.String prefix, java.lang.Object obj)
-
-
-
Field Detail
-
PASSPORT_GET_KB
public static final java.lang.String PASSPORT_GET_KB
- See Also:
- Constant Field Values
-
-
Method Detail
-
getApiRegistryClientService
protected ApiRegistryClientService getApiRegistryClientService()
-
setApiRegistryClientService
public void setApiRegistryClientService(ApiRegistryClientService apiRegistryClientService)
- Parameters:
apiRegistryClientService- the apiRegistryClientService to set
-
load
public java.util.List<CPSMasterDataKBHeaderInfo> load(CacheKey paramCacheKey)
Description copied from interface:CacheValueLoaderUsed by cache region to load missing value.
This method does not have to be thread safe.
If CacheValueLoadException thrown unit is not added to cache.- Specified by:
loadin interfaceCacheValueLoader<java.util.List<CPSMasterDataKBHeaderInfo>>
-
getKbHeadersFromService
protected java.util.List<CPSMasterDataKBHeaderInfo> getKbHeadersFromService(java.lang.String product)
-
getClient
protected KbDeterminationClientBase getClient()
-
setClient
public void setClient(KbDeterminationClientBase newClient)
Set Charon client from outside (only used for testing)- Parameters:
newClient-
-
getScheduler
protected rx.Scheduler getScheduler()
-
traceJsonRequestBody
protected void traceJsonRequestBody(java.lang.String prefix, java.lang.Object obj)
-
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
setProductConfigurationPassportService
public void setProductConfigurationPassportService(ProductConfigurationPassportService productConfigurationPassportService)
-
getProductConfigurationPassportService
protected ProductConfigurationPassportService getProductConfigurationPassportService()
-
-