Introduction

The module’s integration:

  • adds a sitemap to your website;

  • defines a cronjob that will create a sitemap on a certain period;

  • sends the sitemap to Google for indexing

Business

Development

Core

Entity Definitions

The definitions in this module have id discriminators in the range 270-280.

SitemapChangeFrequencyDefinition

The SitemapChangeFrequencyDefinition extends the AbstractEntityEnum, going further to the MixInEnum:

asciidoctor diagram SitemapChangeFrequencyDefinition

The enumeration specifies how frequently the sitemap to be changed - ALWAYS, HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY, or NEVER.

SitemapConfigEntityDefinition

The SitemapConfigEntityDefinition extends the AbstractEntityDefinition:

asciidoctor diagram SitemapConfigEntityDefinition

This JPA entity specifies the configuration of the sitemap. Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

baseUrl

stores the base url for the exported sitemap

media

stores the media where the sitemap will be exported

sitemapPages

stores a set of pages for the sitemap

asciidoctor diagram SitemapPageEntityDefinition

This JPA entity defines the sitemap page. Via the respective getter-setter pairs, the following information can be retrieved/stored in the database:

Property Description

sitemapConfig

stores sitemap configuraiton for the sitemap

urlResolver

stores the Spring Bean url resolver to use when constructing the sitemap

url

stores the url for the sitemap

locale

stores the locale for the sitemap

sitemapChangeFrequency

stores the change frequency of the sitemap

priority

stores the priority of the sitemap

SitemapSiteEntityDefinition

The SitemapSiteEntityDefinition extends the SiteEntityDefinition, going further to the AbstractEntityDefinition and the AbstractDescriptionableEntityDefinition:

asciidoctor diagram SitemapSiteEntityDefinition

The only sitemap-related attribute, defined here, is sitemapConfig. It stores the sitemap configuration for the particular sitemap.

Spring Data JPA Repositories

SitemapConfigRepository

The SitemapConfigRepository extends the BaseEntityRepository and is the corresponding Spring Data JPA repository for the SitemapConfigEntityDefinition:

asciidoctor diagram SitemapConfigRepository
SitemapPageRepository

The SitemapPageRepository extends the ActivatableRepository and the BaseEntityRepository :

asciidoctor diagram SitemapPageRepository

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

Business Services

SitemapService

The SitemapService defines a method that obtains the sitemap media file for the given site.

Facade

Facades

SitemapFacade

The functionalities, defined in the SitemapFacade, let you:

  • check if the current site has a sitemap;

  • initialize a Dto stream from the current site’s sitemap media file;

  • store the given Dto stream in the current site’s sitemap media file;

Storefront

SitemapController

The SitemapController defines an HTTP Endpoint at /sitemap.xml.

There are no views, associated with the module.

Configuration

Name Type Description

nemesis.sitemap.ping-google

java.lang.Boolean

Shall we ping google after the sitemap is created.