Class InstancePopulator
java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.populator.impl.InstancePopulator
- All Implemented Interfaces:
de.hybris.platform.sap.productconfig.runtime.interf.ContextualPopulator<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext>
public class InstancePopulator
extends Object
implements de.hybris.platform.sap.productconfig.runtime.interf.ContextualPopulator<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel,MasterDataContext>
Responsible to populate instances for the configuration runtime. Also orchestrates the conversion of dependent
objects (sub instances, groups).
This populator breaks our standard pattern that distinguishes between runtime population (accessing static master data in read mode when needed) and populating the master data caches themselves: Here we add the root items' base unit of measure to the master data cache, as we don't get this information from the master data services.
This populator breaks our standard pattern that distinguishes between runtime population (accessing static master data in read mode when needed) and populating the master data caches themselves: Here we add the root items' base unit of measure to the master data cache, as we don't get this information from the master data services.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSCharacteristic,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel, MasterDataContext> protected de.hybris.platform.servicelayer.dto.converter.Converter<CPSCharacteristicGroup,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel> protected de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext> protected de.hybris.platform.servicelayer.dto.converter.Converter<CPSVariantCondition,de.hybris.platform.sap.productconfig.runtime.interf.model.VariantConditionModel> voidpopulate(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) protected voidpopulateCoreAttributes(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target) protected voidpopulateCstics(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) protected voidpopulateGroups(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) protected voidpopulateRootUOMToMasterDataCache(CPSItem source, MasterDataContext ctxt) protected voidpopulateSubItems(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) protected voidpopulateUOMToMasterDataCache(CPSItem source, MasterDataContext ctxt) protected voidpopulateVariantConditions(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target) voidsetCharacteristicConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSCharacteristic, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel, MasterDataContext> characteristicConverter) voidsetCharacteristicGroupConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSCharacteristicGroup, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel, MasterDataContext> characteristicGroupConverter) voidsetInstanceModelConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext> instanceModelConverter) voidsetVariantConditionConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CPSVariantCondition, de.hybris.platform.sap.productconfig.runtime.interf.model.VariantConditionModel> variantConditionConverter)
-
Constructor Details
-
InstancePopulator
public InstancePopulator()
-
-
Method Details
-
populate
public void populate(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) - Specified by:
populatein interfacede.hybris.platform.sap.productconfig.runtime.interf.ContextualPopulator<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext>
-
populateRootUOMToMasterDataCache
-
populateUOMToMasterDataCache
-
populateCoreAttributes
protected void populateCoreAttributes(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target) -
populateSubItems
protected void populateSubItems(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) -
populateGroups
protected void populateGroups(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) -
populateCstics
protected void populateCstics(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target, MasterDataContext ctxt) -
populateVariantConditions
protected void populateVariantConditions(CPSItem source, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel target) -
getVariantConditionConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<CPSVariantCondition,de.hybris.platform.sap.productconfig.runtime.interf.model.VariantConditionModel> getVariantConditionConverter()- Returns:
- the variantConditionConverter
-
setVariantConditionConverter
public void setVariantConditionConverter(de.hybris.platform.servicelayer.dto.converter.Converter<CPSVariantCondition, de.hybris.platform.sap.productconfig.runtime.interf.model.VariantConditionModel> variantConditionConverter) - Parameters:
variantConditionConverter- the variantConditionConverter to set
-
getCharacteristicConverter
protected de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSCharacteristic,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel, getCharacteristicConverter()MasterDataContext> - Returns:
- the characteristicConverter
-
setCharacteristicConverter
public void setCharacteristicConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSCharacteristic, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel, MasterDataContext> characteristicConverter) - Parameters:
characteristicConverter- the characteristicConverter to set
-
getCharacteristicGroupConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<CPSCharacteristicGroup,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel> getCharacteristicGroupConverter()- Returns:
- the characteristicGroupConverter
-
setCharacteristicGroupConverter
public void setCharacteristicGroupConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSCharacteristicGroup, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticGroupModel, MasterDataContext> characteristicGroupConverter) - Parameters:
characteristicGroupConverter- the characteristicGroupConverter to set
-
getInstanceModelConverter
protected de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, getInstanceModelConverter()MasterDataContext> - Returns:
- the instanceModelConverter
-
setInstanceModelConverter
public void setInstanceModelConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSItem, de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel, MasterDataContext> instanceModelConverter) - Parameters:
instanceModelConverter- the instanceModelConverter to set
-