Class ProductImagePopulator
- java.lang.Object
-
- com.hybris.merchandising.converters.populators.ProductImagePopulator
-
- All Implemented Interfaces:
Populator<ProductIndexContainer,Product>
public class ProductImagePopulator extends java.lang.Object implements Populator<ProductIndexContainer,Product>
PopulatesProductImagePopulatorfromProductIndexContainerwhich encapsulates the information regarding the indexed product details
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringMAIN_IMAGEprotected static java.lang.StringTHUMBNAIL_IMAGE
-
Constructor Summary
Constructors Constructor Description ProductImagePopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpopulate(ProductIndexContainer source, Product target)Populate the target instance with values from the source instance.protected java.util.Optional<java.lang.String>populateProductImage(ProductIndexContainer source, java.lang.String propertyName)Helper method to populate image information associated with the product.
-
-
-
Field Detail
-
THUMBNAIL_IMAGE
protected static final java.lang.String THUMBNAIL_IMAGE
- See Also:
- Constant Field Values
-
MAIN_IMAGE
protected static final java.lang.String MAIN_IMAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
populate
public void populate(ProductIndexContainer source, Product target) throws ConversionException
Description copied from interface:PopulatorPopulate the target instance with values from the source instance.- Specified by:
populatein interfacePopulator<ProductIndexContainer,Product>- Parameters:
source- the source objecttarget- the target to fill- Throws:
ConversionException- if an error occurs
-
populateProductImage
protected java.util.Optional<java.lang.String> populateProductImage(ProductIndexContainer source, java.lang.String propertyName)
Helper method to populate image information associated with the product.- Parameters:
source- theProductIndexContainerrepresenting the Solr index.propertyName- the property name being retrieved from the index.- Returns:
- image information for the given key
-
-