Class ConfigurationMasterDataServiceImpl
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.masterdata.service.impl.ConfigurationMasterDataServiceImpl
- All Implemented Interfaces:
ConfigurationMasterDataService
public class ConfigurationMasterDataServiceImpl
extends Object
implements ConfigurationMasterDataService
Default implementation of
ConfigurationMasterDataService. Accesses a hybris cache via
MasterDataCacheAccessService for providing configuration related master data-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MasterDataCacheAccessServicegetCharacteristic(String kbId, String characteristicId) Gets localised master data for characteristicprotected StringgetFallbackMasterData(String kbId) Get fallback master data by KB id if fallback locale is maintained for current locale and fallback is enabled.getGroupCharacteristicIDs(String kbId, String itemKey, String itemType, String groupId) Gets characteristic ids for group.getGroupName(String kbId, String itemKey, String itemType, String groupId) Gets localised name for group.protected de.hybris.platform.servicelayer.i18n.I18NServicegetItemName(String kbId, String id, String type) Gets localised name for itemgetKbBuildNumber(String kbId) Retrieves the build number for the specified knowledgebase idgetMasterData(String kbId) Get master data by KB idprotected MasterDataContainerResolvergetPossibleValueIds(String kbId, String characteristicId) Get all possible value ids for a given characteristicgetSpecificPossibleValueIds(String kbId, String productId, String itemType, String characteristicId) Get all specific (that have a variant condition) possible value ids for a given characteristic.getValueDescription(String kbId, String characteristicId, String valueId) Gets localised description for valuegetValueName(String kbId, String characteristicId, String valueId) Gets localised name for valuegetValuePricingKey(String kbId, String productId, String characteristicId, String valueId) Get pricing key for valuebooleanisCharacteristicNumeric(String kbId, String csticId) Checks if a characteristic is numericbooleanisProductMultilevel(String kbId, String id) Gives information whether product is multilevelvoidremoveCachedKb(String kbId) Removes the knowledgebase from the hybris cache in order to force a reload from servicevoidsetCacheAccessService(MasterDataCacheAccessService cacheAccessService) voidsetI18NService(de.hybris.platform.servicelayer.i18n.I18NService i18nService) voidsetMasterDataResolver(MasterDataContainerResolver masterDataResolver)
-
Constructor Details
-
ConfigurationMasterDataServiceImpl
public ConfigurationMasterDataServiceImpl()
-
-
Method Details
-
getMasterData
Description copied from interface:ConfigurationMasterDataServiceGet master data by KB id- Specified by:
getMasterDatain interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebase- Returns:
- knowledgebase data for the given id
-
getFallbackMasterData
Description copied from interface:ConfigurationMasterDataServiceGet fallback master data by KB id if fallback locale is maintained for current locale and fallback is enabled. Otherwise returns null.- Specified by:
getFallbackMasterDatain interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebase- Returns:
- fallback knowledgebase data for the given id
-
getItemName
Description copied from interface:ConfigurationMasterDataServiceGets localised name for item- Specified by:
getItemNamein interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebaseid- id of the itemtype- type of the item- Returns:
- localised name of the item
-
isProductMultilevel
Description copied from interface:ConfigurationMasterDataServiceGives information whether product is multilevel- Specified by:
isProductMultilevelin interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebaseid- id of the product- Returns:
- whether product is multilevel
-
getGroupName
Description copied from interface:ConfigurationMasterDataServiceGets localised name for group. In case we are requesting the group name for class nodes, the class name will be returned as the class node doesn't carry UI groups, except for the 'general' dummy group- Specified by:
getGroupNamein interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebaseitemKey- id of the product or classitemType- EitherSapproductconfigruntimecpsConstants.ITEM_TYPE_MARAorSapproductconfigruntimecpsConstants.ITEM_TYPE_KLAHgroupId- id of the group. Not relevant for class nodes- Returns:
- localised name of the group
-
getCharacteristic
Description copied from interface:ConfigurationMasterDataServiceGets localised master data for characteristic- Specified by:
getCharacteristicin interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebasecharacteristicId- id of the characteristic- Returns:
- localised master data of the characteristic
-
getValueName
Description copied from interface:ConfigurationMasterDataServiceGets localised name for value- Specified by:
getValueNamein interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebasecharacteristicId- id of the characteristicvalueId- id of the value- Returns:
- localised name of the value
-
getValueDescription
Description copied from interface:ConfigurationMasterDataServiceGets localised description for value- Specified by:
getValueDescriptionin interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebasecharacteristicId- id of the characteristicvalueId- id of the value- Returns:
- localised description of the value
-
getGroupCharacteristicIDs
public List<String> getGroupCharacteristicIDs(String kbId, String itemKey, String itemType, String groupId) Description copied from interface:ConfigurationMasterDataServiceGets characteristic ids for group. In case we are requesting the characteristics for class nodes, all characteristic assigned to the class node will be returned as the class node does not carry any group besides the 'general' dummy group- Specified by:
getGroupCharacteristicIDsin interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebaseitemKey- id of the product or a class nodeitemType- EitherSapproductconfigruntimecpsConstants.ITEM_TYPE_MARAorSapproductconfigruntimecpsConstants.ITEM_TYPE_KLAHgroupId- id of the group. Not relevant for class nodes- Returns:
- list of characteristic ids belonging to the group
-
getValuePricingKey
public String getValuePricingKey(String kbId, String productId, String characteristicId, String valueId) Description copied from interface:ConfigurationMasterDataServiceGet pricing key for value- Specified by:
getValuePricingKeyin interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebaseproductId- id of the productcharacteristicId- id of the characteristicvalueId- id of the value- Returns:
- pricing key for the given value
-
getSpecificPossibleValueIds
public Set<String> getSpecificPossibleValueIds(String kbId, String productId, String itemType, String characteristicId) Description copied from interface:ConfigurationMasterDataServiceGet all specific (that have a variant condition) possible value ids for a given characteristic. For class nodes, which don't carry variant key assignments, an empty Set is returned- Specified by:
getSpecificPossibleValueIdsin interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebaseproductId- id of the product of of a class nodeitemType- EitherSapproductconfigruntimecpsConstants.ITEM_TYPE_MARAorSapproductconfigruntimecpsConstants.ITEM_TYPE_KLAHcharacteristicId- id of the characteristic- Returns:
- list of possible value ids
-
getPossibleValueIds
Description copied from interface:ConfigurationMasterDataServiceGet all possible value ids for a given characteristic- Specified by:
getPossibleValueIdsin interfaceConfigurationMasterDataService- Parameters:
kbId- id of the knowledgebasecharacteristicId- id of the characteristic- Returns:
- list of possible value ids
-
isCharacteristicNumeric
Description copied from interface:ConfigurationMasterDataServiceChecks if a characteristic is numeric- Specified by:
isCharacteristicNumericin interfaceConfigurationMasterDataService- Parameters:
kbId- Id of the knowledgebasecsticId- Id of the characteristic- Returns:
- whether characteristic is numeric
-
getKbBuildNumber
Description copied from interface:ConfigurationMasterDataServiceRetrieves the build number for the specified knowledgebase id- Specified by:
getKbBuildNumberin interfaceConfigurationMasterDataService- Parameters:
kbId- Id of the knowledgebase- Returns:
- build number of the knowledgebase
-
removeCachedKb
Description copied from interface:ConfigurationMasterDataServiceRemoves the knowledgebase from the hybris cache in order to force a reload from service- Specified by:
removeCachedKbin interfaceConfigurationMasterDataService- Parameters:
kbId- Id of the knowledgebase
-
getFallbackLanguage
- Returns:
- Language of first fallback Locales if enabled
-
getCacheAccessService
- Returns:
- the cacheAccessService
-
setCacheAccessService
- Parameters:
cacheAccessService- the cacheAccessService to set
-
getI18NService
protected de.hybris.platform.servicelayer.i18n.I18NService getI18NService()- Returns:
- the I18N Service
-
setI18NService
public void setI18NService(de.hybris.platform.servicelayer.i18n.I18NService i18nService) - Parameters:
i18nService- the i18NService to set
-
getMasterDataResolver
-
setMasterDataResolver
-