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 theVariantOptionDatafor all theVariantMatrixElementDatain the tree by using a list of populators.
-
-
Constructor Summary
Constructors Constructor Description ProductVariantOptionDataPopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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)java.util.Collection<ProductVariantOption>getProductVariantOptionList()protected VariantMatrixElementDatagetRightElementToCopy(VariantMatrixElementData parent)Gets the element with the same code from the children and if not found returns the first.protected ConfigurablePopulator<VariantProductModel,VariantOptionData,ProductVariantOption>getVariantOptionDataPopulator()protected java.util.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(java.util.List<VariantMatrixElementData> parentNodeList, VariantProductModel variant, ProductModel originalVariant)voidsetProductVariantOptionList(java.util.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
-
-
-
-
Method Detail
-
populate
public void populate(ProductModel productModel, ProductData productData) throws ConversionException
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
protected void copyDataFromNodes(ProductData productData)
-
populateNodes
protected void populateNodes(java.util.List<VariantMatrixElementData> parentNodeList, VariantProductModel variant, ProductModel originalVariant)
-
populateNodes
protected void populateNodes(VariantMatrixElementData parentNode, VariantProductModel variant)
-
getVariants
protected java.util.Collection<VariantProductModel> getVariants(ProductModel productModel)
-
copyData
protected void copyData(VariantMatrixElementData parent)
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
protected VariantMatrixElementData getRightElementToCopy(VariantMatrixElementData parent)
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,ProductVariantOption> getVariantOptionDataPopulator()
-
setVariantOptionDataPopulator
public void setVariantOptionDataPopulator(ConfigurablePopulator<VariantProductModel,VariantOptionData,ProductVariantOption> variantOptionDataPopulator)
-
getProductVariantOptionList
public java.util.Collection<ProductVariantOption> getProductVariantOptionList()
-
setProductVariantOptionList
public void setProductVariantOptionList(java.util.Collection<ProductVariantOption> productVariantOptionList)
-
-