Class ProductConverter
java.lang.Object
de.hybris.platform.converters.impl.AbstractConverter<org.springframework.messaging.Message<ProductModel>,Product>
de.hybris.platform.acceleratorservices.dataexport.googlelocal.converter.ProductConverter
- All Implemented Interfaces:
Populator<org.springframework.messaging.Message<ProductModel>,,Product> Converter<org.springframework.messaging.Message<ProductModel>,,Product> org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.core.convert.converter.Converter<org.springframework.messaging.Message<ProductModel>,Product>
public class ProductConverter
extends AbstractConverter<org.springframework.messaging.Message<ProductModel>,Product>
Converts
ProductModel to Product.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConstans with product condition. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Productprotected StringgenerateGoogleProductCategory(ProductModel productModel) protected StringgenerateProductType(ProductModel productModel) protected StringgetAdditionalImages(String mediaUrl, ProductModel productModel) protected CategoryServiceprotected CommercePriceServiceprotected StringgetItemGroupId(ProductModel productModel) All items that are color/material/pattern/size variants of the same product must have the same item group id.protected StringgetProductCondition(ProductModel productModel) protected UrlResolver<ProductModel>protected SiteBaseUrlResolutionServicevoidpopulate(org.springframework.messaging.Message<ProductModel> message, Product product) Override this method to populate the target from the sourcevoidsetCategoryService(CategoryService categoryService) voidsetCommercePriceService(CommercePriceService commercePriceService) protected voidsetProductImageLinks(org.springframework.messaging.Message<ProductModel> message, Product product, ProductModel productModel) voidsetProductModelUrlResolver(UrlResolver<ProductModel> productModelUrlResolver) voidsetSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService) Methods inherited from class de.hybris.platform.converters.impl.AbstractConverter
afterPropertiesSet, convert, convert, createFromClass, getMyBeanName, setBeanName, setTargetClassMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLoggerMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Field Details
-
MAXIMUM_ADDITIONAL_IMAGES
public static final int MAXIMUM_ADDITIONAL_IMAGES- See Also:
-
-
Constructor Details
-
ProductConverter
public ProductConverter()
-
-
Method Details
-
getProductModelUrlResolver
-
setProductModelUrlResolver
-
getCommercePriceService
-
setCommercePriceService
-
getCategoryService
-
setCategoryService
-
getSiteBaseUrlResolutionService
-
setSiteBaseUrlResolutionService
public void setSiteBaseUrlResolutionService(SiteBaseUrlResolutionService siteBaseUrlResolutionService) -
getItemGroupId
All items that are color/material/pattern/size variants of the same product must have the same item group id. If you have a "Parent SKU" that is shared by all variants of a product, you can provide that as the value for 'item group id'.- Parameters:
productModel- the product- Returns:
- groupId
-
generateProductType
-
getProductCondition
-
getAdditionalImages
-
generateGoogleProductCategory
-
createTarget
- Overrides:
createTargetin classAbstractConverter<org.springframework.messaging.Message<ProductModel>,Product>
-
populate
Description copied from class:AbstractConverterOverride this method to populate the target from the source- Specified by:
populatein interfacePopulator<org.springframework.messaging.Message<ProductModel>,Product> - Specified by:
populatein classAbstractConverter<org.springframework.messaging.Message<ProductModel>,Product> - Parameters:
message- the source instanceproduct- the target instance to fill- See Also:
-
setProductImageLinks
protected void setProductImageLinks(org.springframework.messaging.Message<ProductModel> message, Product product, ProductModel productModel)
-