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.
Development
Core
Entity Definitions
The definitions in this module have id discriminators in the range 250-300. |
Тhe AbstractPredefinableTaxonomyValuesEntityDefinition extends the AbstractEntityDefinition.

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

The taxonomyValues
property holds a list of the taxonomy values for the respective entity.
The TaxonAttributeEntityDefinition extends AbstractCatalogableEntityDefinition and AbstractNameableEntityDefinition, as shown below:

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 |
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:

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

The TaxonomicProductEntityDefinition extends the ProductEntityDefinition and the AbstractTaxonomableEntityDefinition:

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

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

The TaxonomyValueEntityDefinition extends the AbstractCatalogableEntityDefinition:

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 |
The TaxonomyValueTypeDefinition enum holds the value type of the taxonomy definition (TEXT
, STRING
, NUMBER
, etc.).
Spring Data JPA Repositories
The TaxonAttributeRepository extends the BaseCatalogableEntityRepository and is the corresponding Spring Data JPA for the TaxonAttributeEntityDefinition

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

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

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

Business Services
The TaxonomyService provides extra business logic methods for the TaxonAttributeEntityDefinition
object.
Facade
MapperFactoryConfigurers
The TaxonomyMapperFactoryConfigurer implements the MapperFactoryConfigurer:

Here 3 different conversions take place:
-
from
TaxonEntityDefinition
toTaxonDtoDefinition
, -
from
TaxonAttributeEntityDefinition
toTaxonAttributeDtoDefinition
and -
from
TaxonomyValueEntityDefinition
toTaxonomyValueDtoDefinition
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
The TaxonAttributeDtoDefinition extends the AbstractEntityDtoDefinition. This is the corresponding Dto object for the TaxonAttributeEntityDefinition
.

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

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

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

Facades
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