Package com.hybris.ymkt.common.product
Class ProductURLService
java.lang.Object
com.hybris.ymkt.common.product.ProductURLService
Convenience service to generate the product URL and image URL.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProductImageURL(ProductModel product) Provide the URL of the product image if available.getProductURL(ProductModel product) Provide the URL of the product shop detail page.getProductURL(String productCode) Provide the URL of the product shop detail page.voidsetImagePrefix(String imagePrefix) voidsetNavPrefix(String navPrefix) voidsetNavSuffix(String navSuffix) voidsetProductService(de.hybris.platform.product.ProductService productService)
-
Field Details
-
imagePrefix
-
productService
protected de.hybris.platform.product.ProductService productService
-
-
Constructor Details
-
ProductURLService
public ProductURLService()
-
-
Method Details
-
getProductImageURL
Provide the URL of the product image if available.- Parameters:
product-ProductModelto get image URL from.- Returns:
Optionalimage URL if the product has one.
-
getProductURL
Provide the URL of the product shop detail page.- Parameters:
product-ProductModelto get detail page URL from.- Returns:
- URL accessible by web user.
-
getProductURL
Provide the URL of the product shop detail page.- Parameters:
productCode-ProductModel.getCode()to get detail page URL from.- Returns:
- URL accessible by web user.
-
setImagePrefix
-
setProductService
public void setProductService(de.hybris.platform.product.ProductService productService)
-