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 Object implements Populator<SOURCE,TARGET>
Abstract base class for product populators.
  • Constructor Details

    • AbstractProductPopulator

      public AbstractProductPopulator()
  • Method Details

    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)
    • getProductAttribute

      protected Object getProductAttribute(ProductModel productModel, 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 product
      attribute - the name of the attribute to lookup
      Returns:
      the value of the attribute
    • safeToString

      protected String safeToString(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