Interface ProductInterestFacade

  • All Known Implementing Classes:
    DefaultProductInterestFacade

    public interface ProductInterestFacade
    Facade to deal with the ProductInterests
    • 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 found
        notificationType - 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 found
        notificationType - 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 interests
        searchPageData - 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 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