Class ProductDetailsPopulator
java.lang.Object
com.hybris.merchandising.converters.populators.ProductDetailsPopulator
- All Implemented Interfaces:
Populator<ProductIndexContainer,Product>
public class ProductDetailsPopulator
extends Object
implements Populator<ProductIndexContainer,Product>
Populates
ProductDetailsPopulator from ProductIndexContainer which encapsulates the information regarding the
indexed product details.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetReportingGroup is a method for retrieving the reporting group to use with the product, depending on how the product directory is configured to do variant rollup or not.protected List<MerchandisingMetricRollupStrategy>Retrieves the configured list ofMerchandisingMetricRollupStrategybeans used for variant rollup.voidpopulate(ProductIndexContainer source, Product target) Populate the target instance with values from the source instance.Helper method to populate list of categories that the product is in.Helper method to populate product specific details that are to Merchandising properties.protected StringpopulatePageUrl(ProductIndexContainer source) populateProductPageUrl is a method for retrieving the product page URL from the indexed document and appending the URL of the commerce instance to it.voidsetRollupStrategies(List<MerchandisingMetricRollupStrategy> rollupStrategies) Sets the configured list ofMerchandisingMetricRollupStrategybeans used for variant rollup.
-
Field Details
-
CATEGORIES_KEY
- See Also:
-
URL
- See Also:
-
CODE
- See Also:
-
-
Constructor Details
-
ProductDetailsPopulator
public ProductDetailsPopulator()
-
-
Method Details
-
populate
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
-
populateMerchProperties
Helper method to populate product specific details that are to Merchandising properties.- Parameters:
source- theProductIndexContainerrepresenting the current Solr search and configuration being used.- Returns:
- Map contains name value pair of Merchandising properties.
-
populateCategory
Helper method to populate list of categories that the product is in.- Parameters:
source- theProductIndexContainerrepresenting the current Solr search and configuration being used.- Returns:
- List of categories that the product is in.
-
populatePageUrl
populateProductPageUrl is a method for retrieving the product page URL from the indexed document and appending the URL of the commerce instance to it.- Parameters:
source- theProductIndexContainerrepresenting the source.- Returns:
- the page URL.
-
getReportingGroup
getReportingGroup is a method for retrieving the reporting group to use with the product, depending on how the product directory is configured to do variant rollup or not.- Parameters:
source- theProductIndexContainerrepresenting the source.- Returns:
- the reporting group to use for the product.
-
getRollupStrategies
Retrieves the configured list ofMerchandisingMetricRollupStrategybeans used for variant rollup.- Returns:
- the list of roll up strategies.
-
setRollupStrategies
Sets the configured list ofMerchandisingMetricRollupStrategybeans used for variant rollup.- Parameters:
rollupStrategies- the list of strategies to set.
-