Class DefaultProductSearchFacade
- java.lang.Object
-
- de.hybris.platform.cmsfacades.products.impl.DefaultProductSearchFacade
-
- All Implemented Interfaces:
ProductSearchFacade
public class DefaultProductSearchFacade extends java.lang.Object implements ProductSearchFacade
Default implementation of theProductSearchFacade
interface.
-
-
Constructor Summary
Constructors Constructor Description DefaultProductSearchFacade()
-
Method Summary
-
-
-
Method Detail
-
getProductByCode
public ProductData getProductByCode(java.lang.String code)
Description copied from interface:ProductSearchFacade
Method to get a product by its product code. It expects the base site to be previously identified usingBaseSiteService.setCurrentBaseSite(String, boolean)
and the catalog version to be stored inSessionService
CatalogConstants.SESSION_CATALOG_VERSIONS
. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String)
.- Specified by:
getProductByCode
in interfaceProductSearchFacade
- Parameters:
code
- the product code- Returns:
- the Product data object.
-
findProducts
public SearchResult<ProductData> findProducts(java.lang.String text, PageableData pageableData)
Description copied from interface:ProductSearchFacade
Method to find products using a free-text form. It also supports pagination. It expects the base site to be previously identified usingBaseSiteService.setCurrentBaseSite(String, boolean)
and the catalog version to be stored inSessionService
CatalogConstants.SESSION_CATALOG_VERSIONS
. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String)
.- Specified by:
findProducts
in interfaceProductSearchFacade
- Parameters:
text
- The free-text string to be used on the product searchpageableData
- the pagination object- Returns:
- the search result object.
-
getProductCategoryByCode
public CategoryData getProductCategoryByCode(java.lang.String code)
Description copied from interface:ProductSearchFacade
Method to get a category by its category code. It expects the base site to be previously identified usingBaseSiteService.setCurrentBaseSite(String, boolean)
and the catalog version to be stored inSessionService
CatalogConstants.SESSION_CATALOG_VERSIONS
. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String)
.- Specified by:
getProductCategoryByCode
in interfaceProductSearchFacade
- Parameters:
code
- the product category code- Returns:
- the Category data object containing the resulting list and the pagination object.
-
findProductCategories
public SearchResult<CategoryData> findProductCategories(java.lang.String text, PageableData pageableData)
Description copied from interface:ProductSearchFacade
Method to find product categories using a free-text form. It also supports pagination. It expects the base site to be previously identified usingBaseSiteService.setCurrentBaseSite(String, boolean)
and the catalog version to be stored inSessionService
CatalogConstants.SESSION_CATALOG_VERSIONS
. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String)
.- Specified by:
findProductCategories
in interfaceProductSearchFacade
- Parameters:
text
- The free-text string to be used on the product category searchpageableData
- the pagination object- Returns:
- the search result object containing the resulting list and the pagination object.
-
getSessionCatalogVersion
protected CatalogVersionModel getSessionCatalogVersion()
Get the current catalog version model from the session. It must exist one and only one catalog version in the session.- Returns:
- the catalog version model from the request sessionService.
- Throws:
UnknownIdentifierException
- if no Catalog Version is defined in the requested user session.AmbiguousIdentifierException
- if more than one Catalog Version is defined in the requested user session.
-
getCategoryDataConverter
protected Converter<CategoryModel,CategoryData> getCategoryDataConverter()
-
setCategoryDataConverter
public void setCategoryDataConverter(Converter<CategoryModel,CategoryData> categoryDataConverter)
-
getProductDataConverter
protected Converter<ProductModel,ProductData> getProductDataConverter()
-
setProductDataConverter
public void setProductDataConverter(Converter<ProductModel,ProductData> productDataConverter)
-
getProductService
protected ProductService getProductService()
-
setProductService
public void setProductService(ProductService productService)
-
getCategoryService
protected CategoryService getCategoryService()
-
setCategoryService
public void setCategoryService(CategoryService categoryService)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getProductCategorySearchService
protected ProductCategorySearchService getProductCategorySearchService()
-
setProductCategorySearchService
public void setProductCategorySearchService(ProductCategorySearchService productCategorySearchService)
-
getProductSearchService
protected ProductSearchService getProductSearchService()
-
setProductSearchService
public void setProductSearchService(ProductSearchService productSearchService)
-
-