Class DefaultProductSearchFacade
java.lang.Object
de.hybris.platform.cmsfacades.products.impl.DefaultProductSearchFacade
- All Implemented Interfaces:
ProductSearchFacade
Default implementation of the
ProductSearchFacade interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindProductCategories(String text, PageableData pageableData) Method to find product categories using a free-text form.findProducts(String text, PageableData pageableData) Method to find products using a free-text form.protected CatalogVersionServiceprotected Converter<CategoryModel,CategoryData> protected CategoryServicegetProductByCode(String code) Method to get a product by its product code.Method to get a category by its category code.protected ProductCategorySearchServiceprotected Converter<ProductModel,ProductData> protected ProductSearchServiceprotected ProductServiceprotected CatalogVersionModelGet the current catalog version model from the session.voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetCategoryDataConverter(Converter<CategoryModel, CategoryData> categoryDataConverter) voidsetCategoryService(CategoryService categoryService) voidsetProductCategorySearchService(ProductCategorySearchService productCategorySearchService) voidsetProductDataConverter(Converter<ProductModel, ProductData> productDataConverter) voidsetProductSearchService(ProductSearchService productSearchService) voidsetProductService(ProductService productService)
-
Constructor Details
-
DefaultProductSearchFacade
public DefaultProductSearchFacade()
-
-
Method Details
-
getProductByCode
Description copied from interface:ProductSearchFacadeMethod 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 inSessionServiceCatalogConstants.SESSION_CATALOG_VERSIONS. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String).- Specified by:
getProductByCodein interfaceProductSearchFacade- Parameters:
code- the product code- Returns:
- the Product data object.
-
findProducts
Description copied from interface:ProductSearchFacadeMethod 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 inSessionServiceCatalogConstants.SESSION_CATALOG_VERSIONS. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String).- Specified by:
findProductsin interfaceProductSearchFacade- Parameters:
text- The free-text string to be used on the product searchpageableData- the pagination object- Returns:
- the search result object.
-
getProductCategoryByCode
Description copied from interface:ProductSearchFacadeMethod 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 inSessionServiceCatalogConstants.SESSION_CATALOG_VERSIONS. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String).- Specified by:
getProductCategoryByCodein interfaceProductSearchFacade- Parameters:
code- the product category code- Returns:
- the Category data object containing the resulting list and the pagination object.
-
findProductCategories
Description copied from interface:ProductSearchFacadeMethod 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 inSessionServiceCatalogConstants.SESSION_CATALOG_VERSIONS. For your convenience, useCatalogVersionService.setSessionCatalogVersion(String, String).- Specified by:
findProductCategoriesin 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
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
-
setCategoryDataConverter
-
getProductDataConverter
-
setProductDataConverter
-
getProductService
-
setProductService
-
getCategoryService
-
setCategoryService
-
getCatalogVersionService
-
setCatalogVersionService
-
getProductCategorySearchService
-
setProductCategorySearchService
public void setProductCategorySearchService(ProductCategorySearchService productCategorySearchService) -
getProductSearchService
-
setProductSearchService
-