Introduction

The module’s integration allows you to group several products in bundles. The grouping is based on the entered criteria.

Business

Development

Core

Entity Definitions

BundleableAbstractOrderEntryEntityDefinition

The BundleableAbstractOrderEntryEntityDefinition extends the CartEntryEntityDefinition. The CartEntryEntityDefinition, in its turn, goes further to the AbstractEntityDefinition and the AbstractPurchasableEntityDefinition:

asciidoctor diagram BundleableAbstractOrderEntryEntityDefinition

The defined here bundleTemplate property (and its getter/setter pair) lets you associate the abstract order with the respective template.

asciidoctor diagram BundlePriceEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

products

stores a list of products the bundle price is applicable to

prices

stores a set of prices, included in the bundle price

leasingPayments

stores a set of the leasing payment values, included in the bundle price

BundleSelectionCriteriaEntityDefinition

The BundleSelectionCriteriaEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram BundleSelectionCriteriaEntityDefinition
BundleSelectionEntityDefinition

The BundleSelectionEntityDefinition extends the AbstractEntityDefinition and the AbstractCatalogableEntityDefinition:

asciidoctor diagram BundleSelectionEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

bundleTemplate

stores the bundle template the bundle selection is associated with

categories

stores a set of categories, the respective promotion is applicable to

products

stores a set of products, the respective promotion is applicable to

BundleTemplateEntityDefinition

The BundleTemplateEntityDefinition extends the AbstractCatalogableEntityDefinition:

asciidoctor diagram BundleTemplateEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

bundleSelections

stores a set of the selections, the template is for

selectionCriteria

stores the bundle selection criteria for the particular bundle template

FixedNumberBundleSelectionCriteriaEntityDefinition

The FixedNumberBundleSelectionCriteriaEntityDefinition adds extra properties to the BundleSelectionCriteriaEntityDefinition and, respectively, the AbstractEntityDefinition:

asciidoctor diagram FixedNumberBundleSelectionCriteriaEntityDefinition

The extra added property is an Integer one - quantity. It stores information for the quantity of the bundle selection criteria.

RangeBundleSelectionCriteriaEntityDefinition

The RangeBundleSelectionCriteriaEntityDefinition adds extra properties to the BundleSelectionCriteriaEntityDefinition and, respectively, the AbstractEntityDefinition:

asciidoctor diagram RangeBundleSelectionCriteriaEntityDefinition

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

lowerBoundQuantity

stores the minimum bound quantity for the bundle selection criteria

higherBoundQuantity

stores the maximum bound quantity for the bundle selection criteria

Spring Data JPA Repositories

BundlePriceRepository

The BundlePriceRepository extends the BaseCatalogableEntityRepository. This is the corresponding Spring Data JPA repository for the BundlePriceEntityDefinition:

asciidoctor diagram BundlePriceRepository
BundleSelectionCriteriaRepository

The BundleSelectionCriteriaRepository extends the BaseEntityRepository. This is the corresponding Spring Data JPA repository for the BundleSelectionCriteriaEntityDefinition:

asciidoctor diagram BundleSelectionCriteriaRepository
BundleSelectionRepository

The BundleSelectionRepository extends the BaseCatalogableEntityRepository. This is the corresponding Spring Data JPA repository for the BundleSelectionEntityDefinition:

asciidoctor diagram BundleSelectionRepository
BundleTemplateRepository

The BundleTemplateRepository extends the BaseCatalogableEntityRepository. This is the corresponding Spring Data JPA repository for the BundleTemplateEntityDefinition:

asciidoctor diagram BundleTemplateRepository

Business Services

BundleCartService

The BundleCartService inherits the features of the CartService and the AbstractOrderService

asciidoctor diagram BundleCartService
BundlePriceService

Among the helper functionalities, defined within the BundlePriceService, are:

Description Method

to retrieve the price in the chosen current currency for the bundle

getPriceForBundleProducts()

to retrieve the leasing payments in the chosen current currency for the bundle

getLeasingPaymentsForBundleProducts()

BundleService

Among the helper functionalities, defined within the BundleService, are:

Description Method

to retrieve all products from all categories in the given bundle

getProductsInBundleSelection()

to retrieve information if a product is contained in any of the categories of a given bundle

isProductInBundleSelection()

Facade

MapperFactoryConfigurers

BundleCartEntryMapperFactoryConfigurer

Тhe BundleCartEntryMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the BundleableAbstractOrderEntryEntityDefinition to OrderEntryBundleDtoDefinition :

asciidoctor diagram BundleCartEntryMapperFactoryConfigurer

The conversion is customized.

More about the mapping configurations you may read in the respective Orika guide.

Dto definitions

BundleOrderEntryDtoDefinition

The BundleOrderEntryDtoDefinition extends the OrderEntryDtoDefinition and the OrderEntryBundleDtoDefinition:

asciidoctor diagram BundleOrderEntryDtoDefinition
BundleProductDtoDefinition

The BundleProductDtoDefinition extends the ProductBasicDtoDefinition and the ProductPriceDtoDefinition:

asciidoctor diagram BundleProductDtoDefinition
OrderEntryBundleDtoDefinition

The OrderEntryBundleDtoDefinition is the corresponding Dto object for the BundleableAbstractOrderEntryEntityDefinition.

Facades

BundleCartFacade

The BundleCartFacade extends the CartFacade:

asciidoctor diagram BundleCartFacade

The facade provides you with one more extra functionality - to add the opted product bundle to your cart.

BundleProductFacade

The BundleProductFacade provides you with one more extra functionality - to retrieve a list of all bundles, where the product, specified by its product code, is included.

Integration

The integration with the Nemesis platform is pretty straight-forward - just add the module in your classpath:

<dependency>
    <groupId>io.nemesis.platform.module</groupId>
    <artifactId>nemesis-module-bundle</artifactId>
</dependency>