Introduction
The module’s integration allows your customer:
-
to create a wishlist,
-
to group their favourite products into one
-
or multiple wishlists of their choice.
Development
Core
Entity Definitions
The definitions in this module have id discriminators in the range 320-330. |
The WishlistEntityDefinition extends the AbstractEntityDefinition, as shown below:

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
name |
the name of the customer’s wishlist |
description |
a description of the content for the particular wishlist |
publiclyAccessible |
a straight-forward boolean value, identifying if the wishlist is publicly accessible or not |
defaultWishlist |
a straight-forward boolean value, identifying if the particular wishlist is default or not |
The WishlistEntryEntityDefinition also extends the AbstractEntityDefinition:

The WishlistEntryEntityDefinition
provides methods to handle the information for each and every user’s entry.
Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
comment |
the user’s comment for a particular item |
product |
the respective item’s code |
desiredQuantity |
the number of items wished to be bought |
addedDate |
the date the entry was added to the wishlist |
wishlist |
the name of the wishlist the entry is added to. |
The WishlistNotificationSettingsEntityDefinition extends the NotificationSettingsEntityDefinition, going further to the AbstractEntityDefinition:

The only property defined here - wishlist
- keeps a reference to the user’s desire to receive ot not a wishlist’s notification.
Spring Data JPA Repositories
The WishlistEntryRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the WishlistEntryEntityDefinition
.

The WishlistRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the WishlistEntityDefinition
.

Business Services
The WishlistService allows different operations with the WishlistEntityDefinition
objects. The defined functionalities let you:
Description | Method |
---|---|
add an entry to a wishlist with the given id |
addWishlistEntry() |
create a wishlist |
createWishlist() |
obtain a public wishlist by its id |
getPublicWishlistByCode() |
obtain the wishlist by its id for the provided customer |
getWishlistByCode() |
find a single entry from a wishlist by a productCode |
getWishlistEntryByProductCode(WishlistEntityDefinition |
find a wishlist and make it default |
setDefaultWishlist() |
Facade
MapperFactoryConfigurers
The WishlistEntryMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the WishlistEntryEntityDefinition
to WishlistEntryDto
.

The conversion is done byDefault()
- all properties with the same names will be automatically mapped.
The WishlistMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the WishlistEntityDefinition
to WishlistDto
.

The registered here conversions are:
-
from
WishlistEntityDefinition
toWishlistDto
(customized) and -
from
ProductEntityDefinition
toWishlistDetailsProductDtoDefinition
(via thebuDefault()
method)
More about the mapping configurations you may read in the respective Orika guide.
Dto definitions
The WishlistDto implements theSerializable. This is the corresponding Dto object for the Wishlist
.
The WishlistEntryDto also implements the Serializable. This is the corresponding Dto object for the WishlistEntry
.
The WishlistReminderEmailMessageContextDtoDefinition extends the EmailMessageContextDtoDefinition.

Facades
Some helper methods, related to wishlists, are defined within the WishlistFacade. Among the functionalities included here, are:
-
to add a new entry to the wishlist with the given code of the current user;
-
to create a new entry in the wishlist with the given code of the customer;
-
to create a wishlist for the current user - by or ignoring the username;
-
to get the default wishlist for the current user;
-
to obtain the customer’s wishlist by the given wishlist code;
-
to collect all the wishlists for the current user;
-
to check if a particular product is in any of the user’s wishlists;
-
to delete a wishlist by a given wishlist code
-
to update some information in a user’s wishlist,
-
to set a wishlist as a default one etc.
Storefront
The WishlistEntryController handles 2 HTTP requests. The respective endpoints render either a view, or a JSON:
-
/wishlist/entry/add
or/api/wishlist/entry/add
with expected parameterswishlistCode
(required),productCode
,priority
,description
anduserId
-
/wishlist/entry/remove
or/api/wishlist/entry/remove
with expected parameterswishlistCode
andproductCode
(required)
For further details on mapping, check the corresponding mapping actuator accessible at /platform/mappings
.