Class DefaultProductSearchFacade
- java.lang.Object
-
- de.hybris.platform.cmssmarteditwebservices.products.facade.impl.DefaultProductSearchFacade
-
- All Implemented Interfaces:
ProductSearchFacade
public class DefaultProductSearchFacade extends java.lang.Object implements ProductSearchFacade
Default implementation of theProductSearchFacadeinterface.
-
-
Constructor Summary
Constructors Constructor Description DefaultProductSearchFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ItemDatabuildItemData(java.lang.String code, java.lang.String typeCode)Returns theItemDataobject that represents a product with its unique identifier code.SearchResult<CategoryData>findProductCategories(java.lang.String text, PageableData pageableData)Method to find product categories using a free-text form.SearchResult<ProductData>findProducts(java.lang.String text, PageableData pageableData)Method to find products using a free-text form.protected CatalogVersionServicegetCatalogVersionService()protected Converter<CategoryData,CategoryData>getCategoryDataConverter()protected CMSAdminSiteServicegetCmsAdminSiteService()ProductDatagetProductByUid(java.lang.String uid)Method to get a product by its product uid.CategoryDatagetProductCategoryByUid(java.lang.String uid)Method to get a category by its category uid.protected Converter<ProductData,ProductData>getProductDataConverter()protected ProductSearchFacadegetProductSearchFacade()protected UniqueItemIdentifierServicegetUniqueItemIdentifierService()protected voidsetCatalogVersionInSession(CatalogVersionModel catalogVersion)Sets the catalog version in the session so we can reuse ProductSearchFacade correctly.voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetCategoryDataConverter(Converter<CategoryData,CategoryData> categoryDataConverter)voidsetCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService)voidsetProductDataConverter(Converter<ProductData,ProductData> productDataConverter)voidsetProductSearchFacade(ProductSearchFacade productSearchFacade)voidsetUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
-
-
-
Method Detail
-
getProductByUid
public ProductData getProductByUid(java.lang.String uid)
Description copied from interface:ProductSearchFacadeMethod to get a product by its product uid. 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:
getProductByUidin interfaceProductSearchFacade- Parameters:
uid- the product uid- Returns:
- the Product data object.
-
findProducts
public SearchResult<ProductData> findProducts(java.lang.String text, PageableData pageableData)
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.
-
getProductCategoryByUid
public CategoryData getProductCategoryByUid(java.lang.String uid)
Description copied from interface:ProductSearchFacadeMethod to get a category by its category uid. 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:
getProductCategoryByUidin interfaceProductSearchFacade- Parameters:
uid- the product category uid- 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: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.
-
setCatalogVersionInSession
protected void setCatalogVersionInSession(CatalogVersionModel catalogVersion)
Sets the catalog version in the session so we can reuse ProductSearchFacade correctly.- Parameters:
catalogVersion- the catalog version to be set in the session
-
buildItemData
protected ItemData buildItemData(java.lang.String code, java.lang.String typeCode)
Returns theItemDataobject that represents a product with its unique identifier code.- Parameters:
code- the unique identifier codetypeCode- the TYPE CODE of the Item model- Returns:
- the item data object that represents the product
-
getProductSearchFacade
protected ProductSearchFacade getProductSearchFacade()
-
setProductSearchFacade
public void setProductSearchFacade(ProductSearchFacade productSearchFacade)
-
getCategoryDataConverter
protected Converter<CategoryData,CategoryData> getCategoryDataConverter()
-
setCategoryDataConverter
public void setCategoryDataConverter(Converter<CategoryData,CategoryData> categoryDataConverter)
-
getProductDataConverter
protected Converter<ProductData,ProductData> getProductDataConverter()
-
setProductDataConverter
public void setProductDataConverter(Converter<ProductData,ProductData> productDataConverter)
-
getUniqueItemIdentifierService
protected UniqueItemIdentifierService getUniqueItemIdentifierService()
-
setUniqueItemIdentifierService
public void setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getCmsAdminSiteService
protected CMSAdminSiteService getCmsAdminSiteService()
-
setCmsAdminSiteService
public void setCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService)
-
-