public class DefaultWishlist2Service extends java.lang.Object implements Wishlist2Service
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
saveAnonymousWishlists
Deprecated.
Since 4.1. Implement the saveAnonymousWishlists boolean as own property
|
protected Wishlist2Dao |
wishlistDao
Deprecated.
Since 4.1. Implement the Wishlist2Dao as own property
|
| Constructor and Description |
|---|
DefaultWishlist2Service() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWishlistEntry(ProductModel product,
java.lang.Integer desired,
Wishlist2EntryPriority priority,
java.lang.String comment)
Adds a given product to the default wishlist of the current user
|
void |
addWishlistEntry(UserModel user,
ProductModel product,
java.lang.Integer desired,
Wishlist2EntryPriority priority,
java.lang.String comment)
Adds a given product to the default wishlist of the given user
|
void |
addWishlistEntry(Wishlist2Model wishlist,
ProductModel product,
java.lang.Integer desired,
Wishlist2EntryPriority priority,
java.lang.String comment)
Adds a given product to the given wishlist
|
void |
addWishlistEntry(Wishlist2Model wishlist,
Wishlist2EntryModel entry)
Adds the given entry to the given wishlist.
|
Wishlist2Model |
createDefaultWishlist(java.lang.String name,
java.lang.String description)
creates a new default wishlist for the current user.
|
Wishlist2Model |
createDefaultWishlist(UserModel user,
java.lang.String name,
java.lang.String description)
creates a new default wishlist for the given user.
|
Wishlist2Model |
createWishlist(java.lang.String name,
java.lang.String description)
creates a new wishlist for the current user.
|
Wishlist2Model |
createWishlist(UserModel user,
java.lang.String name,
java.lang.String description)
creates a new wishlist for the given user.
|
protected UserModel |
getCurrentUser() |
Wishlist2Model |
getDefaultWishlist()
Returns the default wishlist for the current user
|
Wishlist2Model |
getDefaultWishlist(UserModel user)
Returns the default wishlist for the given user
|
protected ModelService |
getModelService() |
Wishlist2EntryModel |
getWishlistEntryForProduct(ProductModel product,
Wishlist2Model wishlist)
Returns the wishlist entry which contains the given product from the specific wishlist
|
java.util.List<Wishlist2Model> |
getWishlists()
Resturns all wishlists for the current user
|
java.util.List<Wishlist2Model> |
getWishlists(UserModel user)
Returns all wishlists for the given user
|
boolean |
hasDefaultWishlist() |
boolean |
hasDefaultWishlist(UserModel user) |
void |
removeWishlistEntry(Wishlist2Model wishlist,
Wishlist2EntryModel entry)
Removes a given entry from the wishlist.
|
void |
removeWishlistEntryForProduct(ProductModel product,
Wishlist2Model wishlist)
Removes a wishlist entry from the wishlist which contains the given product.
|
protected boolean |
saveWishlist(UserModel user) |
protected boolean |
saveWishlist(Wishlist2Model wishlist) |
void |
setModelService(ModelService modelService) |
void |
setSaveAnonymousWishlists(boolean saveAnonymousWishlists) |
void |
setWishlistDao(Wishlist2Dao wishlistDao) |
@Deprecated protected Wishlist2Dao wishlistDao
@Deprecated protected boolean saveAnonymousWishlists
protected UserModel getCurrentUser()
protected boolean saveWishlist(UserModel user)
protected boolean saveWishlist(Wishlist2Model wishlist)
public Wishlist2Model getDefaultWishlist(UserModel user)
Wishlist2ServicegetDefaultWishlist in interface Wishlist2Serviceuser - the owner of the wishlistpublic Wishlist2Model getDefaultWishlist()
Wishlist2ServicegetDefaultWishlist in interface Wishlist2Servicepublic java.util.List<Wishlist2Model> getWishlists(UserModel user)
Wishlist2ServicegetWishlists in interface Wishlist2Serviceuser - the owner of the wish listspublic java.util.List<Wishlist2Model> getWishlists()
Wishlist2ServicegetWishlists in interface Wishlist2Servicepublic Wishlist2EntryModel getWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist)
Wishlist2ServicegetWishlistEntryForProduct in interface Wishlist2Serviceproduct - the product which is contained in the wishlist entry which needs to be foundwishlist - the wishlist which contains the wishlist entrypublic void removeWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist)
Wishlist2ServiceremoveWishlistEntryForProduct in interface Wishlist2Serviceproduct - the product which is contained in the wishlist entry which will be removedwishlist - the wishlist from which the entry should be removedpublic void addWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry)
Wishlist2ServiceaddWishlistEntry in interface Wishlist2Servicewishlist - the wishlist the entry should be added toentry - the entry which should be added to the wishlistpublic void removeWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry)
Wishlist2ServiceremoveWishlistEntry in interface Wishlist2Servicewishlist - the wishlist from which the entry should be removedentry - the entry which should be removedpublic void addWishlistEntry(Wishlist2Model wishlist, ProductModel product, java.lang.Integer desired, Wishlist2EntryPriority priority, java.lang.String comment)
Wishlist2ServiceaddWishlistEntry in interface Wishlist2Servicewishlist - The wishlist on which the product should be addedproduct - The product which should be added to the wishlistpublic void addWishlistEntry(ProductModel product, java.lang.Integer desired, Wishlist2EntryPriority priority, java.lang.String comment)
Wishlist2ServiceaddWishlistEntry in interface Wishlist2Serviceproduct - The product which should be added to the wishlistpublic void addWishlistEntry(UserModel user, ProductModel product, java.lang.Integer desired, Wishlist2EntryPriority priority, java.lang.String comment)
Wishlist2ServiceaddWishlistEntry in interface Wishlist2Serviceuser - the owner of the wishlistproduct - The product which should be added to the wishlistpublic Wishlist2Model createDefaultWishlist(java.lang.String name, java.lang.String description)
Wishlist2ServicecreateDefaultWishlist in interface Wishlist2Servicename - The name of the wishlistdescription - The description of the wishlistpublic Wishlist2Model createDefaultWishlist(UserModel user, java.lang.String name, java.lang.String description)
Wishlist2ServicecreateDefaultWishlist in interface Wishlist2Serviceuser - The user for which the whishlist should be createdname - The name of the wishlistdescription - The description of the wishlistpublic Wishlist2Model createWishlist(java.lang.String name, java.lang.String description)
Wishlist2ServicecreateWishlist in interface Wishlist2Servicename - The name of the wishlistdescription - The description of the wishlistpublic Wishlist2Model createWishlist(UserModel user, java.lang.String name, java.lang.String description)
Wishlist2ServicecreateWishlist in interface Wishlist2Serviceuser - The user for which the whishlist should be createdname - The name of the wishlistdescription - The description of the wishlistpublic boolean hasDefaultWishlist()
hasDefaultWishlist in interface Wishlist2Servicepublic boolean hasDefaultWishlist(UserModel user)
hasDefaultWishlist in interface Wishlist2Servicepublic void setWishlistDao(Wishlist2Dao wishlistDao)
public void setSaveAnonymousWishlists(boolean saveAnonymousWishlists)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.