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) Loop translation keys from input and return map of NewsTemplatesEntity.static List<NewsTemplatesEntity>
getFilledNewsTemplates
(Map<String, NewsTemplatesEntity> baseTemplatesMap, Map<String, String> templatesMap) static void
Convert 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
Loop translation keys from input and return map of NewsTemplatesEntity. The key in map is name of template (without prefix "news.template."), value is NewsTemplatesEntity. Entities in map have set only name, templateCode, engine and domainId.- Parameters:
translationKeys
-- Returns:
-
getFilledNewsTemplates
public static List<NewsTemplatesEntity> getFilledNewsTemplates(Map<String, NewsTemplatesEntity> baseTemplatesMap, Map<String, String> templatesMap)
-