Introduction

Business

Development

Core

Entity Definitions

asciidoctor diagram ProductCarouselWidgetEntityDefinition

There are 2 properties, defined here:

Property Description

products

stores the set of products that are to be displayed in the carousel widget

categories

stores the set of categories to get the products from and display them in the carousel widget

asciidoctor diagram SimpleCarouselWidgetEntityDefinition

The only extra defined getter-setter here is via the widgets property. When the information is retrieved, a list of widgets for this carousel is returned.

Spring Data JPA Repositories

SimpleCarouselWidgetRepository

The SimpleCarouselWidgetRepository extends the ActivatableRepository and the BaseEntityRepository. It is the corresponding Spring Data JPA repository for the SimpleCarouselWidgetEntityDefinition:

asciidoctor diagram SimpleCarouselWidgetRepository

Facade

Configurers

ProductCarouselWidgetMapperFactoryConfigurer

The ProductCarouselWidgetMapperFactoryConfigurer implements the MapperFactoryConfigurer:

asciidoctor diagram ProductCarouselWidgetMapperFactoryConfigurer

The registered conversions, within the configurer, are:

  • from ProductCarouselWidgetEntityDefinition to ProductCarouselWidgetDtoDefinition,

  • from CategoryEntityDefinition to ProductCarouselCategoryDtoDefinition,

  • from ProductEntityDefinition to ProductCarouselProductDtoDefinition and

  • from ProductEntityDefinition to ProductCategoriesDtoDefinition

Apart from the last one, all of the conversions are done via the byDefault() method.

SimpleCarouselWidgetMapperFactoryConfigurer

The SimpleCarouselWidgetMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the SimpleCarouselWidgetEntityDefinition to SimpleCarouselWidgetDtoDefinition.

asciidoctor diagram SimpleCarouselWidgetMapperFactoryConfigurer

The conversion is done via the byDefault() method.

Dto definitions

asciidoctor diagram ProductCarouselCategoryDtoDefinition

This is the corresponding Dto object for the CategoryEntityDefinition.

asciidoctor diagram ProductCarouselProductDtoDefinition

This is the corresponding Dto object for the ProductEntityDefinition.

ProductCarouselWidgetDtoDefinition

The ProductCarouselWidgetDtoDefinition extends the WidgetDtoDefinition, going further to the AbstractEntityDtoDefinition:

asciidoctor diagram ProductCarouselWidgetDtoDefinition

This is the corresponding Dto object for the ProductCarouselWidgetEntityDefinition.

SimpleCarouselWidgetDtoDefinition

The SimpleCarouselWidgetDtoDefinition extends the WidgetDtoDefinition, going further to the AbstractEntityDtoDefinition:

asciidoctor diagram SimpleCarouselWidgetDtoDefinition

This is the corresponding Dto object for the SimpleCarouselWidgetEntityDefinition.

Storefront

ProductCarouselWidgetController

The ProductCarouselWidgetController extends the AbstractWidgetController:

asciidoctor diagram ProductCarouselWidgetController

Integration

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

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