Class UpdateDatabaseService
java.lang.Object
sk.iway.iwcm.components.news.templates.UpdateDatabaseService
Migrate news templates from translation keys to NewsTemplatesEntity.
This service is used in UpdateDatabase to migrate old templates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String,NewsTemplatesEntity> getBaseNewsTemplates(Map<String, String> templatesMap) Builds base news template entities from the supplied translation keys.static List<NewsTemplatesEntity>getFilledNewsTemplates(Map<String, NewsTemplatesEntity> baseTemplatesMap, Map<String, String> templatesMap) static voidConvert translation keys with prefix "news.template." to records in news_templates table
-
Constructor Details
-
UpdateDatabaseService
public UpdateDatabaseService()
-
-
Method Details
-
setNewsTemplates
public static void setNewsTemplates()Convert translation keys with prefix "news.template." to records in news_templates table -
getBaseNewsTemplates
Builds base news template entities from the supplied translation keys. The returned map is keyed by template name without thenews.template.prefix. Each entity contains only its name, template code, engine, and domain ID.- Parameters:
templatesMap- translation key values indexed by their full keys- Returns:
- base template entities indexed by template name without the translation key prefix
-
getFilledNewsTemplates
public static List<NewsTemplatesEntity> getFilledNewsTemplates(Map<String, NewsTemplatesEntity> baseTemplatesMap, Map<String, String> templatesMap)
-