Interface ProductInterestFacade

All Known Implementing Classes:
DefaultProductInterestFacade

public interface ProductInterestFacade
Facade to deal with the ProductInterests
  • Method Details

    • 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

      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 found
      notificationType - 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 found
      notificationType - the notificationType of the wanted ProductInterest
      Returns:
      the ProductInterestData
    • removeAllProductInterests

      void removeAllProductInterests(String productCode)
      Removes all interests for specific product for current customer
      Parameters:
      productCode - the code of the product
    • getProductsByCustomerInterests

      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(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 interests
      searchPageData - 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 product
      notificationType - the notificationType of the wanted ProductInterest
      searchPageData - 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