Repositories and services overview

This section lists the most important repositories and services that are provided by WebCmsModule. These beans are all exposed and can be use in all modules that depend on WebCmsModule.

Use repositories to directly access the datastore. Repository methods are multi-domain agnostic and usually require an explicit WebCmsDomain as parameter to your queries. Repositories will also never return cached items.

Repositories are all implemented using Spring Data JPA.

Services usually are domain aware and will inspect the WebCmsMultiDomainConfiguration to automatically adjust queries to match for the domain bound to a thread. This makes them transparent in use, especially for front-end application building. Services will also use available caches and can return cached items.

Administration UIs will often require more direct use of repositories, whereas services provide convenience methods to avoid too much domain related clotter in your application code.

Repository beans

Repositories provide direct access to the stored entities. Use these if you want to interact directly with the datastore. All repositories of WebCmsModule entities implement both JpaSpecificationExecutor and QueryDslPredicateExecutor. Q classes (e.g. QWebCmsArticle) are also available for all WebCmsModule entities. Pretty much every entity has its own repository.

  • general

    • WebCmsDomainRepository

    • WebCmsComponentRepository

    • WebCmsMenuRepository

    • WebCmsMenuItemRepository

  • types

    • WebCmsTypeSpecifierRepository

    • WebCmsArticleTypeRepository

    • WebCmsComponentTypeRepository

    • WebCmsPageTypeRepository

    • WebCmsPublicationTypeRepository

  • assets

    • WebCmsAssetRepository

    • WebCmsArticleRepository

    • WebCmsImageRepository

    • WebCmsPageRepository

    • WebCmsPublicationRepository

  • endpoints

    • WebCmsEndpointRepository

    • WebCmsAssetEndpointRepository

    • WebCmsRemoteEndpointRepository

    • WebCmsUrlRepository

  • entity links

    • WebCmsTypeSpecifierLinkRepository

Working with WebCmsComponent is usually not done directly but through a WebCmsComponentModel. The WebCmsComponentModelService is probably all you need, but if not, you will almost always want to build the WebCmsComponentModel for your fetched components using the WebCmsComponentModelService.

When implementing your own WebCmsAsset, WebCmsTypeSpecifier or basic WebCmsObject, you should check the generic interfaces for reuse:

  • WebCmsObjectRepository: basic contract for fetching a WebCmsObject by object id

  • WebCmsObjectEntityRepository: base Spring Data repository interface for entities extending WebCmsObjectSuperClass

  • BaseWebCmsTypeSpecifier: base Spring Data repository for custom WebCmsTypeSpecifier implementations

Service beans

Core services

The core services are always created when WebCmsModule is enabled in your application.

Service Description


WebCmsArticle and WebCmsArticleType functionality.


Generic asset related functions (e.g. generate preview URL for an asset).


URL (for asset) related functions.


WebCmsMenu functionality.


WebCmsPage and WebCmsPageType functionality.


WebCmsPublication functionality.


Loading and updating components.


Request scoped bean that can be used to register components to render on the current request.


Functionality for working with content markers in text.


Specific Spring ConversionService implementation used for data importing. Contains specific converters for WebCmsModule types.


General service for importing WebCmsModule data from generic Map<String,Object> structures.


Service for creating default components for any WebCmsAsset by checking for a contentTemplate attached to the WebCmsAssetType.


Service for retrieving domains and related metadata.


Service for accessing the current domain context and inspecting the multi-domain configuration. Extends the WebCmsDomainService.


Request scoped service for retrieving placeholder content registered on the current request.


Request scoped bean to set and retrieve placeholder data for the current request.


Provides utility functions for using during output rendering.


Functionality for retrieving type specifiers.


Utility service for creating a UriComponentsBuilder for either WebCmsAsset, WebCmsEndpoint or WebCmsUrl.


Service for automatic creation of WebCmsComponent based on parsed template content. Mostly used internally, you can use this service if you want to implement your own auto-create functionality.

Admin UI services

These are only available when EntityModule and AdminWebModule are enabled in your application. The focus of these services is to help you build or customize the administration UI.

Service Description


Service for building WebCmsComponentModel administration form elements.


Helper service for retrieving multi-domain configuration for the current request in an admin web context. Utility functions for building domain-aware filters.