public interface Wishlist2Service
| 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.
|
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.
|
List<Wishlist2Model> getWishlists(UserModel user)
user - the owner of the wish listsList<Wishlist2Model> getWishlists()
boolean hasDefaultWishlist()
boolean hasDefaultWishlist(UserModel user)
Wishlist2Model createDefaultWishlist(String name, String description)
name - The name of the wishlistdescription - The description of the wishlistSystemException - when a default wishlist already exists for the current userWishlist2Model createDefaultWishlist(UserModel user, String name, String description)
user - The user for which the whishlist should be createdname - The name of the wishlistdescription - The description of the wishlistSystemException - when a default wishlist already exists for the current userWishlist2Model createWishlist(String name, String description)
name - The name of the wishlistdescription - The description of the wishlistWishlist2Model createWishlist(UserModel user, String name, String description)
user - The user for which the whishlist should be createdname - The name of the wishlistdescription - The description of the wishlistWishlist2Model getDefaultWishlist(UserModel user)
user - the owner of the wishlistNullPointerException - if the user has no default wishlistWishlist2Model getDefaultWishlist()
NullPointerException - if the user has no default wishlistvoid addWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry)
wishlist - the wishlist the entry should be added toentry - the entry which should be added to the wishlistvoid addWishlistEntry(Wishlist2Model wishlist, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment)
wishlist - The wishlist on which the product should be addedproduct - The product which should be added to the wishlistvoid addWishlistEntry(ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment)
product - The product which should be added to the wishlistNullPointerException - if the user has no default wishlistvoid addWishlistEntry(UserModel user, ProductModel product, Integer desired, Wishlist2EntryPriority priority, String comment)
user - the owner of the wishlistproduct - The product which should be added to the wishlistNullPointerException - if the user has no default wishlistvoid removeWishlistEntry(Wishlist2Model wishlist, Wishlist2EntryModel entry)
wishlist - the wishlist from which the entry should be removedentry - the entry which should be removedWishlist2EntryModel getWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist)
product - the product which is contained in the wishlist entry which needs to be foundwishlist - the wishlist which contains the wishlist entryUnknownIdentifierException - if no wishlist entry that meets the conditions can be found.AmbiguousIdentifierException - if more than one wishlist entry that meets the conditions can be foundIllegalArgumentException - if parameter product or wishlist is null.void removeWishlistEntryForProduct(ProductModel product, Wishlist2Model wishlist)
product - the product which is contained in the wishlist entry which will be removedwishlist - the wishlist from which the entry should be removedUnknownIdentifierException - if no wishlist entry that meets the conditions can be found.AmbiguousIdentifierException - if more than one wishlist entry that meets the conditions can be foundIllegalArgumentException - if parameter product or wishlist is null.Copyright © 2017 SAP SE. All Rights Reserved.