Class DefaultProductInterestFacade
java.lang.Object
de.hybris.platform.customerinterestsfacades.productinterest.impl.DefaultProductInterestFacade
- All Implemented Interfaces:
ProductInterestFacade
Default implementation of
ProductInterestFacade-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<ProductInterestRelationData>buildProductInterestRelationData(Map<ProductModel, Map<NotificationType, Date>> productNotificationMap) protected BaseSiteServiceprotected BaseStoreServicegetPaginatedProductInterestsByCustomer(SearchPageData searchPageData) Finds interests watched by current customergetPaginatedProductInterestsForNotificationType(String productCode, NotificationType notificationType, SearchPageData searchPageData) Finds interests watched by current customerprotected Optional<ProductInterestModel>getProductInterest(String productcode, NotificationType notificationType) protected Converter<ProductInterestModel,ProductInterestData> getProductInterestDataForCurrentCustomer(String productcode, NotificationType notificationType) Gets the particular interest of the current customer according to the product code and the notificationTypeprotected Converter<Map.Entry<NotificationType,Date>, ProductInterestEntryData> getProductInterestRelation(String productCode) Finds product interest relation for specific product for current customerprotected Converter<Map.Entry<ProductModel,List<ProductInterestEntryData>>, ProductInterestRelationData> protected Converter<ProductInterestData,ProductInterestModel> protected ProductInterestServicegetProductInterestsForNotificationType(String productCode, NotificationType notificationType) Gets the expired and valid particular interest of the current customer according to the product code and the notificationTypeprotected Map<String,CollectionSortStrategy> getProductsByCustomerInterests(PageableData pageableData) Finds interests watched by current customerintgetProductsCountByCustomerInterests(PageableData pageableData) Finds the total size of search resultprotected ProductServiceprotected UserServiceprotected SearchPageData<ProductInterestRelationData>pagingProductInterestsList(SearchPageData searchPageData, List<ProductInterestRelationData> interestsList) voidremoveAllProductInterests(String productCode) Removes all interests for specific product for current customervoidremoveProductInterest(ProductInterestData productInterest) Removes the product interestvoidsaveProductInterest(ProductInterestData productInterest) Saves the new or edited interestvoidsetBaseSiteService(BaseSiteService baseSiteService) voidsetBaseStoreService(BaseStoreService baseStoreService) voidsetProductInterestConverter(Converter<ProductInterestModel, ProductInterestData> productInterestConverter) voidsetProductInterestEntryConverter(Converter<Map.Entry<NotificationType, Date>, ProductInterestEntryData> productInterestEntryConverter) voidsetProductInterestRelationConverter(Converter<Map.Entry<ProductModel, List<ProductInterestEntryData>>, ProductInterestRelationData> productInterestRelationConverter) voidsetProductInterestReverseConverter(Converter<ProductInterestData, ProductInterestModel> productInterestReverseConverter) voidsetProductInterestService(ProductInterestService productInterestService) voidsetProductInterestsSortStrategies(Map<String, CollectionSortStrategy> productInterestsSortStrategies) voidsetProductService(ProductService productService) voidsetUserService(UserService userService) protected voidsortingProductInterestsList(SearchPageData searchPageData, List<ProductInterestRelationData> interestsList)
-
Constructor Details
-
DefaultProductInterestFacade
public DefaultProductInterestFacade()
-
-
Method Details
-
saveProductInterest
Description copied from interface:ProductInterestFacadeSaves the new or edited interest- Specified by:
saveProductInterestin interfaceProductInterestFacade- Parameters:
productInterest- the ProductInterest to be saved
-
removeProductInterest
Description copied from interface:ProductInterestFacadeRemoves the product interest- Specified by:
removeProductInterestin interfaceProductInterestFacade- Parameters:
productInterest- the ProductInterest to be removed
-
getProductInterestDataForCurrentCustomer
public Optional<ProductInterestData> getProductInterestDataForCurrentCustomer(String productcode, NotificationType notificationType) Description copied from interface:ProductInterestFacadeGets the particular interest of the current customer according to the product code and the notificationType- Specified by:
getProductInterestDataForCurrentCustomerin interfaceProductInterestFacade- Parameters:
productcode- the code of the product to be foundnotificationType- the notificationType of the wanted ProductInterest- Returns:
- the ProductInterestData
-
getProductInterestsForNotificationType
public List<ProductInterestData> getProductInterestsForNotificationType(String productCode, NotificationType notificationType) Description copied from interface:ProductInterestFacadeGets the expired and valid particular interest of the current customer according to the product code and the notificationType- Specified by:
getProductInterestsForNotificationTypein interfaceProductInterestFacade- Parameters:
productCode- the code of the product to be foundnotificationType- the notificationType of the wanted ProductInterest- Returns:
- the ProductInterestData
-
removeAllProductInterests
Description copied from interface:ProductInterestFacadeRemoves all interests for specific product for current customer- Specified by:
removeAllProductInterestsin interfaceProductInterestFacade- Parameters:
productCode- the code of the product
-
getProductInterest
protected Optional<ProductInterestModel> getProductInterest(String productcode, NotificationType notificationType) -
getProductsByCustomerInterests
Description copied from interface:ProductInterestFacadeFinds interests watched by current customer- Specified by:
getProductsByCustomerInterestsin interfaceProductInterestFacade- Parameters:
pageableData- the pagination data- Returns:
- Map whose key is ProductMode and value is the Map of NotificationType as key and creation time as value.
-
getPaginatedProductInterestsByCustomer
public SearchPageData<ProductInterestRelationData> getPaginatedProductInterestsByCustomer(SearchPageData searchPageData) Description copied from interface:ProductInterestFacadeFinds interests watched by current customer- Specified by:
getPaginatedProductInterestsByCustomerin interfaceProductInterestFacade- Parameters:
searchPageData- the search page data- Returns:
- sorted and paged product interests relation data
-
getPaginatedProductInterestsForNotificationType
public SearchPageData<ProductInterestRelationData> getPaginatedProductInterestsForNotificationType(String productCode, NotificationType notificationType, SearchPageData searchPageData) Description copied from interface:ProductInterestFacadeFinds interests watched by current customer- Specified by:
getPaginatedProductInterestsForNotificationTypein interfaceProductInterestFacade- Parameters:
productCode- the code of the productnotificationType- the notificationType of the wanted ProductInterestsearchPageData- the search page data- Returns:
- sorted and paged product interests relation data
-
getProductInterestRelation
Description copied from interface:ProductInterestFacadeFinds product interest relation for specific product for current customer- Specified by:
getProductInterestRelationin interfaceProductInterestFacade- Parameters:
productCode- the code of the product- Returns:
- product interests relation data.
-
sortingProductInterestsList
protected void sortingProductInterestsList(SearchPageData searchPageData, List<ProductInterestRelationData> interestsList) -
pagingProductInterestsList
protected SearchPageData<ProductInterestRelationData> pagingProductInterestsList(SearchPageData searchPageData, List<ProductInterestRelationData> interestsList) -
buildProductInterestRelationData
protected List<ProductInterestRelationData> buildProductInterestRelationData(Map<ProductModel, Map<NotificationType, Date>> productNotificationMap) -
getProductsCountByCustomerInterests
Description copied from interface:ProductInterestFacadeFinds the total size of search result- Specified by:
getProductsCountByCustomerInterestsin interfaceProductInterestFacade- Parameters:
pageableData- the pagination data- Returns:
- the total size of search result
-
getProductInterestService
-
setProductInterestService
-
getProductInterestConverter
-
setProductInterestConverter
public void setProductInterestConverter(Converter<ProductInterestModel, ProductInterestData> productInterestConverter) -
getProductInterestReverseConverter
-
setProductInterestReverseConverter
public void setProductInterestReverseConverter(Converter<ProductInterestData, ProductInterestModel> productInterestReverseConverter) -
getProductService
-
setProductService
-
getUserService
-
setUserService
-
getBaseStoreService
-
setBaseStoreService
-
getBaseSiteService
-
setBaseSiteService
-
getProductInterestRelationConverter
protected Converter<Map.Entry<ProductModel,List<ProductInterestEntryData>>, getProductInterestRelationConverter()ProductInterestRelationData> -
setProductInterestRelationConverter
public void setProductInterestRelationConverter(Converter<Map.Entry<ProductModel, List<ProductInterestEntryData>>, ProductInterestRelationData> productInterestRelationConverter) -
getProductInterestEntryConverter
protected Converter<Map.Entry<NotificationType,Date>, getProductInterestEntryConverter()ProductInterestEntryData> -
setProductInterestEntryConverter
public void setProductInterestEntryConverter(Converter<Map.Entry<NotificationType, Date>, ProductInterestEntryData> productInterestEntryConverter) -
getProductInterestsSortStrategies
-
setProductInterestsSortStrategies
public void setProductInterestsSortStrategies(Map<String, CollectionSortStrategy> productInterestsSortStrategies)
-