Class CharacteristicPopulator
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanallowsAdditionalValue(CPSCharacteristic source, MasterDataContext ctxt) protected booleanprotected booleanprotected booleanprotected booleanfillPossibleValues(CPSCharacteristic source, List<de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel> possibleValues, MasterDataContext ctxt) protected Stringde.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSPossibleValue,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel, MasterDataContext> de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSValue,de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel, MasterDataContext> protected booleanprotected booleanisConstrained(CPSCharacteristic source, MasterDataContext ctxt) Check whether a characteristics is domain constrained.protected booleanisPossibleValueSpecificsEmpty(Map<String, CPSMasterDataPossibleValueSpecific> possibleValueSpecifics) protected booleanprotected booleanmergeAssignedWithPossibleValues(boolean constrained, boolean allowsAdditionalValue, List<de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel> assignedValues) voidpopulate(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target, MasterDataContext ctxt) protected voidpopulateCoreAttributes(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target) protected voidpopulateInstanceReference(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target) protected voidpopulatePossibleValues(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target, MasterDataContext ctxt) protected voidpopulateValues(CPSCharacteristic source, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticModel target, MasterDataContext ctxt) voidsetPossibleValueConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSPossibleValue, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel, MasterDataContext> possibleValueConverter) voidsetReadDomainValuesOnDemand(boolean readDomainValuesOnDemand) voidsetValueConverter(de.hybris.platform.sap.productconfig.runtime.interf.ContextualConverter<CPSValue, de.hybris.platform.sap.productconfig.runtime.interf.model.CsticValueModel, MasterDataContext> valueConverter)
-
Field Details
-
INTERVAL_TYPE_UNCONSTRAINED
- See Also:
-
-
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, getValueConverter()MasterDataContext> - 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, getPossibleValueConverter()MasterDataContext> - 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:
populatein interfacede.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
-
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
Check whether a characteristics is domain constrained. We don't consider attributeCPSPossibleValue.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
-
allowsAdditionalValue
-
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)
-