Introduction

The blog module of the Nemesis Platform provides a blog that you can integrate in your website.

Business

Development

Core

Entity Definitions

The definitions in this module have id discriminators in the range 130-140.

BlogEntryEntityDefinition

The BlogEntryEntityDefinition extends the AbstractEntityDefinition, the AbstractActivatableEntityDefinition, the AbstractCatalogableEntityDefinition, the AbstractCategorizableEntityDefinition, the AbstractCmsEntityDefinition, the AbstractPicturableEntityDefinition and the link:../../apidocs/com/nemesis/platform/module/cms/core/definition/AbstractMetaDatableEntityDefinition.html [AbstractMetaDatableEntityDefinition]:

asciidoctor diagram BlogEntryEntityDefinition

The teaser getter-setter pair defined here lets you retrieve/store a short version of what your blog entry is about in the database.

The thumbnail getter-setter pair stores the thumbnail media for the given blog entry.

Spring Data JPA Repositories

BlogEntryRepository

The BlogEntryRepository extends the link:../. ./core/apidocs/com/nemesis/platform/core/repository/jpa/active/ActivatableRepository.html[ActivatableRepository] and the BaseCatalogableEntityRepository. The BlogEntryRepository is the corresponding Spring Data JPA repository for the BlogEntryEntityDefinition:

asciidoctor diagram BlogEntryRepository

Facade

MapperFactoryConfigurers

BlogEntryMapperFactoryConfigurer

The BlogEntryMapperFactoryConfigurer implements the MapperFactoryConfigurer :

asciidoctor diagram BlogEntryMapperFactoryConfigurer

The registered conversions here are:

  • from BlogEntryEntityDefinition to BlogEntryDto,

  • from CategoryEntityDefinition to CategoryDtoDefinition and

  • from BlogEntryEntityDefinition to SearchRequestCmsDtoDefinition

The first conversion is customized, whereas the registration for the other two is not specified.

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

Dto definitions

BlogEntryDto

The BlogEntryDto is the corresponding Dto object for the BlogEntryEntityDefinition. It extends the AbstractMetaDatableDtoDefinition:

asciidoctor diagram BlogEntryDto

Facades

BlogFacade

The extra functionalities, defined in the BlogFacade, allow you to:

  • retrieve a blog entry by its code,

  • retrieve all blog entries, published lately,

  • retrieve all published blog entries for the given category code,

  • retrieve all defined blog categories,

  • retrieve a blog category by its code

Storefront

The provided controllers here are two - the AtomFeedController and the BlogViewController. The BlogViewController extends the AbstractViewController. The latter relies on the features of the AbstractController:

asciidoctor diagram BlogViewController

The purpose of the controllers may be summarized as follows:

Class

Pattern

Description

BlogViewController

/{blogEntryUid}, /category/{blogCategoryUid}

Responsible for returning the correct view to render the JSPs.

AtomFeedController

/blog.atom, /blog/category/{blogCategoryUid}.atom

Responsible for rendering ATOM feed for your blog. This allows your customers to subscribe to the blog or to one of its categories.

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

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