Introduction

The module’s integration allows you to define classification catalogs on your website. The catalogs group the products that share the same taxonomy values.

Business

Development

Core

Entity Definitions

The definitions in this module have id discriminators in the range 250-300.

AbstractPredefinableTaxonomyValuesEntityDefinition

Тhe AbstractPredefinableTaxonomyValuesEntityDefinition extends the AbstractEntityDefinition.

asciidoctor diagram AbstractPredefinableTaxonomyValuesEntityDefinition
AbstractTaxonomableEntityDefinition

The AbstractTaxonomableEntityDefinition marks the entity as Taxonomable. Taxonomable is an entity that has a list of taxonomy values. The AbstractTaxonomableEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram AbstractTaxonomableEntityDefinition

The taxonomyValues property holds a list of the taxonomy values for the respective entity.

TaxonAttributeEntityDefinition

The TaxonAttributeEntityDefinition extends AbstractCatalogableEntityDefinition and AbstractNameableEntityDefinition, as shown below:

asciidoctor diagram TaxonAttributeEntityDefinition

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

Property Description

taxons

store the taxons this taxon attribute belongs to

unit

stores the unit the values of the taxon-attribute are measured in

TaxonEntityDefinition

The TaxonEntityDefinition, as a subclass of the CategoryEntityDefinition, defines the taxon entity. It extends the: CategoryEntityDefinition and the AbstractCatalogableEntityDefinition. The CategoryEntityDefinition itself goes further, extending the AbstractEntityDefinition, the AbstractDescriptionableEntityDefinition and the AbstractNameableEntityDefinition:

asciidoctor diagram TaxonEntityDefinition
TaxonomicCategoryEntityDefinition

The TaxonomicCategoryEntityDefinition extends the CategoryEntityDefinition. The CategoryEntityDefinition itself goes further, extending the AbstractEntityDefinition, the AbstractDescriptionableEntityDefinition and the AbstractNameableEntityDefinition:

asciidoctor diagram TaxonomicCategoryEntityDefinition
TaxonomicProductEntityDefinition

The TaxonomicProductEntityDefinition extends the ProductEntityDefinition and the AbstractTaxonomableEntityDefinition:

asciidoctor diagram TaxonomicProductEntityDefinition
TaxonomyDelegateEntityDefinition

The TaxonomyDelegateEntityDefinition holds the value of a taxon-attribute. It extends the AbstractEntityDefinition.

asciidoctor diagram TaxonomyDelegateEntityDefinition
TaxonomySiteEntityDefinition

The TaxonomySiteEntityDefinition adds the taxonomy-related attributes to the site entity model. The SiteEntityDefinition, in its turn, extends the AbstractEntityDefinition and the AbstractDescriptionableEntityDefinition:

asciidoctor diagram TaxonomySiteEntityDefinition
TaxonomyValueEntityDefinition

The TaxonomyValueEntityDefinition extends the AbstractCatalogableEntityDefinition:

asciidoctor diagram TaxonomyValueEntityDefinition

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

Property Description

type

the type of the value

taxonAttribute

stores the taxon attribute the taxon value is for

TaxonomyValueTypeDefinition

The TaxonomyValueTypeDefinition enum holds the value type of the taxonomy definition (TEXT, STRING, NUMBER, etc.).

Spring Data JPA Repositories

TaxonAttributeRepository

The TaxonAttributeRepository extends the BaseCatalogableEntityRepository and is the corresponding Spring Data JPA for the TaxonAttributeEntityDefinition

asciidoctor diagram TaxonAttributeRepository
TaxonomyDelegateRepository

The TaxonomyDelegateRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the TaxonomyDelegateEntityDefinition.

asciidoctor diagram TaxonomyDelegateRepository
TaxonomyValueRepository

The TaxonomyValueRepository extends the BaseCatalogableEntityRepository. This is the respective Spring Data JPA for the TaxonomyValueEntityDefinition.

asciidoctor diagram TaxonomyValueRepository
TaxonRepository

The TaxonRepository extends the BaseCatalogableEntityRepository. This is the respective Spring Data JPA for the TaxonEntityDefinition.

asciidoctor diagram TaxonRepository

Business Services

TaxonomyService

The TaxonomyService provides extra business logic methods for the TaxonAttributeEntityDefinition object.

Facade

MapperFactoryConfigurers

TaxonomyMapperFactoryConfigurer

The TaxonomyMapperFactoryConfigurer implements the MapperFactoryConfigurer:

asciidoctor diagram TaxonomyMapperFactoryConfigurer

Here 3 different conversions take place:

  • from TaxonEntityDefinition to TaxonDtoDefinition,

  • from TaxonAttributeEntityDefinition to TaxonAttributeDtoDefinition and

  • from TaxonomyValueEntityDefinition to TaxonomyValueDtoDefinition

Each of the conversions is done via the byDefault() method.

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

Dto definitions

TaxonAttributeDtoDefinition

The TaxonAttributeDtoDefinition extends the AbstractEntityDtoDefinition. This is the corresponding Dto object for the TaxonAttributeEntityDefinition.

asciidoctor diagram TaxonAttributeDtoDefinition
TaxonomyValueDtoDefinition

The TaxonomyValueDtoDefinition extends the AbstractEntityDtoDefinition. This is the corresponding Dto object for the TaxonomyValueEntityDefinition

asciidoctor diagram TaxonomyValueDtoDefinition
TaxonomicProductDtoDefinition

The TaxonomicProductDtoDefinition inherits several functionalities from the DetailsProductDtoDefinition, the UrlProductDtoDefinition, the DetailsDtoDefinition, the AbstractProductDtoDefinition and the ProductUrlDtoDefinition. Have a look at the diagram below:

asciidoctor diagram TaxonomicProductDtoDefinition
TaxonDtoDefinition

The TaxonDtoDefinition extends the AbstractCategoryDtoDefinition and the CategoryBasicDtoDefinition. This is the corresponding Dto object for the TaxonEntityDefinition.

asciidoctor diagram TaxonDtoDefinition

Facades

TaxonomyFacade

Some helper methods are defined within the TaxonomyFacade. Among the functionalities included here, are:

  • to obtain the value, corresponding to the product with the given product code,

  • to obtain a collection of all values, corresponding to the product with the given product code

  • to obtain a list of all taxons corresponding to the given product

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-taxonomy</artifactId>
</dependency>