Introduction
Development
Core
Entity Definitions
The LinkWidgetEntityDefinition extends the WidgetEntityDefinition. The WidgetEntityDefinition
relies further on the extended AbstractEntityDefinition, AbstractActivatableEntityDefinition, AbstractCatalogableEntityDefinition, AbstractCmsEntityDefinition and AbstractFilterableEntityDefinition:

Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:
Property | Description |
---|---|
linkName |
stores the name of the respective link |
url |
stores the url of the respective link |
urlEncoded |
stores a boolean value, indicating if the url of the respective link is encoded or not |
target |
stores the target of the link |
activePatterns |
stores a collection of String url patterns to indicate the link as active |
contentPage |
stores the |
category |
stores a |
The ProductLinkWidgetEntityDefinition extends the LinkWidgetEntityDefinition. Following the inheritance tree of the LinkWidgetEntityDefinition
, the extra extended interfaces are the WidgetEntityDefinition, the AbstractEntityDefinition, the AbstractActivatableEntityDefinition, the AbstractCatalogableEntityDefinition, the AbstractCmsEntityDefinition and the AbstractFilterableEntityDefinition:

The extra getter-setter here is set via the product property. The respective column in the database stores the product we generate the link to.
Spring Data JPA Repositories
The LinkWidgetRepository extends the ActivatableRepository and the BaseEntityRepository. This is the corresponding Spring Data JPA repository for the LinkWidgetEntityDefinition
:

Facade
Configurers
The LinkWidgetMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the LinkWidgetEntityDefinition
to LinkWidgetDtoDefinition
:

The conversion is done via the byDefault()
method.
The ProductLinkWidgetMapperFactoryConfigurer implements the MapperFactoryConfigurer:

There are 2 conversions, registered here:
-
form
ProductEntityDefinition
toProductLinkProductDtoDefinition
and from -
from
ProductLinkWidgetEntityDefinition
toProductLinkWidgetDtoDefinition
The conversion is done via the byDefault()
method.
More about the mapping configurations you may read in the respective Orika guide.
Dto definitions
The LinkWidgetDtoDefinition extends the WidgetDtoDefinition, going further to the AbstractEntityDtoDefinition. This is the corresponding Dto object for the LinkWidgetEntityDefinition
:

The ProductLinkProductDtoDefinition extends the AbstractProductDtoDefinition and the ProductBasicDtoDefinition. The ProductLinkProductDtoDefinition
is the corresponding Dto object for the ProductEntityDefinition

The ProductLinkWidgetDtoDefinition extends the LinkWidgetDtoDefinition, going further to the WidgetDtoDefinition and the AbstractEntityDtoDefinition.

The ProductLinkWidgetDtoDefinition
is the corresponding Dto object for the ProductLinkWidgetEntityDefinition
.
Storefront
Renderer
The LinkWidgetRenderer extends the AbstractWidgetRenderer:

Via the doRender()
method, the respective view is constructed, based on the passed values.
There are no views, associated with the widget.