Class DefaultProductCarouselRendererService
- java.lang.Object
-
- de.hybris.platform.acceleratorcms.productcarousel.impl.DefaultProductCarouselRendererService
-
- All Implemented Interfaces:
ProductCarouselRendererService
public class DefaultProductCarouselRendererService extends java.lang.Object implements ProductCarouselRendererService
Service to fetch full list of products and categories of a product carousel component in preview mode.
-
-
Constructor Summary
Constructors Constructor Description DefaultProductCarouselRendererService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CatalogVersionService
getCatalogVersionService()
java.util.List<ProductModel>
getDisplayableProducts(CategoryModel category)
When in preview mode, we will swap the given products of a product category for their counterpart in the catalog version in session for their respective catalogs.java.util.List<ProductModel>
getDisplayableProducts(ProductCarouselComponentModel component)
When in preview mode, we will swap the given products of a product carousel component for their counterpart in the catalog version in session for their respective catalogs.java.util.List<CategoryModel>
getListOfCategories(ProductCarouselComponentModel component)
Returns the full list categories without the session catalog version filtering out the ones from different versions.protected ModelService
getModelService()
protected ProductService
getProductService()
protected java.util.List<ProductModel>
retrieveProductsForVersionsInSession(java.util.List<ProductModel> persistentProducts)
When in preview mode, we will swap the given products for their counterpart in the catalog version in session for their respective catalogs.void
setCatalogVersionService(CatalogVersionService catalogVersionService)
void
setModelService(ModelService modelService)
void
setProductService(ProductService productService)
-
-
-
Method Detail
-
getDisplayableProducts
public java.util.List<ProductModel> getDisplayableProducts(ProductCarouselComponentModel component)
Description copied from interface:ProductCarouselRendererService
When in preview mode, we will swap the given products of a product carousel component for their counterpart in the catalog version in session for their respective catalogs. The session catalog version is not always the active version when used in CMS tooling.- Specified by:
getDisplayableProducts
in interfaceProductCarouselRendererService
- Parameters:
component
- the product carousel component model- Returns:
- a list of
ProductModel
for the catalog versions in session
-
getDisplayableProducts
public java.util.List<ProductModel> getDisplayableProducts(CategoryModel category)
Description copied from interface:ProductCarouselRendererService
When in preview mode, we will swap the given products of a product category for their counterpart in the catalog version in session for their respective catalogs. The session catalog version is not always the active version when used in CMS tooling.- Specified by:
getDisplayableProducts
in interfaceProductCarouselRendererService
- Parameters:
category
- theProductModel
go retrieve the products- Returns:
- a list of
ProductModel
for the catalog versions in session
-
getListOfCategories
public java.util.List<CategoryModel> getListOfCategories(ProductCarouselComponentModel component)
Description copied from interface:ProductCarouselRendererService
Returns the full list categories without the session catalog version filtering out the ones from different versions. This is needed when the session catalog version is not the active version. This is possible through CMS tooling- Specified by:
getListOfCategories
in interfaceProductCarouselRendererService
- Parameters:
component
- the product carousel component model- Returns:
- a list of
CategoryModel
for the catalog versions in session
-
retrieveProductsForVersionsInSession
protected java.util.List<ProductModel> retrieveProductsForVersionsInSession(java.util.List<ProductModel> persistentProducts)
When in preview mode, we will swap the given products for their counterpart in the catalog version in session for their respective catalogs. The session catalog version is not always the active version when used in CMS tooling
-
getProductService
protected ProductService getProductService()
-
setProductService
public void setProductService(ProductService productService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
-