1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package info.magnolia.module.templatingkit.setup;
35
36 import static info.magnolia.jcr.nodebuilder.Ops.*;
37
38 import info.magnolia.cms.core.Content;
39 import info.magnolia.cms.util.ContentUtil;
40 import info.magnolia.context.MgnlContext;
41 import info.magnolia.dam.jcr.JcrAssetProvider;
42 import info.magnolia.dam.templating.functions.DamTemplatingFunctions;
43 import info.magnolia.jcr.util.NodeTypes;
44 import info.magnolia.module.DefaultModuleVersionHandler;
45 import info.magnolia.module.InstallContext;
46 import info.magnolia.module.data.setup.RegisterNodeTypeTask;
47 import info.magnolia.module.delta.AbstractRepositoryTask;
48 import info.magnolia.module.delta.ArrayDelegateTask;
49 import info.magnolia.module.delta.BootstrapSingleModuleResource;
50 import info.magnolia.module.delta.BootstrapSingleResource;
51 import info.magnolia.module.delta.CheckAndModifyPropertyValueTask;
52 import info.magnolia.module.delta.CheckOrCreatePropertyTask;
53 import info.magnolia.module.delta.CopyNodeTask;
54 import info.magnolia.module.delta.CreateNodeTask;
55 import info.magnolia.module.delta.DeltaBuilder;
56 import info.magnolia.module.delta.IsModuleInstalledOrRegistered;
57 import info.magnolia.module.delta.ModuleDependencyBootstrapTask;
58 import info.magnolia.module.delta.MoveNodeTask;
59 import info.magnolia.module.delta.NewPropertyTask;
60 import info.magnolia.module.delta.NodeExistsDelegateTask;
61 import info.magnolia.module.delta.OrderNodeAfterTask;
62 import info.magnolia.module.delta.PartialBootstrapTask;
63 import info.magnolia.module.delta.PropertyExistsDelegateTask;
64 import info.magnolia.module.delta.RemoveNodeTask;
65 import info.magnolia.module.delta.RemovePropertyTask;
66 import info.magnolia.module.delta.SetPropertyTask;
67 import info.magnolia.module.delta.Task;
68 import info.magnolia.module.delta.TaskExecutionException;
69 import info.magnolia.module.delta.WarnTask;
70 import info.magnolia.module.form.setup.ChangeValidationToMultiValuedPropertyTask;
71 import info.magnolia.module.form.setup.migration.AddMissingDefaultValuesToFieldsTask;
72 import info.magnolia.module.inplacetemplating.setup.TemplatesInstallTask;
73 import info.magnolia.module.model.Version;
74 import info.magnolia.module.resources.setup.InstallResourcesTask;
75 import info.magnolia.module.templatingkit.dam.STKAssetRenderer;
76 import info.magnolia.module.templatingkit.setup.for2_7.MigrationTasks;
77 import info.magnolia.module.templatingkit.setup.for2_7.ReorderSTKAppsTask;
78 import info.magnolia.module.templatingkit.setup.for2_9.MigrateTemplateTypesTask;
79 import info.magnolia.module.templatingkit.setup.for2_9.RemoveTreeTemplatesTask;
80 import info.magnolia.jcr.nodebuilder.task.ErrorHandling;
81 import info.magnolia.jcr.nodebuilder.task.NodeBuilderTask;
82 import info.magnolia.repository.RepositoryConstants;
83 import info.magnolia.ui.admincentral.setup.ConvertListAclToAppPermissionsTask;
84 import info.magnolia.ui.dialog.setup.DialogMigrationTask;
85 import info.magnolia.ui.form.field.definition.LinkFieldDefinition;
86 import info.magnolia.ui.form.field.definition.TextFieldDefinition;
87
88 import java.util.ArrayList;
89 import java.util.Arrays;
90 import java.util.HashMap;
91 import java.util.List;
92 import java.util.Map;
93
94 import javax.jcr.ImportUUIDBehavior;
95 import javax.jcr.Node;
96 import javax.jcr.RepositoryException;
97 import javax.jcr.Session;
98 import javax.jcr.ValueFormatException;
99
100
101
102
103 public class STKModuleVersionHandler extends DefaultModuleVersionHandler {
104
105 protected static final String STK_TEASER_OPENER = "/modules/standard-templating-kit/dialogs/components/teasers/stkTeaserOpener";
106 protected static final String STK_LOGOUT_TEXT_FIELD = "/modules/standard-templating-kit/dialogs/components/pur/stkPURLink/form/tabs/tabPURLink/fields/logoutText";
107 private static final String I18N_BASENAME = "info.magnolia.module.templatingkit.messages";
108 private static final String AREAS_PROTOTYPE_PATH = "/modules/standard-templating-kit/config/site/templates/prototype/areas/";
109 final Task changeMaxImagesPropertyTypeToLong = new AbstractRepositoryTask("Set right maxImages property type", "Change maxImages property type of stkImageGallery template to Long .") {
110
111 final String path = "/modules/standard-templating-kit/templates/pages/stkImageGallery/areas/main/areas/content/autoGeneration/content/singleton";
112 final String property = "maxImages";
113
114 @Override
115 protected void doExecute(InstallContext installContext) throws RepositoryException, TaskExecutionException {
116 Session session = MgnlContext.getJCRSession(RepositoryConstants.CONFIG);
117 if (session.nodeExists(path)) {
118 Node node = session.getNode(path);
119 if (node.hasProperty(property)) {
120 Long valueNewType;
121 try {
122 valueNewType = node.getProperty(property).getLong();
123 } catch (ValueFormatException e) {
124
125 valueNewType = 9L;
126 }
127 node.setProperty(property, valueNewType);
128 }
129 }
130 }
131 };
132 private final String contactField = "/modules/standard-templating-kit/dialogs/components/teasers/stkTeaserContact/form/tabs/tabTeaser/fields/contact";
133 private final Task fixContactField = new NodeExistsDelegateTask("Fix 'stkTeaserContact' field", String.format("Fix '%s' field", contactField),
134 RepositoryConstants.CONFIG, contactField, new ArrayDelegateTask("",
135 new CheckAndModifyPropertyValueTask("", "", RepositoryConstants.CONFIG, contactField, "appName", "pages", "contacts"),
136 new SetPropertyTask(RepositoryConstants.CONFIG, contactField, "tree", "Contact"))
137 );
138 private final Task reconfigureLogoutTextField = new NodeExistsDelegateTask("Change class and delete properties", STK_LOGOUT_TEXT_FIELD, new ArrayDelegateTask("",
139 new CheckAndModifyPropertyValueTask(STK_LOGOUT_TEXT_FIELD, "class", LinkFieldDefinition.class.getName(), TextFieldDefinition.class.getName()),
140 new RemovePropertyTask("", STK_LOGOUT_TEXT_FIELD, "appName"),
141 new RemovePropertyTask("", STK_LOGOUT_TEXT_FIELD, "targetWorkspace"),
142 new RemoveNodeTask("", STK_LOGOUT_TEXT_FIELD + "/identifierToPathConverter")));
143
144 private final Task copySTKSiteConfigurationToSiteModule = new NodeExistsDelegateTask("Copy STK site definition to its new home", "/modules/site/config/site",
145 new WarnTask("Warn about already existing site", "Could not copy STK site to new site module. Check you configuration at /modules/site/config/site"),
146 new ArrayDelegateTask("",
147 new CopyNodeTask("Copy STK site definition to its new home", "/modules/standard-templating-kit/config/site", "/modules/site/config/site", false),
148 new CheckOrCreatePropertyTask("", "/modules/site/config/site", "class", "info.magnolia.module.templatingkit.sites.Site"),
149 new CheckOrCreatePropertyTask("", "/modules/site/config/site/templates/prototype", "class", "info.magnolia.module.templatingkit.templates.pages.STKPage")));
150
151 public STKModuleVersionHandler() {
152
153 register(DeltaBuilder.checkPrecondition("2.0", "2.5"));
154
155 register(DeltaBuilder.update("2.0.1", "")
156 .addTask(new NodeBuilderTask("Add editable property to stkSection page", "Adds and sets editable property to true for sectionHeader area on stkSection pages.", ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkSection/areas",
157 getNode("sectionHeader").then(
158 addProperty("editable", Boolean.TRUE.toString())
159 )
160 ))
161 .addTask(new NodeBuilderTask("Add editable property to areas", "Adds and sets editable property to false on sectionHeader, footer and metaNavigation.", ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/standard-templating-kit/config/site/templates/prototype/areas",
162 getNode("sectionHeader").then(
163 addProperty("editable", Boolean.FALSE.toString())
164 )
165 ))
166 );
167
168 register(DeltaBuilder.update("2.0.2", "")
169 .addTask(new IsModuleInstalledOrRegistered("Use of commenting module", "Use of commenting module by default in STK", "commenting",
170 new CheckAndModifyPropertyValueTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/config/site/templates/prototype/areas/main/areas/comments/availableComponents/stkComments", "id", "standard-templating-kit:components/features/stkComments", "commenting:components/comments")))
171 );
172
173 register(DeltaBuilder.update("2.0.3", "")
174 .addTask(changeMaxImagesPropertyTypeToLong)
175 );
176
177 register(DeltaBuilder.update("2.0.4", "")
178 .addTask(new NodeExistsDelegateTask("Check and used correct templateScript for stkFAQ", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkFAQ/areas/main",
179 new PropertyExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkFAQ/areas/main", "templateScript", null,
180 new CheckOrCreatePropertyTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkFAQ/areas/main", "templateScript", "/templating-kit/pages/content/mainArea.ftl"))))
181 .addTask(new NodeExistsDelegateTask("Check and used correct templateScript for stkImageGallery", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkImageGallery/areas/main",
182 new PropertyExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkImageGallery/areas/main", "templateScript", null,
183 new CheckOrCreatePropertyTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkImageGallery/areas/main", "templateScript", "/templating-kit/pages/content/mainArea.ftl"))))
184 );
185
186 register(DeltaBuilder.update("2.0.7", "")
187 .addTask(new ArrayDelegateTask("New PUR demo component", "Hides input field while logged in",
188 new BootstrapSingleModuleResource("Component definition", "", "templates/components/pur/config.modules.standard-templating-kit.templates.components.pur.stkPUREdit.xml"),
189 new PartialBootstrapTask("Register the component to fields set", "Makes the component available while authoring", "/mgnl-bootstrap/standard-templating-kit/templates/components/pur/config.modules.standard-templating-kit.templates.components.pur.groupFields.xml", "/groupFields/areas/fields/availableComponents/stkPUREdit", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
190 )
191 .addTask(new RemoveNodeTask("Remove old flowplayer from resources", "Remove flowplayer version 3.2.7 from resources", "resources", "/templating-kit/js/mediaplayer/flowplayer-3-2-7"))
192 .addTask(new RemoveNodeTask("Remove old flowplayer controls from resources", "Remove flowplayer controls version 3.2.5 from resources", "resources", "/templating-kit/js/mediaplayer/flowplayer.controls-3-2-5"))
193 .addTask(new InstallResourcesTask("/templating-kit/js/mediaplayer/.*.swf", "resources:binary", true))
194 .addTask(new RemoveNodeTask("Remove FlashCanvasPro from resources", "Remove FlashCanvasPro from resources", "resources", "/templating-kit/js/shims/FlashCanvasPro/"))
195 .addTask(new InstallResourcesTask("/templating-kit/js/.*.", "resources:js", false, true))
196 .addTask(new InstallResourcesTask("/templating-kit/js/shims/swf/JarisFLVPlayer.swf", "resources:binary", true))
197 );
198
199 register(DeltaBuilder.update("2.0.9", "")
200 .addTask(new FixAggregatedJavascriptsTask())
201 .addTask(new InstallResourcesTask("/templating-kit/js/shims/swf/JarisFLVPlayer.swf", "resources:binary", true))
202 );
203
204 register(DeltaBuilder.update("2.0.11", "")
205 .addTask(new NodeExistsDelegateTask("Move node", "Move contentFeeds node to stk module under virtualURIMapping", "config", "/modules/standard-templating-kit/virtualURIMapping",
206 new MoveNodeTask("Move contentFeeds node.", "Move contentFeeds node to stk module", "config", "/modules/adminInterface/virtualURIMapping/contentFeeds", "/modules/standard-templating-kit/virtualURIMapping/contentFeeds", false),
207 new ArrayDelegateTask("Move contentFeeds node.", "Move contentFeeds node to stk module",
208 new CreateNodeTask("Create node", "Create virtualURIMapping node in stk module", "config", "/modules/standard-templating-kit", "virtualURIMapping", NodeTypes.Content.NAME),
209 new MoveNodeTask("Move contentFeeds node.", "Move contentFeeds node to stk module", "config", "/modules/adminInterface/virtualURIMapping/contentFeeds", "/modules/standard-templating-kit/virtualURIMapping/contentFeeds", false))))
210 );
211
212 register(DeltaBuilder.update("2.5", "")
213 .addTask(new DialogMigrationTask("standard-templating-kit"))
214
215 .addTask(new NodeExistsDelegateTask("Remove damSupport", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/config/damSupport",
216 new RemoveNodeTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/config/damSupport")))
217
218 .addTask(new NodeExistsDelegateTask("Remove old DMS controls", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/controls",
219 new RemoveNodeTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/controls")))
220
221 .addTask(new BootstrapSingleResource("Config", "Add contextAttribute damfn", "/mgnl-bootstrap/standard-templating-kit/config.modules.standard-templating-kit.renderers.stk.contextAttributes.damfn.xml"))
222
223 .addTask(new STKLegacyUiToMagnolia5AppProviderTask("Provide STK with a Magnolia 5 UI", "Turns most of the legacy UI into a Magnolia 5 browser app. Wraps the remaining old UI as Magnolia 5 legacy apps. Legacy apps will be soon replaced with actual M5 apps."))
224
225 .addTask(new NodeExistsDelegateTask("Install STK asset renderer", "/modules/dam/config/mediaTypes/image",
226 new CheckAndModifyPropertyValueTask("Install STK asset renderer", "Installs STKAssetRenderer", RepositoryConstants.CONFIG, "/modules/dam/config/mediaTypes/image",
227 "rendererClass", "info.magnolia.dam.providers.jcr.JcrAssetRenderer", STKAssetRenderer.class.getName())))
228 .addTask(new BootstrapSingleModuleResource("STK add DamTemplatingFunction.", "Renderers are now defined in the renderer folder.",
229 "config.modules.standard-templating-kit.renderers.stk.contextAttributes.damfn.xml"))
230 .addTask(new ConvertListAclToAppPermissionsTask("Convert permissions for 'ui-admincentral' apps", "Convert ACL permissions to old menus to new admincentral apps permission", this.getAclsToAppsPermissionsMap(), true))
231 );
232
233 register(DeltaBuilder.update("2.5.1", "")
234 .addTask(new NodeExistsDelegateTask("Update stkContact", "Update stkContact content component definition", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/components/content/stkContact",
235 new ArrayDelegateTask("", "",
236 new RemovePropertyTask("Remove templateScript property of stkContact", "Remove templateScript of stkContact component as it should use/inherit the standard template of features", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/components/content/stkContact", "templateScript"),
237 new ArrayDelegateTask("Update stkContact component definition", "Update parameters of stkContact content component definition",
238 new CheckOrCreatePropertyTask("Add new divIDPrefix property to parameters", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/components/content/stkContact/parameters", "divIDPrefix", "content"),
239 new CheckAndModifyPropertyValueTask("Update divClass property of parameters", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/components/content/stkContact/parameters", "divClass", "text-section", "text-section box vcard")))))
240 );
241
242 register(DeltaBuilder.update("2.5.2", "")
243 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/intro",
244 new CheckOrCreatePropertyTask("Set property", "Disable intro area in stkPublicUserRegistration page", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/intro", "enabled", "false")))
245 .addTask(new BootstrapSingleModuleResource("Password change form", "Add new password change component", "templates/components/pur/config.modules.standard-templating-kit.templates.components.pur.stkPURPasswordChangeForm.xml"))
246 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/content/availableComponents",
247 new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/content/availableComponents/stkPURPasswordChangeForm", null, new CreateNodeTask("Add pass form", "Add new password change form to allowed componets list", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/content/availableComponents", "stkPURPasswordChangeForm", NodeTypes.ContentNode.NAME))))
248 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/content/availableComponents/stkPURPasswordChangeForm", new NewPropertyTask("Add form id", "Set ID for newly added form", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/content/availableComponents/stkPURPasswordChangeForm", "id", "standard-templating-kit:components/pur/stkPURPasswordChangeForm")))
249 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/intro", new CheckOrCreatePropertyTask("Set property", "Disable intro area in stkPublicUserRegistration page", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkPublicUserRegistration/areas/main/areas/intro", "enabled", "false")))
250 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkGlossary/areas/main/areas/content", new CheckOrCreatePropertyTask("Set property", "Set type of main area of stkGlossary to single", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkGlossary/areas/main/areas/content", "type", "single")))
251 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionNoExtras/areas/promos", new RemoveNodeTask("Remove node", "Remove idle node promos in stkSectionNoExtras. Area is inherited.", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionNoExtras/areas/promos")))
252 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionWithTwoExtras/areas/extras/areas", new RemoveNodeTask("Remove node", "Remove idle extras area in stkSectionWithTwoExtras. Area is inherited.", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionNoExtras/areas/extras/areas")))
253 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/dialogs/pages/largeArticle/stkLargeArticleIntro/tabMain/abstract", new CheckAndModifyPropertyValueTask("Set property", "Change property value from 'flase' to 'false' in stkLargeArticleIntro dialog.", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/dialogs/pages/largeArticle/stkLargeArticleIntro/tabMain/abstract", "required", "flase", "false")))
254 );
255
256 register(DeltaBuilder.update("2.5.4", "")
257 .addTask(new NodeExistsDelegateTask("Remove obsolete component", "Remove stkFooter component", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/components/footer/stkFooter",
258 new RemoveNodeTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/components/footer/stkFooter")))
259 );
260
261 register(DeltaBuilder.update("2.6.2", "")
262 .addTask(new RemovePropertyTask("Remove hardcoded label", "Remove hardcoded label of STK app group on the app launcher", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk", "label"))
263 .addTask(new RemovePropertyTask("Remove hardcoded label", "Remove hardcoded label of STK Site app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkSiteApp", "label"))
264 .addTask(new RemovePropertyTask("Remove hardcoded icon", "Remove hardcoded icon of STK Site app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkSiteApp", "icon"))
265 .addTask(new RemovePropertyTask("Remove hardcoded label", "Remove hardcoded label of STK Themes app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkThemesApp", "label"))
266 .addTask(new RemovePropertyTask("Remove hardcoded icon", "Remove hardcoded icon of STK Themes app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkThemesApp", "icon"))
267 .addTask(new RemovePropertyTask("Remove hardcoded label", "Remove hardcoded label of STK Dialogs app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkDialogsApp", "label"))
268 .addTask(new RemovePropertyTask("Remove hardcoded icon", "Remove hardcoded icon of STK Dialogs app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkDialogsApp", "icon"))
269 .addTask(new RemovePropertyTask("Remove hardcoded label", "Remove hardcoded label of STK Channels app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkChannelsApp", "label"))
270 .addTask(new RemovePropertyTask("Remove hardcoded icon", "Remove hardcoded icon of STK Channels app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkChannelsApp", "icon"))
271 .addTask(new RemovePropertyTask("Remove hardcoded label", "Remove hardcoded label of STK Template Def app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkTemplateDefsApp", "label"))
272 .addTask(new RemovePropertyTask("Remove hardcoded icon", "Remove hardcoded icon of STK Template Def app", RepositoryConstants.CONFIG, "/modules/ui-admincentral/apps/stkTemplateDefsApp", "icon"))
273 );
274
275 register(DeltaBuilder.update("2.7", "")
276 .addTask(new MigrationTasks("STK Migration", "A collection of update tasks to help migrating to STK 2.7."))
277 .addTask(new NodeExistsDelegateTask("Check applauncher layout group order", "Checks whether manage group is already installed, so that we insert stk group right after it.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/manage",
278 new OrderNodeAfterTask("STK AppLauncher group ordering", "Moves the stk app group as first closable group", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk", "manage")))
279 .addTask(new ReorderSTKAppsTask())
280 );
281
282 register(DeltaBuilder.update("2.7.1", "")
283 .addTask(new RemoveNodeTask("Remove obsolete tab", "Remove obsolete 'dependencies' tab", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/dialogs/generic/pages/tabDependencies"))
284 .addTask(new RemoveNodeTask("Remove redundant form configuration", "Remove redundant form configuration", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/dialogs/pages/article/stkArticleProperties/form"))
285 .addTask(new NodeExistsDelegateTask("Set property value", "Set property [type] to value [String] in the stkDownloadList dialog.", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/dialogs/components/content/stkDownloadList/form/tabs/tabQuery/fields/link",
286 new SetPropertyTask(RepositoryConstants.CONFIG, "/modules/standard-templating-kit/dialogs/components/content/stkDownloadList/form/tabs/tabQuery/fields/link", "type", "String")))
287 );
288
289 register(DeltaBuilder.update("2.7.2", "")
290 .addTask(new NodeExistsDelegateTask("Remove redundant extras areas if exist", "Remove redundant extras areas if exist", RepositoryConstants.CONFIG,
291 "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionWithTwoExtras/areas/extras/areas",
292 new RemoveNodeTask("Remove redundant extras areas", "Remove redundant extras areas", RepositoryConstants.CONFIG,
293 "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionWithTwoExtras/areas/extras/areas")))
294 .addTask(new NodeExistsDelegateTask("Remove obsolete stkFooter component if exists", "Remove obsolete stkFooter component if exists", RepositoryConstants.CONFIG,
295 "/modules/standard-templating-kit/templates/components/footer/stkFooter",
296 new RemoveNodeTask("Remove obsolete stkFooter component", "Remove obsolete stkFooter component", RepositoryConstants.CONFIG,
297 "/modules/standard-templating-kit/templates/components/footer/stkFooter")))
298 );
299
300 register(DeltaBuilder.update("2.7.3", "")
301
302 .addTask(new BootstrapSingleModuleResource("Bootstrap the forum page-template.", "Bootstraping the forum page-template.", "templates/pages/config.modules.standard-templating-kit.templates.pages.stkForum.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
303 .addTask(new BootstrapSingleModuleResource("Bootstrap the forum login-component.", "Bootstraping the forum login-component.", "templates/components/forum/config.modules.standard-templating-kit.templates.components.forum.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
304 .addTask(new BootstrapSingleModuleResource("Bootstrap the availability of the forum-page-template.", "Bootstraping the availability of the forum-page-template.", "config/site/config.modules.standard-templating-kit.config.site.templates.availability.templates.stkForum.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
305 .addTask(new BootstrapSingleModuleResource("Bootstrap a folder node for the dialogs of the forum template.", "Bootstraping a folder node for the dialogs of the forum template.", "dialogs/pages/forum/config.modules.standard-templating-kit.dialogs.pages.forum.xml", ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW))
306 .addTask(new BootstrapSingleModuleResource("Bootstrap page-properties dialog for the forum-template.", "Bootstraping page-properties dialog for the forum-template.", "dialogs/pages/forum/config.modules.standard-templating-kit.dialogs.pages.forum.stkForumProperties.xml", ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW))
307 .addTask(new BootstrapSingleModuleResource("Bootstrap the dialog for the header of the forum-template.", "Bootstraping the dialog for the header of the forum-template.", "dialogs/pages/forum/config.modules.standard-templating-kit.dialogs.pages.forum.stkForumHeader.xml", ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW))
308
309 .addTask(new AddMissingDefaultValuesToFieldsTask(Arrays.asList(
310 "/modules/standard-templating-kit/dialogs/components/features/stkEventsOverview/form/tabs/tabTeaser/fields/showAbstract",
311 "/modules/standard-templating-kit/dialogs/components/features/stkSiteMap/form/tabs/tabMain/fields/showSiteMapRoot",
312 "/modules/standard-templating-kit/dialogs/components/teasers/stkTeaserEventsList/form/tabs/tabTeaser/fields/showAbstract",
313 "/modules/standard-templating-kit/dialogs/functional/stkRedirect/form/tabs/tabRedirect/fields/hideInNav"
314 ), "defaultValue", "true"))
315
316 .addTask(new AddMissingDefaultValuesToFieldsTask(Arrays.asList(
317 "/modules/standard-templating-kit/dialogs/components/features/stkFAQ/form/tabs/tabMain/fields/useIndex",
318 "/modules/standard-templating-kit/dialogs/components/features/stkNewsOverview/form/tabs/tabTeaser/fields/hideTeaserImage",
319 "/modules/standard-templating-kit/dialogs/components/pur/stkPURLoginForm/form/tabs/tabTitleText/fields/showInfoText",
320 "/modules/standard-templating-kit/dialogs/components/teasers/stkTeaserNewsList/form/tabs/tabTeaser/fields/hideTeaserImage",
321 "/modules/standard-templating-kit/dialogs/generic/controls/hideInNav",
322 "/modules/standard-templating-kit/dialogs/generic/controls/inheritable",
323 "/modules/standard-templating-kit/dialogs/generic/teasers/hideTeaserImage",
324 "/modules/standard-templating-kit/dialogs/generic/teasers/highlighted"
325 ), "defaultValue", "false"))
326
327 .addTask(fixContactField)
328 );
329
330 register(DeltaBuilder.update("2.7.4", "")
331 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to htmlHeader area", AREAS_PROTOTYPE_PATH + "htmlHeader",
332 new SetPropertyTask("Add createAreaNode property with value false to htmlHeader area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "htmlHeader", "createAreaNode", false)))
333 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to main area", AREAS_PROTOTYPE_PATH + "main",
334 new SetPropertyTask("Add createAreaNode property with value false to main area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "main", "createAreaNode", false)))
335 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to intro area", AREAS_PROTOTYPE_PATH + "main/areas/intro",
336 new SetPropertyTask("Add createAreaNode property with value false to intro area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "main/areas/intro", "createAreaNode", false)))
337 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to infoBlock area", AREAS_PROTOTYPE_PATH + "main/areas/intro/areas/infoBlock",
338 new SetPropertyTask("Add createAreaNode property with value false to infoBlock area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "main/areas/intro/areas/infoBlock", "createAreaNode", false)))
339 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to breadcrumb area", AREAS_PROTOTYPE_PATH + "main/areas/breadcrumb",
340 new SetPropertyTask("Add createAreaNode property with value false to breadcrumb area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "main/areas/breadcrumb", "createAreaNode", false)))
341 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to contentNavigation area", AREAS_PROTOTYPE_PATH + "main/areas/contentNavigation",
342 new SetPropertyTask("Add createAreaNode property with value false to contentNavigation area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "main/areas/contentNavigation", "createAreaNode", false)))
343 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to branding area", AREAS_PROTOTYPE_PATH + "branding",
344 new SetPropertyTask("Add createAreaNode property with value false to branding area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "branding", "createAreaNode", false)))
345 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to logo area", AREAS_PROTOTYPE_PATH + "branding/areas/logo",
346 new SetPropertyTask("Add createAreaNode property with value false to logo area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "branding/areas/logo", "createAreaNode", false)))
347 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to search area", AREAS_PROTOTYPE_PATH + "branding/areas/search",
348 new SetPropertyTask("Add createAreaNode property with value false to search area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "branding/areas/search", "createAreaNode", false)))
349 .addTask(new NodeExistsDelegateTask("Add createAreaNode property with value false to sectionHeader area", AREAS_PROTOTYPE_PATH + "sectionHeader",
350 new SetPropertyTask("Add createAreaNode property with value false to sectionHeader area", RepositoryConstants.CONFIG, AREAS_PROTOTYPE_PATH + "sectionHeader", "createAreaNode", false)))
351 );
352
353 register(DeltaBuilder.update("2.8", "")
354 .addTask(new NodeExistsDelegateTask("Change the path of DamTemplatingFunctions", "/modules/standard-templating-kit/renderers/stk/contextAttributes/damfn",
355 new CheckAndModifyPropertyValueTask("/modules/standard-templating-kit/renderers/stk/contextAttributes/damfn", "componentClass", "info.magnolia.dam.asset.functions.DamTemplatingFunctions", DamTemplatingFunctions.class.getName())))
356 .addTask(new NodeExistsDelegateTask("STK applauncher group", "This task updates ordering and color of the STK group in the applauncher.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk",
357 new ArrayDelegateTask("",
358 new OrderNodeAfterTask("STK applauncher group ordering", "Moves the stk app group after the tools group", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk", "tools"),
359 new SetPropertyTask(RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk", "color", "#ccd882"))))
360 .addTask(new ArrayDelegateTask("Modify prototype to include areas to insert scripts", "Modify prototype to include areas to insert scripts such as marketing tags",
361 new BootstrapSingleResource("Add area to contain scripts in prototype", "Add area to contain scripts in prototype, specifically in the header", "/mgnl-bootstrap/standard-templating-kit/config/site/config.modules.standard-templating-kit.config.site.templates.prototype.areas.headerScripts.xml"),
362 new BootstrapSingleResource("Add area to contain scripts in prototype", "Add area to contain scripts in prototype, specifically at the beginning of the body", "/mgnl-bootstrap/standard-templating-kit/config/site/config.modules.standard-templating-kit.config.site.templates.prototype.areas.bodyBeginScripts.xml"),
363 new BootstrapSingleResource("Add area to contain scripts in prototype", "Add area to contain scripts in prototype, specifically at the end of the body", "/mgnl-bootstrap/standard-templating-kit/config/site/config.modules.standard-templating-kit.config.site.templates.prototype.areas.bodyEndScripts.xml")))
364 .addTask(reconfigureLogoutTextField)
365 .addTask(new NodeExistsDelegateTask("Create new property i18nBasename at /modules/standard-templating-kit/dialogs/components/teasers/stkTeaserOpener with value info.magnolia.module.templatingkit.messages", STK_TEASER_OPENER,
366 new CheckOrCreatePropertyTask("Create new property i18nBasename at /modules/standard-templating-kit/dialogs/components/teasers/stkTeaserOpener with value info.magnolia.module.templatingkit.messages", STK_TEASER_OPENER, "i18nBasename", "info.magnolia.module.templatingkit.messages")))
367
368 .addTask(new NodeExistsDelegateTask("Remove the preview component of the Image gallery link field definition", "/modules/standard-templating-kit/dialogs/components/features/stkImageGallery/form/tabs/tabMain/fields/link/contentPreviewDefinition",
369 new RemoveNodeTask("", "/modules/standard-templating-kit/dialogs/components/features/stkImageGallery/form/tabs/tabMain/fields/link/contentPreviewDefinition")))
370 );
371
372 register(DeltaBuilder.update("2.8.2", "")
373 .addTask(new MoveIntenseDebateIdTask())
374 );
375
376 register(DeltaBuilder.update("2.8.3", "")
377 .addTask(new PartialBootstrapTask("Makes the stkPURAuthSubmit component available in groupFields", "Makes the stkPURAuthSubmit component which allows updating of a logged in user's profile available in groupFields", "/mgnl-bootstrap/standard-templating-kit/templates/components/pur/config.modules.standard-templating-kit.templates.components.pur.groupFields.xml", "/groupFields/areas/fields/availableComponents/stkPURAuthSubmit", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
378 .addTask(new ChangeValidationToMultiValuedPropertyTask("Change validation fields of form field 'stkPUREdit' to multi-valued property", Arrays.asList("standard-templating-kit:components/pur/stkPUREdit")))
379 );
380
381 register(DeltaBuilder.update("2.8.6", "")
382 .addTask(new PartialBootstrapTask("Create a new field (form/tabs/tabQuery/fields/excludeDescendants)", "Creates a new field (form/tabs/tabQuery/fields/excludeDescendants) in stkDownloadList dialog.", "/mgnl-bootstrap/standard-templating-kit/dialogs/components/content/config.modules.standard-templating-kit.dialogs.components.content.stkDownloadList.xml", "/stkDownloadList/form/tabs/tabQuery/fields/excludeDescendants"))
383 .addTask(new NewPropertyTask("Create an i18nBasename property", "/modules/standard-templating-kit/dialogs/components/content/stkDownloadList", "i18nBasename", "info.magnolia.module.templatingkit.messages"))
384 );
385
386 register(DeltaBuilder.update("2.8.9", "")
387 .addTask(new NodeExistsDelegateTask("Add a validator to the field 'path' for the stkRedirect dialog.", "/modules/standard-templating-kit/dialogs/functional/stkRedirect/form/tabs/tabRedirect/fields/path",
388 new ArrayDelegateTask("", "",
389 new NodeExistsDelegateTask("", "/modules/standard-templating-kit/dialogs/functional/stkRedirect/form/tabs/tabRedirect/fields/path/validators", null,
390 new NodeBuilderTask("", "", ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/standard-templating-kit/dialogs/functional/stkRedirect/form/tabs/tabRedirect/fields/path",
391 addNode("validators", NodeTypes.ContentNode.NAME))
392 ),
393 new NodeExistsDelegateTask("", "/modules/standard-templating-kit/dialogs/functional/stkRedirect/form/tabs/tabRedirect/fields/path/validators/redirectTargetValidator", null,
394 new PartialBootstrapTask("", "/mgnl-bootstrap/standard-templating-kit/dialogs/functional/config.modules.standard-templating-kit.dialogs.functional.stkRedirect.xml", "/stkRedirect/form/tabs/tabRedirect/fields/path/validators/redirectTargetValidator")
395 )
396 )))
397 );
398
399 register(DeltaBuilder.update("2.9", "")
400 .addTask(new PropertyExistsDelegateTask("Remove deprecated AutoGeneratedExtrasArea from templates", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/stkEventsOverview/areas/extras", "class",
401 new RemovePropertyTask("Remove deprecated AutoGeneratedExtrasArea from templates", "/modules/standard-templating-kit/templates/pages/stkEventsOverview/areas/extras", "class")))
402 .addTask(new NodeExistsDelegateTask("Remove deprecated stkSectionNoIntroWithHeader from demo-features templates", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionNoIntroWithHeader",
403 new RemoveNodeTask("Remove deprecated stkSectionNoIntroWithHeader from demo-features templates", "/modules/standard-templating-kit/templates/pages/demo-features/stkSectionNoIntroWithHeader")))
404 .addTask(new RemoveTreeTemplatesTask())
405 .addTask(new NodeExistsDelegateTask("Re-Bootstrap stkCategoryOverview component if it exists", "/modules/standard-templating-kit/templates/components/features/stkCategoryOverview",
406 new BootstrapSingleResource("", "", "/info/magnolia/module/standard-templating-kit/setup/categorization/config.modules.standard-templating-kit.templates.components.features.stkCategoryOverview.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING)))
407 .addTask(new NodeExistsDelegateTask("Re-Bootstrap stkRelatedCategoriesLinkList component if it exists", "/modules/standard-templating-kit/templates/components/features/stkRelatedCategoriesLinkList",
408 new BootstrapSingleResource("", "", "/info/magnolia/module/standard-templating-kit/setup/categorization/config.modules.standard-templating-kit.templates.components.features.stkRelatedCategoriesLinkList.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING)))
409 .addTask(new NodeExistsDelegateTask("Re-Bootstrap stkCategoryOverview page if it exists", "/modules/standard-templating-kit/templates/pages/stkCategoryOverview",
410 new BootstrapSingleResource("", "", "/info/magnolia/module/standard-templating-kit/setup/categorization/config.modules.standard-templating-kit.templates.pages.stkCategoryOverview.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING)))
411 .addTask(new NodeExistsDelegateTask("Bootstrap stkTemplateContent feed generator if it doesn't exists", "/modules/rssaggregator/config/feedGenerators/stkTemplateContent", null,
412 new BootstrapSingleResource("", "", "/mgnl-bootstrap/standard-templating-kit/config.modules.rssaggregator.config.feedGenerators.stkTemplateContent.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)))
413 .addTask(new MigrateTemplateTypesTask())
414 .addTask(new NodeExistsDelegateTask("Remove stkCategoryOverview dialog", "/modules/standard-templating-kit/dialogs/components/features/stkCategoryOverview",
415 new RemoveNodeTask("", "/modules/standard-templating-kit/dialogs/components/features/stkCategoryOverview")))
416 .addTask(new NodeExistsDelegateTask("Remove stkRelatedCategoriesLinkList dialog", "/modules/standard-templating-kit/dialogs/components/features/stkRelatedCategoriesLinkList",
417 new RemoveNodeTask("", "/modules/standard-templating-kit/dialogs/components/features/stkRelatedCategoriesLinkList")))
418 .addTask(new NodeExistsDelegateTask("Remove relatedCategoriesLinkList template", "Removes relatedCategoriesLinkList template from templates workspace", "templates", "/templating-kit/components/features/relatedCategoriesLinkList",
419 new RemoveNodeTask("", "", "templates", "/templating-kit/components/features/relatedCategoriesLinkList")))
420 .addTask(new NodeExistsDelegateTask("Re-Bootstrap stkCategoryOverviewProperties", "/modules/standard-templating-kit/dialogs/pages/categoryOverview/stkCategoryOverviewProperties",
421 new BootstrapSingleResource("", "", "/info/magnolia/module/standard-templating-kit/setup/categorization/config.modules.standard-templating-kit.dialogs.pages.categoryOverview.stkCategoryOverviewProperties.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING)))
422 .addTask(copySTKSiteConfigurationToSiteModule)
423 .addTask(new NodeExistsDelegateTask("Re-Configure asset provider from DAM", "", RepositoryConstants.CONFIG, "/modules/dam/config/providers/jcrProvider",
424 new CheckAndModifyPropertyValueTask("", "", RepositoryConstants.CONFIG, "/modules/dam/config/providers/jcrProvider", "class", "info.magnolia.module.templatingkit.dam.RenditionAwareJcrAssetProvider", JcrAssetProvider.class.getName())))
425 .addTask(new NodeExistsDelegateTask("Remove STKAssetRenderer", "", RepositoryConstants.CONFIG, "/modules/dam/config/renderers/stkJcrRenderer",
426 new RemoveNodeTask("", "/modules/dam/config/renderers/stkJcrRenderer")))
427 .addTask(new NodeExistsDelegateTask("Remove migrated STKAssetRenderer", "When dam-imaging is installed stkJcrRenderer is not required anymore",
428 RepositoryConstants.CONFIG, "/modules/dam/config/providers/jcrProvider/renderers/stkJcrRenderer",
429 new IsModuleInstalledOrRegistered("", "dam-imaging", new RemoveNodeTask("", "/modules/dam/config/providers/jcrProvider/renderers/stkJcrRenderer"))))
430 .addTask(new MigrateResourcesTask(
431 "/modules/standard-templating-kit/config/site/templates/prototype/jsFiles",
432 "/modules/standard-templating-kit/config/site/templates/prototype/cssFiles",
433 "/modules/standard-templating-kit/templates/pages/stkForum/cssFiles"))
434 );
435
436 }
437
438 private Map<String, String[]> getAclsToAppsPermissionsMap() {
439 Map<String, String[]> permissionsMap = new HashMap<String, String[]>();
440
441 permissionsMap.put("/modules/adminInterface/config/menu/templating-kit/etkSites", new String[]{"/modules/ui-admincentral/apps/stkSiteApp"});
442 permissionsMap.put("/modules/adminInterface/config/menu/templating-kit/stkThemes", new String[]{"/modules/ui-admincentral/apps/stkThemesApp"});
443 permissionsMap.put("/modules/adminInterface/config/menu/templating-kit/stkDialogs", new String[]{"/modules/ui-admincentral/apps/dialogs"});
444 permissionsMap.put("/modules/adminInterface/config/menu/templating-kit/stkChannels", new String[]{"/modules/ui-admincentral/apps/channels"});
445 permissionsMap.put("/modules/adminInterface/config/menu/templating-kit/stkTemplateDefs", new String[]{"/modules/ui-admincentral/apps/stkTemplateDefsApp"});
446
447 return permissionsMap;
448 }
449
450 @Override
451 protected List<Task> getExtraInstallTasks(InstallContext ctx) {
452 final List<Task> tasks = new ArrayList<Task>();
453 tasks.addAll(super.getExtraInstallTasks(ctx));
454 tasks.add(new TemplatesInstallTask("/templating-kit/.*\\.ftl", true));
455 tasks.add(new InstallSTKResourcesTask());
456
457
458 tasks.add(new AbstractRepositoryTask("Order templates", "") {
459 @Override
460 protected void doExecute(InstallContext ctx) throws RepositoryException, TaskExecutionException {
461 Content templatesNodes = ctx.getConfigHierarchyManager().getContent("/modules/standard-templating-kit/templates/pages");
462 ContentUtil.orderNodes(templatesNodes, new String[]{"stkHome", "stkSection", "stkArticle", "stkLargeArticle", "stkNews", "stkEvent", "stkImageGallery", "stkFAQ", "stkForm", "stkSearchResult", "stkSiteMap", "stkRedirect"});
463 }
464 });
465
466 tasks.add(new RemoveETKParagraphs());
467
468 tasks.add(new WarnTask("SMTP Configuration", "Please set the config: /modules/mail/config/smtp to a valid smtp configuration"));
469 tasks.add(new IsModuleInstalledOrRegistered("Use of commenting module", "Use of commenting module by default in STK", "commenting",
470 new CheckAndModifyPropertyValueTask("", "", RepositoryConstants.CONFIG, "/modules/standard-templating-kit/config/site/templates/prototype/areas/main/areas/comments/availableComponents/stkComments", "id", "standard-templating-kit:components/features/stkComments", "commenting:components/comments")));
471 tasks.add(new STKLegacyUiToMagnolia5AppProviderTask("Provide STK with a Magnolia 5 UI", "Turns legacy UI into a Magnolia 5 browser app."));
472 tasks.add(new OrderNodeAfterTask("STK AppLauncher group ordering", "Moves the stk app group after the tools group", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/stk", "tools"));
473 tasks.add(new ReorderSTKAppsTask());
474 tasks.add(new ModuleDependencyBootstrapTask("contacts"));
475 tasks.add(new ModuleDependencyBootstrapTask("categorization"));
476 tasks.add(copySTKSiteConfigurationToSiteModule);
477
478 return tasks;
479 }
480
481 @Override
482 protected List<Task> getDefaultUpdateTasks(Version forVersion) {
483 final List<Task> tasks = new ArrayList<Task>();
484 tasks.addAll(super.getDefaultUpdateTasks(forVersion));
485 tasks.add(new TemplatesInstallTask("/templating-kit/.*\\.ftl", true));
486 return tasks;
487 }
488
489 @Override
490 protected List<Task> getBasicInstallTasks(InstallContext ctx) {
491 final List<Task> installTasks = new ArrayList<Task>();
492
493 installTasks.add(new RegisterNodeTypeTask("Contact"));
494 installTasks.addAll(super.getBasicInstallTasks(ctx));
495 return installTasks;
496 }
497
498 }