Class VariantOverviewPopulator
java.lang.Object
de.hybris.platform.sap.productconfig.facades.populator.VariantOverviewPopulator
- All Implemented Interfaces:
Populator<ProductModel,ConfigurationOverviewData>
public class VariantOverviewPopulator
extends Object
implements Populator<ProductModel,ConfigurationOverviewData>
Takes care of transforming a
We want to avoid to create a runtime configuration for a variant, just to display the overview page. This would be an in-performant solution. However the variant data is also available in the hybris classification data, hence we obtained it from there.
Will use the
ProductModel object of a variant into a ConfigurationOverviewData
object, which is used to display the pre-selected values of the product variant.We want to avoid to create a runtime configuration for a variant, just to display the overview page. This would be an in-performant solution. However the variant data is also available in the hybris classification data, hence we obtained it from there.
Will use the
VariantOverviewValuePopulator to populate indivdual values.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CharacteristicGroupaddGeneralGroup(ConfigurationOverviewData overviewData) Creates a general group to fulfill object hierarchy of ConfigurationOverviewData as product variants don't organize their features in groups.voidpopulate(ProductModel productModel, ConfigurationOverviewData overviewData) Populate the target instance with values from the source instance.protected voidprocessFeatureList(List<FeatureData> features, List<CharacteristicValue> values) Calls the VariantOverviewValuePopulator for each FeatureData object.voidsetClassificationPopulator(Populator<ProductModel, ProductData> classificationPopulator) voidsetFeatureProvider(FeatureProvider featureProvider) voidsetVariantOverviewValuePopulator(Populator<FeatureData, List<CharacteristicValue>> variantOverviewValuePopulator)
-
Constructor Details
-
VariantOverviewPopulator
public VariantOverviewPopulator()
-
-
Method Details
-
getFeatureProvider
- Returns:
- the featureProvider
-
setFeatureProvider
- Parameters:
featureProvider- the featureProvider to set
-
getClassificationPopulator
- Returns:
- the classificationPopulator
-
setClassificationPopulator
- Parameters:
classificationPopulator- the classificationPopulator to set
-
getVariantOverviewValuePopulator
- Returns:
- the variantOverviewValuePopulator
-
setVariantOverviewValuePopulator
public void setVariantOverviewValuePopulator(Populator<FeatureData, List<CharacteristicValue>> variantOverviewValuePopulator) - Parameters:
variantOverviewValuePopulator- the variantOverviewValuePopulator to set
-
populate
Description copied from interface:PopulatorPopulate the target instance with values from the source instance.- Specified by:
populatein interfacePopulator<ProductModel,ConfigurationOverviewData> - Parameters:
productModel- the source objectoverviewData- the target to fill
-
processFeatureList
Calls the VariantOverviewValuePopulator for each FeatureData object.- Parameters:
features- list of FeatureData objectsvalues- list of resulting CharacteristicValue objects
-
addGeneralGroup
Creates a general group to fulfill object hierarchy of ConfigurationOverviewData as product variants don't organize their features in groups.- Parameters:
overviewData-- Returns:
- general group
-