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.
  • 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:
      populate in interface de.hybris.platform.sap.productconfig.runtime.interf.ContextualPopulator<CPSItem,de.hybris.platform.sap.productconfig.runtime.interf.model.InstanceModel,MasterDataContext>
    • populateRootUOMToMasterDataCache

      protected void populateRootUOMToMasterDataCache(CPSItem source, MasterDataContext ctxt)
    • populateUOMToMasterDataCache

      protected void populateUOMToMasterDataCache(CPSItem source, MasterDataContext ctxt)
    • 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,MasterDataContext> getCharacteristicConverter()
      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,MasterDataContext> getInstanceModelConverter()
      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