Introduction
The blog module of the Nemesis Platform provides a blog that you can integrate in your website.
Development
Core
Entity Definitions
The definitions in this module have id discriminators in the range 130-140. |
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]:

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
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
:

Facade
MapperFactoryConfigurers
The BlogEntryMapperFactoryConfigurer implements the MapperFactoryConfigurer :

The registered conversions here are:
-
from
BlogEntryEntityDefinition
toBlogEntryDto
, -
from
CategoryEntityDefinition
toCategoryDtoDefinition
and -
from
BlogEntryEntityDefinition
toSearchRequestCmsDtoDefinition
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
The BlogEntryDto is the corresponding Dto object for the BlogEntryEntityDefinition
. It extends the AbstractMetaDatableDtoDefinition:

Facades
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:

The purpose of the controllers may be summarized as follows:
Class |
Pattern |
Description |
|
|
Responsible for returning the correct view to render the JSPs. |
|
|
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
.