public class DefaultWishlist2Service extends AbstractBusinessService implements Wishlist2Service
AbstractService.SerializableDTO| Modifier and Type | Field and Description |
|---|---|
protected boolean |
saveAnonymousWishlists
Deprecated.
Implement the saveAnonymousWishlists boolean as own property
|
protected Wishlist2Dao |
wishlistDao
Deprecated.
Implement the Wishlist2Dao as own property
|
modelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultWishlist2Service() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWishlistEntry(ProductModel product,
Integer desired,
Wishlist2EntryPriority priority,
String comment)
Adds a given product to the default wishlist of the current user
|
void |
addWishlistEntry(UserModel user,
ProductModel product,
Integer desired,
Wishlist2EntryPriority priority,
String comment)
Adds a given product to the default wishlist of the given user
|
void |
addWishlistEntry(Wishlist2Model wishlist,
ProductModel product,
Integer desired,
Wishlist2EntryPriority priority,
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(String name,
String description)
creates a new default wishlist for the current user.
|
Wishlist2Model |
createDefaultWishlist(UserModel user,
String name,
String description)
creates a new default wishlist for the given user.
|
Wishlist2Model |
createWishlist(String name,
String description)
creates a new wishlist for the current user.
|
Wishlist2Model |
createWishlist(UserModel user,
String name,
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
|
Wishlist2EntryModel |
getWishlistEntryForProduct(ProductModel product,
Wishlist2Model wishlist)
Returns the wishlist entry which contains the given product from the specific wishlist
|
List<Wishlist2Model> |
getWishlists()
Resturns all wishlists for the current user
|
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 |
setSaveAnonymousWishlists(boolean saveAnonymousWishlists) |
void |
setWishlistDao(Wishlist2Dao wishlistDao) |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplace@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 List<Wishlist2Model> getWishlists(UserModel user)
Wishlist2ServicegetWishlists in interface Wishlist2Serviceuser - the owner of the wish listspublic 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, Integer desired, Wishlist2EntryPriority priority, 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, Integer desired, Wishlist2EntryPriority priority, String comment)
Wishlist2ServiceaddWishlistEntry in interface Wishlist2Serviceproduct - The product which should be added to the wishlistpublic void addWishlistEntry(UserModel user, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment)
Wishlist2ServiceaddWishlistEntry in interface Wishlist2Serviceuser - the owner of the wishlistproduct - The product which should be added to the wishlistpublic Wishlist2Model createDefaultWishlist(String name, String description)
Wishlist2ServicecreateDefaultWishlist in interface Wishlist2Servicename - The name of the wishlistdescription - The description of the wishlistpublic Wishlist2Model createDefaultWishlist(UserModel user, String name, 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(String name, String description)
Wishlist2ServicecreateWishlist in interface Wishlist2Servicename - The name of the wishlistdescription - The description of the wishlistpublic Wishlist2Model createWishlist(UserModel user, String name, 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)
Copyright © 2017 SAP SE. All Rights Reserved.