Interface SelectiveCartService

  • All Known Implementing Classes:
    DefaultSelectiveCartService

    public interface SelectiveCartService
    Deals with selective cart related Models using existing DAOs
    • Method Detail

      • getWishlistForSelectiveCart

        Wishlist2Model getWishlistForSelectiveCart()
        Gets wishlist for selective cart and the current user
        Returns:
        the wishlist model
      • getWishlistEntryForProduct

        Wishlist2EntryModel getWishlistEntryForProduct​(ProductModel product)
        Gets wishlist entry by product code
        Parameters:
        product - the product code
        Returns:
        the wishlist entry model
      • getWishlistEntryForProduct

        Wishlist2EntryModel getWishlistEntryForProduct​(ProductModel product,
                                                       Wishlist2Model wishlist)
        Gets wishlist entry by product code and wishlist
        Parameters:
        product - the product code
        wishlist - the wishlist model
        Returns:
        the wishlist entry model
      • removeWishlistEntryForProduct

        void removeWishlistEntryForProduct​(ProductModel product,
                                           Wishlist2Model wishlist)
        Removes wishlist entry by product code and wishlist
        Parameters:
        product - the product code
        wishlist - the wishlist model
      • updateQuantityForWishlistEntry

        void updateQuantityForWishlistEntry​(Wishlist2EntryModel wishlistEntry,
                                            java.lang.Integer quantity)
        Updates the quantity of the give wishlist entry
        Parameters:
        wishlistEntry - the wishlist entry model
        quantity - the total number of quantity
      • createWishlist

        Wishlist2Model createWishlist()
        Creates a wish list for the current customer
        Returns:
        the wishlist model
      • saveWishlistEntryForProduct

        Wishlist2EntryModel saveWishlistEntryForProduct​(ProductModel product,
                                                        Wishlist2Model wishlist,
                                                        java.util.Date addToCartTime)
        Saves wishlist entry and addToCartTime by product and wishlist
        Parameters:
        product - the product code
        wishlist - the wishlist model
        addToCartTime - the added to cart time for a wishlist entry
        Returns:
        the saved wishlist entry
      • updateCartTimeForOrderEntry

        void updateCartTimeForOrderEntry​(java.lang.String cartCode,
                                         int entryNumber,
                                         java.util.Date addToCartTime)
        Updates to the original addToCartTime when moving the wishlist entry from cart
        Parameters:
        cartCode - the cart code used for getting cart entry
        entryNumber - the entry number used for getting cart entry
        addToCartTime - the new "added to cart" time
      • getSelectiveCartForUser

        java.util.Optional<CartModel> getSelectiveCartForUser​(UserModel user)
        Finds invisible saved cart for selective cart
        Parameters:
        user - the user
        Returns:
        the Optional CartModel