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)
      Builds base news template entities from the supplied translation keys. The returned map is keyed by template name without the news.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)