java.lang.Object
de.hybris.platform.sap.productconfig.runtime.cps.populator.impl.CharacteristicPopulator
All Implemented Interfaces:
de.hybris.platform.sap.productconfig.runtime.interf.ContextualPopulator<CPSCharacteristic,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel,MasterDataContext>

public class CharacteristicPopulator extends Object implements de.hybris.platform.sap.productconfig.runtime.interf.ContextualPopulator<CPSCharacteristic,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel,MasterDataContext>
Responsible to populate characteristics
  • Field Details

  • Constructor Details

    • CharacteristicPopulator

      public CharacteristicPopulator()
  • Method Details

    • getValueConverter

      public de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSValue,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel,MasterDataContext> getValueConverter()
      Returns:
      the valueConverter
    • setValueConverter

      public void setValueConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSValue,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel,MasterDataContext> valueConverter)
      Parameters:
      valueConverter - the valueConverter to set
    • getPossibleValueConverter

      public de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSPossibleValue,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel,MasterDataContext> getPossibleValueConverter()
      Returns:
      the possibleValueConverter
    • setPossibleValueConverter

      public void setPossibleValueConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSPossibleValue,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel,MasterDataContext> possibleValueConverter)
      Parameters:
      possibleValueConverter - the possibleValueConverter to set
    • populate

      public void populate(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target, MasterDataContext ctxt)
      Specified by:
      populate in interface de.hybris.platform.sap.productconfig.runtime.interf.ContextualPopulator<CPSCharacteristic,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel,MasterDataContext>
    • populateInstanceReference

      protected void populateInstanceReference(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target)
    • getEmptyValueConstant

      protected String getEmptyValueConstant()
    • populateValues

      protected void populateValues(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target, MasterDataContext ctxt)
    • populatePossibleValues

      protected void populatePossibleValues(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target, MasterDataContext ctxt)
    • mergeAssignedWithPossibleValues

      protected boolean mergeAssignedWithPossibleValues(boolean constrained, boolean allowsAdditionalValue, List<de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel> assignedValues)
    • isConstrained

      protected boolean isConstrained(CPSCharacteristic source, MasterDataContext ctxt)
      Check whether a characteristics is domain constrained. We don't consider attribute CPSPossibleValue.isSelectable() because we are interested in the _static_ domain only. Even if a restrictable characteristic has no runtime domain, this check will state correctly that it is constrained. If domain values are read on demand the 'constrained' information is determined via master data. For characteristics where the domain is maintained via variant tables this is not possible. It would return false even if the characteristic is constrained. Also for characteristics where the static domain is overwritten at the class the information cannot be retrieved via master data. In this case the 'constrained' information is determined via the possible values of the source characteristic.
      Parameters:
      source - Characteristic in CPS representation
      Returns:
      domain constrained
    • hasStaticDomainDeterminedByMasterData

      protected boolean hasStaticDomainDeterminedByMasterData(CPSCharacteristic source, MasterDataContext ctxt)
    • determineHasStaticDomainForItemTypeMARA

      protected boolean determineHasStaticDomainForItemTypeMARA(CPSCharacteristic source, MasterDataContext ctxt)
    • isPossibleValueSpecificsEmpty

      protected boolean isPossibleValueSpecificsEmpty(Map<String,CPSMasterDataPossibleValueSpecific> possibleValueSpecifics)
    • determineHasStaticDomainForItemTypeKLAH

      protected boolean determineHasStaticDomainForItemTypeKLAH(CPSCharacteristic source)
    • allowsAdditionalValue

      protected boolean allowsAdditionalValue(CPSCharacteristic source, MasterDataContext ctxt)
    • allowsAdditionalValueDeterminedByMasterData

      protected boolean allowsAdditionalValueDeterminedByMasterData(CPSCharacteristic source, MasterDataContext ctxt)
    • fillPossibleValues

      protected boolean fillPossibleValues(CPSCharacteristic source, List<de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel> possibleValues, MasterDataContext ctxt)
    • populateCoreAttributes

      protected void populateCoreAttributes(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target)
    • isReadDomainValuesOnDemand

      protected boolean isReadDomainValuesOnDemand()
    • setReadDomainValuesOnDemand

      public void setReadDomainValuesOnDemand(boolean readDomainValuesOnDemand)