Class AbstractProductPopulator<SOURCE extends ProductModel,TARGET extends ProductData>
- java.lang.Object
-
- de.hybris.platform.commercefacades.product.converters.populator.AbstractProductPopulator<SOURCE,TARGET>
-
- All Implemented Interfaces:
Populator<SOURCE,TARGET>
- Direct Known Subclasses:
AbstractProductImagePopulator
,CPQProductBasicPopulator
,ProductBasicPopulator
,ProductBundleDisablePopulator
,ProductBundleStarterPopulator
,ProductCategoriesPopulator
,ProductClassificationPopulator
,ProductDeliveryModeAvailabilityPopulator
,ProductDescriptionPopulator
,ProductEntitlementCollectionPopulator
,ProductPricePopulator
,ProductPriceRangePopulator
,ProductPromotionsPopulator
,ProductReviewsPopulator
,ProductSoldIndividuallyPopulator
,ProductStockPopulator
,ProductSummaryPopulator
,ProductVariantMatrixPopulator
,ProductVariantOptionDataPopulator
,ProductVolumePricesPopulator
,SubscriptionProductBasicPopulator
,SubscriptionProductPricePlanPopulator
public abstract class AbstractProductPopulator<SOURCE extends ProductModel,TARGET extends ProductData> extends java.lang.Object implements Populator<SOURCE,TARGET>
Abstract base class for product populators.
-
-
Constructor Summary
Constructors Constructor Description AbstractProductPopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModelService
getModelService()
protected java.lang.Object
getProductAttribute(ProductModel productModel, java.lang.String attribute)
Get an attribute value from a product.protected java.lang.String
safeToString(java.lang.Object value)
Convert the object value to a string.void
setModelService(ModelService modelService)
-
-
-
Method Detail
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getProductAttribute
protected java.lang.Object getProductAttribute(ProductModel productModel, java.lang.String attribute)
Get an attribute value from a product. If the attribute value is null and the product is a variant then the same attribute will be requested from the base product.- Parameters:
productModel
- the productattribute
- the name of the attribute to lookup- Returns:
- the value of the attribute
-
safeToString
protected java.lang.String safeToString(java.lang.Object value)
Convert the object value to a string. If the object is null it is converted to a blank string.- Parameters:
value
- the value to convert- Returns:
- the value string
-
-