Interface ProductInterestFacade
- All Known Implementing Classes:
DefaultProductInterestFacade
public interface ProductInterestFacade
Facade to deal with the ProductInterests
-
Method Summary
Modifier and TypeMethodDescriptiongetPaginatedProductInterestsByCustomer(SearchPageData searchPageData) Finds interests watched by current customergetPaginatedProductInterestsForNotificationType(String productCode, NotificationType notificationType, SearchPageData searchPageData) Finds interests watched by current customergetProductInterestDataForCurrentCustomer(String productcode, NotificationType notificationType) Gets the particular interest of the current customer according to the product code and the notificationTypegetProductInterestRelation(String productCode) Finds product interest relation for specific product for current customergetProductInterestsForNotificationType(String productcode, NotificationType notificationType) Gets the expired and valid particular interest of the current customer according to the product code and the notificationTypegetProductsByCustomerInterests(PageableData pageableData) Finds interests watched by current customerintgetProductsCountByCustomerInterests(PageableData pageableData) Finds the total size of search resultvoidremoveAllProductInterests(String productCode) Removes all interests for specific product for current customervoidremoveProductInterest(ProductInterestData productInterest) Removes the product interestvoidsaveProductInterest(ProductInterestData productInterest) Saves the new or edited interest
-
Method Details
-
saveProductInterest
Saves the new or edited interest- Parameters:
productInterest- the ProductInterest to be saved
-
removeProductInterest
Removes the product interest- Parameters:
productInterest- the ProductInterest to be removed
-
getProductInterestDataForCurrentCustomer
Optional<ProductInterestData> getProductInterestDataForCurrentCustomer(String productcode, NotificationType notificationType) Gets the particular interest of the current customer according to the product code and the notificationType- Parameters:
productcode- the code of the product to be foundnotificationType- the notificationType of the wanted ProductInterest- Returns:
- the ProductInterestData
-
getProductInterestsForNotificationType
List<ProductInterestData> getProductInterestsForNotificationType(String productcode, NotificationType notificationType) Gets the expired and valid particular interest of the current customer according to the product code and the notificationType- Parameters:
productcode- the code of the product to be foundnotificationType- the notificationType of the wanted ProductInterest- Returns:
- the ProductInterestData
-
removeAllProductInterests
Removes all interests for specific product for current customer- Parameters:
productCode- the code of the product
-
getProductsByCustomerInterests
Finds interests watched by current customer- 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.
-
getProductInterestRelation
Finds product interest relation for specific product for current customer- Parameters:
productCode- the code of the product- Returns:
- product interests relation data.
-
getPaginatedProductInterestsByCustomer
SearchPageData<ProductInterestRelationData> getPaginatedProductInterestsByCustomer(SearchPageData searchPageData) Finds interests watched by current customer- Parameters:
params- the conditions for searching product interestssearchPageData- the search page data- Returns:
- sorted and paged product interests relation data
-
getPaginatedProductInterestsForNotificationType
SearchPageData<ProductInterestRelationData> getPaginatedProductInterestsForNotificationType(String productCode, NotificationType notificationType, SearchPageData searchPageData) Finds interests watched by current customer- 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
-
getProductsCountByCustomerInterests
Finds the total size of search result- Parameters:
pageableData- the pagination data- Returns:
- the total size of search result
-