Introduction

The module’s integration allows the customers to find the physical points of service for your company.

Business

Development

Core

Entity Definitions

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

DayOfWeekDefinition

The DayOfWeekDefinition extends AbstractEntityEnum, as shown below:

asciidoctor diagram DayOfWeekDefinition

Within the DayOfWeekDefinition is defined the enum Values. Here are stored the days of the week days.

OpeningScheduleEntityDefinition

The OpeningScheduleEntityDefinition extends AbstractEntityDefinition:

asciidoctor diagram OpeningScheduleEntityDefinition

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

Property Description

name

the name of the store

workingDays

a list of the working days for the store

StorefinderConfigurationEntityDefinition

The StorefinderConfigurationEntityDefinition extends AbstractEntityDefinition:

asciidoctor diagram StorefinderConfigurationEntityDefinition

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

Property Description

pageSize

allows you to control the size of the search page

maxPageSize

stores the information for the maximum size of the page

googleMapsKey

holds the key for the integration of the Google Maps API

StoreLocatorStoreEntityDefinition

The interface the StoreLocatorStoreEntityDefinition extends directly is the StoreEntityDefinition. The StoreEntityDefinition itself goes furhter, extending the AbstractEntityDefinition, the AbstractDescriptionableEntityDefinition and the AbstractNameableEntityDefinition:

asciidoctor diagram StoreLocatorStoreEntityDefinition

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

Property Description

mapIcon

stores the map icon for the particular point of service

storeImage

stores the store image for the particular point of service

storeThumbnail

stores the store thumbnail image for the particular point of service

address

stores the address for the particular point of service

openingSchedule

stores the opening schedule for the particular point of service

storeContent

stores the store’s content for the particular point of service

WeekdayWorkingEntityDefinition

The WeekdayWorkingEntityDefinition extends the WorkingDayEntityDefinition, extending the AbstractEntityDefinition in its turn:

asciidoctor diagram WeekdayWorkingEntityDefinition

The only extra property, defined here, is weekday. It makes refrence to the enumared within the DayOfWeekDefinition values of the weekdays.

WorkingDayEntityDefinition

The WorkingDayEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram WorkingDayEntityDefinition

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

Property Description

openingTime

the time the particular point of service opens at

closingTime

the time the particular point of service closes at

Spring Data JPA Repositories

OpeningScheduleRepository

The OpeningScheduleRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the OpeningScheduleEntityDefinition.

asciidoctor diagram OpeningScheduleRepository
StorefinderConfigurationRepository

The StorefinderConfigurationRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the StorefinderConfigurationEntityDefinition.

asciidoctor diagram StorefinderConfigurationRepository
WorkingDayRepository

The WorkingDayRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the WorkingDayEntityDefinition.

asciidoctor diagram WorkingDayRepository

Facade

MapperFactoryConfigurers

OpeningScheduleMapperFactoryConfigurer

The OpeningScheduleMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the OpeningScheduleEntityDefinition to OpeningScheduleDto.

asciidoctor diagram OpeningScheduleMapperFactoryConfigurer

The conversion is done byDefault() - all properties with the same names are automatically mapped.

StoreLocatorStoreMapperFactoryConfigurer

The StoreLocatorStoreMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the StoreLocatorStoreEntityDefinition to StoreLocatorStoreDtoDefinition.

asciidoctor diagram StoreLocatorStoreMapperFactoryConfigurer

The conversion is customized.

TimeDtoMapperFactoryConfigurer

The TimeDtoMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the LocalTime to TimeDto.

asciidoctor diagram TimeDtoMapperFactoryConfigurer

The conversion is customized.

WeekdayMapperFactoryConfigurer

The WeekdayMapperFactoryConfigurer implements the MapperFactoryConfigurer, converting the WeekdayWorkingEntityDefinition to WeekdayOpeningDayDto.

asciidoctor diagram WeekdayMapperFactoryConfigurer

The conversion is customized.

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

Dto definitions

OpeningDayDto

The OpeningDayDto implements Serializable. This is the corresponding Dto object for the WorkingDayEntityDefinition.

OpeningScheduleDto

The OpeningScheduleDto implements Serializable. This is the corresponding Dto object for the OpeningScheduleEntityDefinition.

StoreLocatorStoreDtoDefinition

The StoreLocatorStoreDtoDefinition implements StoreDtoDefinition. This is the corresponding Dto object for the StoreLocatorStoreEntityDefinition.

asciidoctor diagram StoreLocatorStoreDtoDefinition
WeekdayOpeningDayDto

The WeekdayOpeningDayDto implements OpeningDayDto. This is the corresponding Dto object for the WeekdayWorkingEntityDefinition.

asciidoctor diagram WeekdayMapperFactoryConfigurer

Facades

StoreLocatorFacade

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

  • to get the locations of a given query string that can be either the postal code or the town name

  • to get the point of service for the given unique POS name

  • to calculate the distance in kilometres based on the location provided

  • to contruct the respective Google Maps link

Storefront

Controllers

StoreLocatorController

The StoreLocatorController extends the AbstractViewController, providing views for both - the locator search and details pages.

asciidoctor diagram StoreLocatorController

For further details on mapping, check the corresponding mapping actuator accessible at /platform/mappings.

Tags

StorelocatorFunctions

The StorelocatorFunctions class lets you get an image for a store in a specific format.

Configuration

Name Type Description

nemesis.storelocator.base-url

java.lang.String

nemesis.storelocator.default-location

java.lang.String