Interface ProductInterestFacade
-
- All Known Implementing Classes:
DefaultProductInterestFacade
public interface ProductInterestFacade
Facade to deal with the ProductInterests
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SearchPageData<ProductInterestRelationData>
getPaginatedProductInterestsByCustomer(SearchPageData searchPageData)
Finds interests watched by current customerSearchPageData<ProductInterestRelationData>
getPaginatedProductInterestsForNotificationType(java.lang.String productCode, NotificationType notificationType, SearchPageData searchPageData)
Finds interests watched by current customerjava.util.Optional<ProductInterestData>
getProductInterestDataForCurrentCustomer(java.lang.String productcode, NotificationType notificationType)
Gets the particular interest of the current customer according to the product code and the notificationTypeProductInterestRelationData
getProductInterestRelation(java.lang.String productCode)
Finds product interest relation for specific product for current customerjava.util.List<ProductInterestData>
getProductInterestsForNotificationType(java.lang.String productcode, NotificationType notificationType)
Gets the expired and valid particular interest of the current customer according to the product code and the notificationTypejava.util.List<ProductInterestRelationData>
getProductsByCustomerInterests(PageableData pageableData)
Finds interests watched by current customerint
getProductsCountByCustomerInterests(PageableData pageableData)
Finds the total size of search resultvoid
removeAllProductInterests(java.lang.String productCode)
Removes all interests for specific product for current customervoid
removeProductInterest(ProductInterestData productInterest)
Removes the product interestvoid
saveProductInterest(ProductInterestData productInterest)
Saves the new or edited interest
-
-
-
Method Detail
-
saveProductInterest
void saveProductInterest(ProductInterestData productInterest)
Saves the new or edited interest- Parameters:
productInterest
- the ProductInterest to be saved
-
removeProductInterest
void removeProductInterest(ProductInterestData productInterest)
Removes the product interest- Parameters:
productInterest
- the ProductInterest to be removed
-
getProductInterestDataForCurrentCustomer
java.util.Optional<ProductInterestData> getProductInterestDataForCurrentCustomer(java.lang.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
java.util.List<ProductInterestData> getProductInterestsForNotificationType(java.lang.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
void removeAllProductInterests(java.lang.String productCode)
Removes all interests for specific product for current customer- Parameters:
productCode
- the code of the product
-
getProductsByCustomerInterests
java.util.List<ProductInterestRelationData> getProductsByCustomerInterests(PageableData pageableData)
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
ProductInterestRelationData getProductInterestRelation(java.lang.String productCode)
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(java.lang.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
int getProductsCountByCustomerInterests(PageableData pageableData)
Finds the total size of search result- Parameters:
pageableData
- the pagination data- Returns:
- the total size of search result
-
-