Class UpdateDatabaseService

java.lang.Object
sk.iway.iwcm.components.news.templates.UpdateDatabaseService

public class UpdateDatabaseService extends Object
Migrate news templates from translation keys to NewsTemplatesEntity. This service is used in UpdateDatabase to migrate old templates.
  • 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

      public static Map<String,NewsTemplatesEntity> getBaseNewsTemplates(Map<String,String> templatesMap)
      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)