Class DefaultWishlist2Service

java.lang.Object
de.hybris.platform.wishlist2.impl.DefaultWishlist2Service
All Implemented Interfaces:
Wishlist2Service

public class DefaultWishlist2Service extends Object implements Wishlist2Service
  • Field Details

    • wishlistDao

      @Deprecated(since="4.1") protected Wishlist2Dao wishlistDao
      Deprecated.
      Since 4.1. Implement the Wishlist2Dao as own property
    • saveAnonymousWishlists

      @Deprecated(since="4.1") protected boolean saveAnonymousWishlists
      Deprecated.
      Since 4.1. Implement the saveAnonymousWishlists boolean as own property
  • Constructor Details

    • DefaultWishlist2Service

      public DefaultWishlist2Service()
  • Method Details

    • getCurrentUser

      protected UserModel getCurrentUser()
    • saveWishlist

      protected boolean saveWishlist(UserModel user)
    • saveWishlist

      protected boolean saveWishlist(Wishlist2Model wishlist)
    • getDefaultWishlist

      public Wishlist2Model getDefaultWishlist(UserModel user)
      Description copied from interface: Wishlist2Service
      Returns the default wishlist for the given user
      Specified by:
      getDefaultWishlist in interface Wishlist2Service
      Parameters:
      user - the owner of the wishlist
      Returns:
      the default wishlist
    • getDefaultWishlist

      public Wishlist2Model getDefaultWishlist()
      Description copied from interface: Wishlist2Service
      Returns the default wishlist for the current user
      Specified by:
      getDefaultWishlist in interface Wishlist2Service
      Returns:
      the default wishlist
    • getWishlists

      public List<Wishlist2Model> getWishlists(UserModel user)
      Description copied from interface: Wishlist2Service
      Returns all wishlists for the given user
      Specified by:
      getWishlists in interface Wishlist2Service
      Parameters:
      user - the owner of the wish lists
      Returns:
      all wishlists of the given user
    • getWishlists

      public List<Wishlist2Model> getWishlists()
      Description copied from interface: Wishlist2Service
      Resturns all wishlists for the current user
      Specified by:
      getWishlists in interface Wishlist2Service
      Returns:
      all wishlists of the current user
    • getWishlistEntryForProduct

      public Wishlist2EntryModel getWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist)
      Description copied from interface: Wishlist2Service
      Returns the wishlist entry which contains the given product from the specific wishlist
      Specified by:
      getWishlistEntryForProduct in interface Wishlist2Service
      Parameters:
      product - the product which is contained in the wishlist entry which needs to be found
      wishlist - the wishlist which contains the wishlist entry
      Returns:
      the found wishlist entry
    • removeWishlistEntryForProduct

      public void removeWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist)
      Description copied from interface: Wishlist2Service
      Removes a wishlist entry from the wishlist which contains the given product. For an anonymous customer (or anonymous customer wishlist), the wishlist will only be saved if the spring property saveAnonymousWishlists is set to true. Per default it is set to false.
      Specified by:
      removeWishlistEntryForProduct in interface Wishlist2Service
      Parameters:
      product - the product which is contained in the wishlist entry which will be removed
      wishlist - the wishlist from which the entry should be removed
    • addWishlistEntry

      public void addWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry)
      Description copied from interface: Wishlist2Service
      Adds the given entry to the given wishlist. For an anonymous customer (or anonymous customer wishlist), the wishlist will only be saved if the spring property saveAnonymousWishlists is set to true. Per default it is set to false.
      Specified by:
      addWishlistEntry in interface Wishlist2Service
      Parameters:
      wishlist - the wishlist the entry should be added to
      entry - the entry which should be added to the wishlist
    • removeWishlistEntry

      public void removeWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry)
      Description copied from interface: Wishlist2Service
      Removes a given entry from the wishlist. For an anonymous customer (or anonymous customer wishlist), the wishlist will only be saved if the spring property saveAnonymousWishlists is set to true. Per default it is set to false.
      Specified by:
      removeWishlistEntry in interface Wishlist2Service
      Parameters:
      wishlist - the wishlist from which the entry should be removed
      entry - the entry which should be removed
    • addWishlistEntry

      public void addWishlistEntry(Wishlist2Model wishlist, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment)
      Description copied from interface: Wishlist2Service
      Adds a given product to the given wishlist
      Specified by:
      addWishlistEntry in interface Wishlist2Service
      Parameters:
      wishlist - The wishlist on which the product should be added
      product - The product which should be added to the wishlist
    • addWishlistEntry

      public void addWishlistEntry(ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment)
      Description copied from interface: Wishlist2Service
      Adds a given product to the default wishlist of the current user
      Specified by:
      addWishlistEntry in interface Wishlist2Service
      Parameters:
      product - The product which should be added to the wishlist
    • addWishlistEntry

      public void addWishlistEntry(UserModel user, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment)
      Description copied from interface: Wishlist2Service
      Adds a given product to the default wishlist of the given user
      Specified by:
      addWishlistEntry in interface Wishlist2Service
      Parameters:
      user - the owner of the wishlist
      product - The product which should be added to the wishlist
    • createDefaultWishlist

      public Wishlist2Model createDefaultWishlist(String name, String description)
      Description copied from interface: Wishlist2Service
      creates a new default wishlist for the current user. For an anonymous customer (or anonymous customer wishlist), the wishlist will only be saved if the spring property saveAnonymousWishlists is set to true. Per default it is set to false.
      Specified by:
      createDefaultWishlist in interface Wishlist2Service
      Parameters:
      name - The name of the wishlist
      description - The description of the wishlist
    • createDefaultWishlist

      public Wishlist2Model createDefaultWishlist(UserModel user, String name, String description)
      Description copied from interface: Wishlist2Service
      creates a new default wishlist for the given user. For an anonymous customer (or anonymous customer wishlist), the wishlist will only be saved if the spring property saveAnonymousWishlists is set to true. Per default it is set to false.
      Specified by:
      createDefaultWishlist in interface Wishlist2Service
      Parameters:
      user - The user for which the whishlist should be created
      name - The name of the wishlist
      description - The description of the wishlist
    • createWishlist

      public Wishlist2Model createWishlist(String name, String description)
      Description copied from interface: Wishlist2Service
      creates a new wishlist for the current user. For an anonymous customer (or anonymous customer wishlist), the wishlist will only be saved if the spring property saveAnonymousWishlists is set to true. Per default it is set to false.
      Specified by:
      createWishlist in interface Wishlist2Service
      Parameters:
      name - The name of the wishlist
      description - The description of the wishlist
    • createWishlist

      public Wishlist2Model createWishlist(UserModel user, String name, String description)
      Description copied from interface: Wishlist2Service
      creates a new wishlist for the given user. For an anonymous customer (or anonymous customer wishlist), the wishlist will only be saved if the spring property saveAnonymousWishlists is set to true. Per default it is set to false.
      Specified by:
      createWishlist in interface Wishlist2Service
      Parameters:
      user - The user for which the whishlist should be created
      name - The name of the wishlist
      description - The description of the wishlist
    • hasDefaultWishlist

      public boolean hasDefaultWishlist()
      Specified by:
      hasDefaultWishlist in interface Wishlist2Service
      Returns:
      true if there is a default wishlist for the current user
    • hasDefaultWishlist

      public boolean hasDefaultWishlist(UserModel user)
      Specified by:
      hasDefaultWishlist in interface Wishlist2Service
      Returns:
      true if there is a default wishlist for the given user
    • setWishlistDao

      public void setWishlistDao(Wishlist2Dao wishlistDao)
    • setSaveAnonymousWishlists

      public void setSaveAnonymousWishlists(boolean saveAnonymousWishlists)
    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)