Introduction

The module’s integration adds the option a product’s guarantee to be activated on a successful purchase.

Business

Development

Core

Entity Definitions

The definitions in this module have id discriminators in the range 190-200.

GuaranteeEntityDefinition

The GuaranteeEntityDefinition extends the basic features, defined in the AbstractEntityDefinition:

asciidoctor diagram GuaranteeEntityDefinition

Business Services

GuaranteeActivationService

The helper functionality, defined in the GuaranteeActivationService, is activateGuarantee(). In the case, when a product is successfully ordered, a new guarantee is activated.

Facade

Facades

GuaranteeFacade

The helper method, defined in the GuaranteeFacade, activates a new guarantee when a product is successfully purchased.

Storefront

Controllers

GuaranteeActivationViewController

The GuaranteeActivationViewController defines several HTTP Endpoints:

  • at /guarantee,

  • at /activate and

  • at /getRegions.json

The generated view is at WEB-INF/views/$[{DEVICE_PREFIX}]/layout/account/guarantee-activation-view.[EXTENSION].

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

Forms

The fields for two forms are defined within the module - GuaranteeActivationForm and GuaranteeAddressForm.

GuaranteeActivationForm

The user’s input, expected here, includes:

  • the code for the guarantee,

  • the size of the product,

  • the type of the product,

  • the name of the store the product is purchased from,

  • the date of the purchase

GuaranteeAddressForm

The whole user’s information is stored here, for example:

  • the name,

  • the gender,

  • the date of birth,

  • the email,

  • the phone number,

  • the address, etc.

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