Class DefaultWishlist2Service
java.lang.Object
de.hybris.platform.wishlist2.impl.DefaultWishlist2Service
- All Implemented Interfaces:
Wishlist2Service
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDeprecated.Since 4.1.protected Wishlist2DaoDeprecated.Since 4.1. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWishlistEntry(ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment) Adds a given product to the default wishlist of the current uservoidaddWishlistEntry(UserModel user, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment) Adds a given product to the default wishlist of the given uservoidaddWishlistEntry(Wishlist2Model wishlist, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment) Adds a given product to the given wishlistvoidaddWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry) Adds the given entry to the given wishlist.createDefaultWishlist(UserModel user, String name, String description) creates a new default wishlist for the given user.createDefaultWishlist(String name, String description) creates a new default wishlist for the current user.createWishlist(UserModel user, String name, String description) creates a new wishlist for the given user.createWishlist(String name, String description) creates a new wishlist for the current user.protected UserModelReturns the default wishlist for the current usergetDefaultWishlist(UserModel user) Returns the default wishlist for the given userprotected ModelServicegetWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist) Returns the wishlist entry which contains the given product from the specific wishlistResturns all wishlists for the current usergetWishlists(UserModel user) Returns all wishlists for the given userbooleanbooleanhasDefaultWishlist(UserModel user) voidremoveWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry) Removes a given entry from the wishlist.voidremoveWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist) Removes a wishlist entry from the wishlist which contains the given product.protected booleansaveWishlist(UserModel user) protected booleansaveWishlist(Wishlist2Model wishlist) voidsetModelService(ModelService modelService) voidsetSaveAnonymousWishlists(boolean saveAnonymousWishlists) voidsetWishlistDao(Wishlist2Dao wishlistDao)
-
Field Details
-
wishlistDao
Deprecated.Since 4.1. Implement the Wishlist2Dao as own property -
saveAnonymousWishlists
Deprecated.Since 4.1. Implement the saveAnonymousWishlists boolean as own property
-
-
Constructor Details
-
DefaultWishlist2Service
public DefaultWishlist2Service()
-
-
Method Details
-
getCurrentUser
-
saveWishlist
-
saveWishlist
-
getDefaultWishlist
Description copied from interface:Wishlist2ServiceReturns the default wishlist for the given user- Specified by:
getDefaultWishlistin interfaceWishlist2Service- Parameters:
user- the owner of the wishlist- Returns:
- the default wishlist
-
getDefaultWishlist
Description copied from interface:Wishlist2ServiceReturns the default wishlist for the current user- Specified by:
getDefaultWishlistin interfaceWishlist2Service- Returns:
- the default wishlist
-
getWishlists
Description copied from interface:Wishlist2ServiceReturns all wishlists for the given user- Specified by:
getWishlistsin interfaceWishlist2Service- Parameters:
user- the owner of the wish lists- Returns:
- all wishlists of the given user
-
getWishlists
Description copied from interface:Wishlist2ServiceResturns all wishlists for the current user- Specified by:
getWishlistsin interfaceWishlist2Service- Returns:
- all wishlists of the current user
-
getWishlistEntryForProduct
public Wishlist2EntryModel getWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist) Description copied from interface:Wishlist2ServiceReturns the wishlist entry which contains the given product from the specific wishlist- Specified by:
getWishlistEntryForProductin interfaceWishlist2Service- Parameters:
product- the product which is contained in the wishlist entry which needs to be foundwishlist- the wishlist which contains the wishlist entry- Returns:
- the found wishlist entry
-
removeWishlistEntryForProduct
Description copied from interface:Wishlist2ServiceRemoves 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:
removeWishlistEntryForProductin interfaceWishlist2Service- Parameters:
product- the product which is contained in the wishlist entry which will be removedwishlist- the wishlist from which the entry should be removed
-
addWishlistEntry
Description copied from interface:Wishlist2ServiceAdds 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:
addWishlistEntryin interfaceWishlist2Service- Parameters:
wishlist- the wishlist the entry should be added toentry- the entry which should be added to the wishlist
-
removeWishlistEntry
Description copied from interface:Wishlist2ServiceRemoves 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:
removeWishlistEntryin interfaceWishlist2Service- Parameters:
wishlist- the wishlist from which the entry should be removedentry- the entry which should be removed
-
addWishlistEntry
public void addWishlistEntry(Wishlist2Model wishlist, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment) Description copied from interface:Wishlist2ServiceAdds a given product to the given wishlist- Specified by:
addWishlistEntryin interfaceWishlist2Service- Parameters:
wishlist- The wishlist on which the product should be addedproduct- 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:Wishlist2ServiceAdds a given product to the default wishlist of the current user- Specified by:
addWishlistEntryin interfaceWishlist2Service- 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:Wishlist2ServiceAdds a given product to the default wishlist of the given user- Specified by:
addWishlistEntryin interfaceWishlist2Service- Parameters:
user- the owner of the wishlistproduct- The product which should be added to the wishlist
-
createDefaultWishlist
Description copied from interface:Wishlist2Servicecreates 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:
createDefaultWishlistin interfaceWishlist2Service- Parameters:
name- The name of the wishlistdescription- The description of the wishlist
-
createDefaultWishlist
Description copied from interface:Wishlist2Servicecreates 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:
createDefaultWishlistin interfaceWishlist2Service- Parameters:
user- The user for which the whishlist should be createdname- The name of the wishlistdescription- The description of the wishlist
-
createWishlist
Description copied from interface:Wishlist2Servicecreates 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:
createWishlistin interfaceWishlist2Service- Parameters:
name- The name of the wishlistdescription- The description of the wishlist
-
createWishlist
Description copied from interface:Wishlist2Servicecreates 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:
createWishlistin interfaceWishlist2Service- Parameters:
user- The user for which the whishlist should be createdname- The name of the wishlistdescription- The description of the wishlist
-
hasDefaultWishlist
public boolean hasDefaultWishlist()- Specified by:
hasDefaultWishlistin interfaceWishlist2Service- Returns:
- true if there is a default wishlist for the current user
-
hasDefaultWishlist
- Specified by:
hasDefaultWishlistin interfaceWishlist2Service- Returns:
- true if there is a default wishlist for the given user
-
setWishlistDao
-
setSaveAnonymousWishlists
public void setSaveAnonymousWishlists(boolean saveAnonymousWishlists) -
getModelService
-
setModelService
-