public interface Wishlist2Service
| 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.
|
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
|
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.
|
java.util.List<Wishlist2Model> getWishlists(UserModel user)
user - the owner of the wish listsjava.util.List<Wishlist2Model> getWishlists()
boolean hasDefaultWishlist()
boolean hasDefaultWishlist(UserModel user)
Wishlist2Model createDefaultWishlist(java.lang.String name, java.lang.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, java.lang.String name, java.lang.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(java.lang.String name, java.lang.String description)
name - The name of the wishlistdescription - The description of the wishlistWishlist2Model createWishlist(UserModel user, java.lang.String name, java.lang.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 wishlistjava.lang.NullPointerException - if the user has no default wishlistWishlist2Model getDefaultWishlist()
java.lang.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, java.lang.Integer desired, Wishlist2EntryPriority priority, java.lang.String comment)
wishlist - The wishlist on which the product should be addedproduct - The product which should be added to the wishlistvoid addWishlistEntry(ProductModel product, java.lang.Integer desired, Wishlist2EntryPriority priority, java.lang.String comment)
product - The product which should be added to the wishlistjava.lang.NullPointerException - if the user has no default wishlistvoid addWishlistEntry(UserModel user, ProductModel product, java.lang.Integer desired, Wishlist2EntryPriority priority, java.lang.String comment)
user - the owner of the wishlistproduct - The product which should be added to the wishlistjava.lang.NullPointerException - 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 foundjava.lang.IllegalArgumentException - 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 foundjava.lang.IllegalArgumentException - if parameter product or wishlist is null.Copyright © 2018 SAP SE. All Rights Reserved.