1   package com.atlassian.plugins.codegen.modules.confluence.blueprint;
2   
3   import com.atlassian.plugins.codegen.modules.AbstractPluginModuleProperties;
4   
5   /**
6    * Properties for Dialog Wizard Pages in Confluence Blueprints. Extends plugin-module properties to pick up i18n
7    * abilities.
8    *
9    * @since 4.1.8
10   */
11  public class DialogPageProperties extends AbstractPluginModuleProperties
12  {
13      public DialogPageProperties(int pageIndex, String soyPackage, BlueprintStringer stringer)
14      {
15          String pageId = "page" + pageIndex;
16          setProperty("ID", pageId);
17          setProperty("TEMPLATE_KEY", soyPackage + ".wizardPage" + pageIndex);
18  
19          String pageTitleI18nKey = stringer.makeI18nKey("wizard." + pageId + ".title");
20          String pageDescHeaderI18nKey = stringer.makeI18nKey("wizard." + pageId + ".desc.header");
21          String pageDescContentI18nKey = stringer.makeI18nKey("wizard." + pageId + ".desc.content");
22  
23          setProperty("TITLE_I18N_KEY", pageTitleI18nKey);
24          setProperty("DESC_HEADER_I18N_KEY", pageDescHeaderI18nKey);
25          setProperty("DESC_CONTENT_I18N_KEY", pageDescContentI18nKey);
26  
27          addI18nProperty(pageTitleI18nKey, "Wizard Page " + pageIndex + " Title");
28          addI18nProperty(pageDescHeaderI18nKey, "Page " + pageIndex + " Description");
29          addI18nProperty(pageDescContentI18nKey, "This wizard page does A, B and C");
30  
31          put("LAST", false);     // just to make it obvious
32      }
33  }