Class ProductVariantOptionDataPopulator<SOURCE extends ProductModel,TARGET extends ProductData>
java.lang.Object
de.hybris.platform.commercefacades.product.converters.populator.AbstractProductPopulator<SOURCE,TARGET>
de.hybris.platform.commercefacades.product.converters.populator.ProductVariantOptionDataPopulator<SOURCE,TARGET>
- All Implemented Interfaces:
Populator<SOURCE,TARGET>
public class ProductVariantOptionDataPopulator<SOURCE extends ProductModel,TARGET extends ProductData>
extends AbstractProductPopulator<SOURCE,TARGET>
Populates the
VariantOptionData for all the VariantMatrixElementData in the tree by using a list of
populators.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyData(VariantMatrixElementData parent) Copies the data from the element with the same code or from the first one on the list.protected voidcopyDataFromNodes(ProductData productData) protected VariantMatrixElementDataGets the element with the same code from the children and if not found returns the first.protected Collection<VariantProductModel>getVariants(ProductModel productModel) voidpopulate(ProductModel productModel, ProductData productData) Populates the elements in tree with the information retrieved from the variant..protected voidpopulateNodes(VariantMatrixElementData parentNode, VariantProductModel variant) protected voidpopulateNodes(List<VariantMatrixElementData> parentNodeList, VariantProductModel variant, ProductModel originalVariant) voidsetProductVariantOptionList(Collection<ProductVariantOption> productVariantOptionList) voidsetVariantOptionDataPopulator(ConfigurablePopulator<VariantProductModel, VariantOptionData, ProductVariantOption> variantOptionDataPopulator) Methods inherited from class de.hybris.platform.commercefacades.product.converters.populator.AbstractProductPopulator
getModelService, getProductAttribute, safeToString, setModelService
-
Constructor Details
-
ProductVariantOptionDataPopulator
public ProductVariantOptionDataPopulator()
-
-
Method Details
-
populate
Populates the elements in tree with the information retrieved from the variant..- Parameters:
productModel- the product to take the data from.productData- the data to put the data in.- Throws:
ConversionException
-
copyDataFromNodes
-
populateNodes
protected void populateNodes(List<VariantMatrixElementData> parentNodeList, VariantProductModel variant, ProductModel originalVariant) -
populateNodes
-
getVariants
-
copyData
Copies the data from the element with the same code or from the first one on the list.- Parameters:
parent- the element to copy the data into.
-
getRightElementToCopy
Gets the element with the same code from the children and if not found returns the first.- Parameters:
parent- the parent to look for the right child.
-
getVariantOptionDataPopulator
protected ConfigurablePopulator<VariantProductModel,VariantOptionData, getVariantOptionDataPopulator()ProductVariantOption> -
setVariantOptionDataPopulator
public void setVariantOptionDataPopulator(ConfigurablePopulator<VariantProductModel, VariantOptionData, ProductVariantOption> variantOptionDataPopulator) -
getProductVariantOptionList
-
setProductVariantOptionList
-