Introduction

Business

Development

Core

Entity Definitions

asciidoctor diagram StackExchangeQuestionsWidgetEntityDefinition

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

Property Description

initialPage

stores the initial page for the widget

pageSize

stores the page size for the widget

tag

stores the tag, used to find questions

site

stores the site for the widget

apiKey

stores the API key for the widget

Spring Data JPA Repositories

StackExchangeQuestionsWidgetRepository

The StackExchangeQuestionsWidgetRepository extends the ActivatableRepository and the BaseEntityRepository:

asciidoctor diagram StackExchangeQuestionsWidgetRepository

This is the corresponding Spring Data JPA repository for the StackExchangeQuestionsWidgetEntityDefinition.

Facade

MapperFactoryConfigurers

StackExchangeQuestionsWidgetMapperFactoryConfigurer

The StackExchangeQuestionsWidgetMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the StackExchangeQuestionsWidgetEntityDefinition to StackExchangeQuestionsWidgetDtoDefinition:

asciidoctor diagram StackExchangeQuestionsWidgetMapperFactoryConfigurer

The conversion is done via the byDeafult() method.

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

Dto definitions

StackExchangeQuestionsWidgetDtoDefinition

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

asciidoctor diagram StackExchangeQuestionsWidgetDtoDefinition

This is the corresponding Dto object for the StackExchangeQuestionsWidgetEntityDefinition.

Storefront

StackExchangeQuestionsWidgetController

The StackExchangeQuestionsWidgetController extends the AbstractWidgetController:

asciidoctor diagram StackExchangeQuestionsWidgetController

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