View Javadoc

1   /**
2    * This file Copyright (c) 2008-2013 Magnolia International
3    * Ltd.  (http://www.magnolia-cms.com). All rights reserved.
4    *
5    *
6    * This file is dual-licensed under both the Magnolia
7    * Network Agreement and the GNU General Public License.
8    * You may elect to use one or the other of these licenses.
9    *
10   * This file is distributed in the hope that it will be
11   * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the
12   * implied warranty of MERCHANTABILITY or FITNESS FOR A
13   * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT.
14   * Redistribution, except as permitted by whichever of the GPL
15   * or MNA you select, is prohibited.
16   *
17   * 1. For the GPL license (GPL), you can redistribute and/or
18   * modify this file under the terms of the GNU General
19   * Public License, Version 3, as published by the Free Software
20   * Foundation.  You should have received a copy of the GNU
21   * General Public License, Version 3 along with this program;
22   * if not, write to the Free Software Foundation, Inc., 51
23   * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24   *
25   * 2. For the Magnolia Network Agreement (MNA), this file
26   * and the accompanying materials are made available under the
27   * terms of the MNA which accompanies this distribution, and
28   * is available at http://www.magnolia-cms.com/mna.html
29   *
30   * Any modifications to this file must keep this entire header
31   * intact.
32   *
33   */
34  package info.magnolia.module.rssaggregator.setup;
35  
36  import info.magnolia.dam.app.setup.migration.ChangeDataDmsReferenceToDamMigrationTask;
37  import info.magnolia.module.DefaultModuleVersionHandler;
38  import info.magnolia.module.InstallContext;
39  import info.magnolia.module.cache.RegisterWorkspaceForCacheFlushingTask;
40  import info.magnolia.module.delta.ArrayDelegateTask;
41  import info.magnolia.module.delta.BootstrapConditionally;
42  import info.magnolia.module.delta.BootstrapSingleModuleResource;
43  import info.magnolia.module.delta.BootstrapSingleResource;
44  import info.magnolia.module.delta.CheckAndModifyPropertyValueTask;
45  import info.magnolia.module.delta.CheckOrCreatePropertyTask;
46  import info.magnolia.module.delta.CreateNodeTask;
47  import info.magnolia.module.delta.DeltaBuilder;
48  import info.magnolia.module.delta.ModuleDependencyBootstrapTask;
49  import info.magnolia.module.delta.MoveNodeTask;
50  import info.magnolia.module.delta.NewPropertyTask;
51  import info.magnolia.module.delta.NodeExistsDelegateTask;
52  import info.magnolia.module.delta.OrderNodeBeforeTask;
53  import info.magnolia.module.delta.PartialBootstrapTask;
54  import info.magnolia.module.delta.PropertyExistsDelegateTask;
55  import info.magnolia.module.delta.RemoveNodeTask;
56  import info.magnolia.module.delta.SetPropertyTask;
57  import info.magnolia.module.delta.SetupModuleRepositoriesTask;
58  import info.magnolia.module.delta.Task;
59  import info.magnolia.module.model.Version;
60  import info.magnolia.module.rssaggregator.RSSAggregatorConstants;
61  import info.magnolia.repository.RepositoryConstants;
62  import info.magnolia.ui.admincentral.setup.ConvertAclToAppPermissionTask;
63  import info.magnolia.ui.contentapp.setup.for5_3.ContentAppMigrationTask;
64  import info.magnolia.ui.framework.setup.SetWritePermissionForActionsTask;
65  
66  import java.util.ArrayList;
67  import java.util.Arrays;
68  import java.util.List;
69  
70  import javax.jcr.ImportUUIDBehavior;
71  
72  /**
73   * Version handler.
74   */
75  public class RSSAggregatorVersionHandler extends DefaultModuleVersionHandler {
76  
77      protected static final String RSSAGGREGATOR_APP_ACTIONS = "/modules/rssaggregator/apps/rssAggregator/subApps/browser/actions/";
78  
79      private final ArrayDelegateTask setDefaultValues = new ArrayDelegateTask("Default RSS config", "Creates default config used for RSS scheduling",
80              new PropertyExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/config", "automatedImport", null, new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/config", "automatedImport", "false")),
81              new PropertyExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/config", "cron", null, new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/config", "cron", "0 0 0/1 1/1 * ? *")));
82  
83      public RSSAggregatorVersionHandler() {
84  
85          register(DeltaBuilder.checkPrecondition("1.3", "2.0"));
86  
87          register(DeltaBuilder.update("1.4", "")
88                  .addTask(new BootstrapSingleResource("Planet feed component.", "", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.planetFeeds.xml"))
89                  .addTask(new BootstrapSingleResource("Planet feed statistics component.", "", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.feedStatistics.xml"))
90                  .addTask(new BootstrapSingleResource("Planet feed subcriptions component.", "", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.feedSubscriptions.xml"))
91                  // settings for feed syndication
92                  .addTask(new BootstrapSingleResource("Virtual URI mapping for planet feeds.", "", "/mgnl-bootstrap/rssaggregator/config.modules.rssaggregator.virtualURIMapping.planetFeeds.xml"))
93                  .addTask(new BootstrapSingleResource("Feed generator for planet feeds.", "", "/mgnl-bootstrap/rssaggregator/config/feedGenerators/config.modules.rssaggregator.config.feedGenerators.planet.xml"))
94                  .addTask(new BootstrapSingleResource("Feed syndication component.", "", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.feedSyndication.xml"))
95                  // planet commands
96                  .addTask(new BootstrapConditionally("Commands for planet RSS.", "", "/mgnl-bootstrap/rssaggregator/config/commands/config.modules.rssaggregator.commands.xml"))
97                  .addTask(new BootstrapConditionally("Scheduled job for planet archive.", "", "/mgnl-bootstrap/rssaggregator/config/commands/config.modules.scheduler.config.jobs.generatePlanetData.xml"))
98                  .addTask(new BootstrapConditionally("Scheduled job for planet statistics.", "", "/mgnl-bootstrap/rssaggregator/config/commands/config.modules.scheduler.config.jobs.collectPlanetStatistics.xml"))
99                  // add config options for planet
100                 .addTask(new CreateNodeTask("Planet feed options.", "Add options for planet feeds to the RSSAggregator module.",
101                         RepositoryConstants.CONFIG, "/modules/rssaggregator/config", "planetOptions", "mgnl:contentNode"))
102                 .addTask(new CheckOrCreatePropertyTask("Option for relevant months to be included in statistics", "",
103                         RepositoryConstants.CONFIG, "/modules/rssaggregator/config/planetOptions", "lastMonthsIncluded", "3"))
104                 // move virtualURImappings to rssaggregator module from adminInterface
105                 .addTask(new MoveNodeTask("Move rssFeeds node.", "Move rssFeeds node to rssaggregator module.", "config", "/modules/adminInterface/virtualURIMapping/rssFeeds", "/modules/rssaggregator/virtualURIMapping/rssFeeds", false)));
106 
107         register(DeltaBuilder.update("1.4.3", "")
108                 .addTask(new ArrayDelegateTask("Bootstrap missing components",
109                         new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/combinedFeedsParagraph",
110                                 new CheckAndModifyPropertyValueTask("Change templateScript", "Change templateScript of combinedFeedsParagraphs", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/combinedFeedsParagraph", "templateScript", "/info/magnolia/module/rssaggregator/paragraphs/combinedFeed.ftl", "/rssaggregator/components/combinedFeed.ftl"),
111                                 new BootstrapSingleResource("Bootstrap component", "Bootstrap combinedFeedsParagraph", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.combinedFeedsParagraph.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)
112                         ),
113                         new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/feedListParagraph",
114                                 new CheckAndModifyPropertyValueTask("Change templateScript", "Change templateScript of feedListParagraph", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/feedListParagraph", "templateScript", "/info/magnolia/module/rssaggregator/paragraphs/feedList.ftl", "/rssaggregator/components/feedList.ftl"),
115                                 new BootstrapSingleResource("Bootstrap component", "Bootstrap feedListParagraph", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.feedListParagraph.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)
116                         )
117                         )
118                 )
119                 .addTask(new NodeExistsDelegateTask("Add property", "Add property backup to rssaggregator importer", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator",
120                         new PropertyExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "backup", null,
121                                 new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "backup", Boolean.TRUE)
122                         )
123                         )
124                 ));
125 
126         register(DeltaBuilder.update("2.0", "")
127                 .addTask(new RemoveNodeTask("Remove old page", "Remove old adminInterface page", RepositoryConstants.CONFIG, "/modules/adminInterface/pages/rssaggregator"))
128                 .addTask(new RemoveNodeTask("Remove old menu", "Remove old adminInterface menu", RepositoryConstants.CONFIG, "/modules/adminInterface/config/menu/coonfiguration/rssaggregator")));
129 
130         register(DeltaBuilder.update("2.0.2", "")
131                 .addTask(new ArrayDelegateTask("Bootstrap missing components",
132                         new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/combinedFeedsParagraph",
133                                 new CheckAndModifyPropertyValueTask("Change templateScript", "Change templateScript of combinedFeedsParagraphs", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/combinedFeedsParagraph", "templateScript", "/info/magnolia/module/rssaggregator/paragraphs/combinedFeed.ftl", "/rssaggregator/components/combinedFeed.ftl"),
134                                 new BootstrapSingleResource("Bootstrap component", "Bootstrap combinedFeedsParagraph", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.combinedFeedsParagraph.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)
135                         ),
136                         new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/feedListParagraph",
137                                 new CheckAndModifyPropertyValueTask("Change templateScript", "Change templateScript of feedListParagraph", RepositoryConstants.CONFIG, "/modules/rssaggregator/templates/components/feedListParagraph", "templateScript", "/info/magnolia/module/rssaggregator/paragraphs/feedList.ftl", "/rssaggregator/components/feedList.ftl"),
138                                 new BootstrapSingleResource("Bootstrap component", "Bootstrap feedListParagraph", "/mgnl-bootstrap/rssaggregator/templates/components/config.modules.rssaggregator.templates.components.feedListParagraph.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)
139                         )
140                         )
141                 )
142 
143         );
144         register(DeltaBuilder.update("2.0.3", "")
145                 .addTask(new NodeExistsDelegateTask("Add property", "Add property backup to rssaggregator importer", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator",
146                         new PropertyExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "backup", null,
147                                 new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "backup", Boolean.TRUE)
148                         )
149                         )));
150         register(DeltaBuilder.update("2.2", "")
151                 .addTask(new PropertyExistsDelegateTask("Add property", "Add property backup to rssaggregator importer", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "backup", null,
152                         new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "backup", Boolean.TRUE)))
153 
154                 .addTask(new PropertyExistsDelegateTask("Set property", "Set workspace for scheduler jobs", RepositoryConstants.CONFIG, "/modules/scheduler/config/jobs/generatePlanetData/params", "repository",
155                         new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/scheduler/config/jobs/generatePlanetData/params", "repository", RSSAggregatorConstants.WORKSPACE), null))
156 
157                 .addTask(new PropertyExistsDelegateTask("Set property", "Set workspace for scheduler jobs", RepositoryConstants.CONFIG, "/modules/scheduler/config/jobs/collectPlanetStatistics/params", "repository",
158                         new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/scheduler/config/jobs/collectPlanetStatistics/params", "repository", RSSAggregatorConstants.WORKSPACE), null))
159 
160                 .addTask(new PropertyExistsDelegateTask("Set property", "Set workspace for rss importer", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator/targets/main", "targetPath",
161                         new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator/targets/main", "targetPath", "/"), null))
162 
163                 .addTask(new PropertyExistsDelegateTask("Set property", "Set workspace for rss importer", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "repository",
164                         new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/data/config/importers/rssaggregator", "repository", RSSAggregatorConstants.WORKSPACE), null))
165 
166                 // Get rid of old artifacts
167                 .addTask(new RemoveNodeTask("Remove page", "Remove old adminInterface page", "config", "/modules/rssaggregator/pages"))
168                 .addTask(new RemoveNodeTask("Remove old app", "Delete old app from app launcher if exists", "config", "/modules/ui-admincentral/config/appLauncherLayout/data/apps/RssAggregatorApp"))
169                 .addTask(new RemoveNodeTask("Remove old dialogs", "Remove old adminInterface dialogs", "config", "/modules/rssaggregator/dialogs"))
170                 .addTask(new RemoveNodeTask("Remove old dialogs", "Remove RSSAggregator dialog from data", "config", "/modules/data/dialogs/RssAggregator"))
171                 .addTask(new RemoveNodeTask("Remove rss aggregator tree", "Remove RSSAggregator tree from data module", "config", "/modules/data/trees/RssAggregator"))
172                 .addTask(new RemoveNodeTask("Remove rss aggregator type", "Remove RSSAggregator type from data module", "config", "/modules/data/config/types/RssAggregator"))
173                 .addTask(new RemoveNodeTask("Remove rss aggregator menu", "Remove RSSAggregator menu from adminInterface-legacy module", "config", "/modules/adminInterface/config/menu/data/RssAggregator"))
174 
175                 // Bootstrap new rssaggregator app
176                 .addTask(new BootstrapSingleModuleResource("Bootstrap app", "Bootstrap rssaggregator app", "app/config.modules.rssaggregator.apps.xml"))
177                 .addTask(new BootstrapSingleModuleResource("Add app to app-launcher", "Add rssaggregator app to App Launcher", "app/config.modules.ui-admincentral.config.appLauncherLayout.groups.manage.apps.rssAggregator.xml"))
178                 .addTask(new BootstrapSingleModuleResource("Bootstrap dialogs", "Remove old adminInterface dialogs", "dialogs/config.modules.rssaggregator.dialogs.xml"))
179                 .addTask(new RSSAggregatorDataTypeMigrationTask("Migrate data", "Migrate RSS Aggregator data to RSS workspace", "/rssaggregator", "/", RSSAggregatorConstants.WORKSPACE))
180                 .addTask(new ChangeDataDmsReferenceToDamMigrationTask("Migrate Hackergotchi user pics", "Migrate user pics from DMS to DAM", RSSAggregatorConstants.WORKSPACE, Arrays.asList("/"), "", ""))
181                 .addTask(new SetupModuleRepositoriesTask())
182                 .addTask(new ConvertAclToAppPermissionTask("Convert ACLs to permissions for 'rssAggregator' app", "Convert ACL permissions to dms to new 'assets' app permissions",
183                         "/modules/adminInterface/config/menu/data/RssAggregator", "/modules/rssaggregator/apps/rssAggregator", false))
184                 .addTask(new NodeExistsDelegateTask("Reorder RSS in MANAGE group", "This reorders the RSS app before Config in the Manage group of the applauncher.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/manage/apps/configuration",
185                         new OrderNodeBeforeTask("", "", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/manage/apps/rssAggregator", "configuration"))));
186 
187         register(DeltaBuilder.update("2.2.1", "")
188                 .addTask(new RemovePropertyIfExists("Forbid nested RSS-Aggregators in 'add action' availability", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/browser/actions/addRSSAggregator/availability/nodeTypes/", "rssFeed")));
189 
190         register(DeltaBuilder.update("2.2.2", "")
191                 .addTask(new NodeExistsDelegateTask("Delete old app from app launcher if exists", "Delete old app from app launcher if exists", RepositoryConstants.CONFIG,
192                         "/modules/ui-admincentral/config/appLauncherLayout/groups/data/apps/RssAggregatorApp",
193                         new RemoveNodeTask("Delete old app from app launcher", "Delete old app from app launcher", RepositoryConstants.CONFIG,
194                                 "/modules/ui-admincentral/config/appLauncherLayout/groups/data/apps/RssAggregatorApp"))));
195         register(DeltaBuilder.update("2.3", "")
196                 .addTask(new ContentAppMigrationTask("/modules/rssaggregator"))
197                 .addTask(new BootstrapSingleModuleResource("Bootstrap button", "Bootstrap button for immediate import", "config.modules.rssaggregator.fieldTypes.xml"))
198                 .addTask(new BootstrapSingleModuleResource("Bootstrap fetcher", "Bootstrap default rss fetcher", "config/config.modules.rssaggregator.config.fetcher.xml"))
199                 .addTask(setDefaultValues)
200                 .addTask(new PartialBootstrapTask("Bootstrap schedule tab", "Updates app with tab enabling RSS scheduling", "/mgnl-bootstrap/rssaggregator/app/config.modules.rssaggregator.apps.xml", "/apps/rssAggregator/subApps/detail/editor/form/tabs/scheduleTab", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
201                 .addTask(new PartialBootstrapTask("Bootstrap command", "Bootstraps default rss import command", "/mgnl-bootstrap/rssaggregator/config/commands/config.modules.rssaggregator.commands.xml", "/commands/rss", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
202                 .addTask(new RemoveNodeTask("Remove config", "Remove old configuration app co the new one can be bootstrapen", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/config"))
203                 .addTask(new PartialBootstrapTask("Bootstrap new config", "Bootstraps new configuration sub-app", "/mgnl-bootstrap/rssaggregator/app/config.modules.rssaggregator.apps.xml", "/apps/rssAggregator/subApps/config", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
204                 .addTask(new PartialBootstrapTask("Bootstrap action", "Bootstraps import action", "/mgnl-bootstrap/rssaggregator/app/config.modules.rssaggregator.apps.xml", "/apps/rssAggregator/subApps/browser/actions/runImport", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
205                 .addTask(new PartialBootstrapTask("Bootstrap action", "Bootstraps import all action", "/mgnl-bootstrap/rssaggregator/app/config.modules.rssaggregator.apps.xml", "/apps/rssAggregator/subApps/browser/actions/runImportOnAllRSS", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
206                 .addTask(new PartialBootstrapTask("Bootstrap action", "Place import all action to action bar", "/mgnl-bootstrap/rssaggregator/app/config.modules.rssaggregator.apps.xml", "/apps/rssAggregator/subApps/browser/actionbar/sections/root/groups/feedImportActions", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
207                 .addTask(new PartialBootstrapTask("Bootstrap action", "Place import action to action bar", "/mgnl-bootstrap/rssaggregator/app/config.modules.rssaggregator.apps.xml", "/apps/rssAggregator/subApps/browser/actionbar/sections/rssAggregator/groups/feedImportActions", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))
208                 .addTask(new OrderNodeBeforeTask("Order action bar", "Place import feed action to proper place", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/browser/actionbar/sections/rssAggregator/groups/feedImportActions", "importExportActions"))
209                 .addTask(new NodeExistsDelegateTask("Add property", "Add property for vertical layout of fields", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/editor/form/tabs/mainTab/fields/feeds/field", new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/editor/form/tabs/mainTab/fields/feeds/field", "layout", "vertical")))
210                 .addTask(new NodeExistsDelegateTask("Add property", "Add property for vertical layout of fields", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/editor/form/tabs/mainTab/fields/filters/field", new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/editor/form/tabs/mainTab/fields/filters/field", "layout", "vertical")))
211                 .addTask(new NodeExistsDelegateTask("Change save action", "Replace form save action with RSS specific one.", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/actions/commit", new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/actions/commit", "implementationClass", "info.magnolia.module.rssaggregator.action.SaveRSSAction")))
212                 .addTask(new NodeExistsDelegateTask("Add transformer", "Add proper transformer class for name field.", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/editor/form/tabs/mainTab/fields/name", new SetPropertyTask("", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/detail/editor/form/tabs/mainTab/fields/name", "transformerClass", "info.magnolia.module.rssaggregator.action.RSSBasicTransformer")))
213                 .addTask(new NodeExistsDelegateTask("JCR agnostic remove node", "Remove nodeTypes node.", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/browser/actions/editRSSAggregator/availability/nodeTypes", new RemoveNodeTask("", "", RepositoryConstants.CONFIG, "/modules/rssaggregator/apps/rssAggregator/subApps/browser/actions/editRSSAggregator/availability/nodeTypes")))
214                 .addTask(new RegisterWorkspaceForCacheFlushingTask("rss"))
215                 .addTask(new RenameFilterFieldsPropertiesTask())
216                 );
217 
218         register(DeltaBuilder.update("2.3.1", "")
219                 .addTask(new SetWritePermissionForActionsTask(RSSAGGREGATOR_APP_ACTIONS, new String[] { "addFolder", "editFolder", "addRSSAggregator", "delete", "editRSSAggregator", "import", "restorePreviousVersion", "confirmDeleteRSSAggregator", "runImport", "runImportOnAllRSS", "activate", "deactivate", "activateDeleted" })));
220 
221     }
222 
223     @Override
224     protected List<Task> getExtraInstallTasks(InstallContext installContext) {
225         List<Task> tasks = new ArrayList<Task>();
226         tasks.add(new ModuleDependencyBootstrapTask("observation"));
227         tasks.addAll(super.getExtraInstallTasks(installContext));
228         tasks.add(new NodeExistsDelegateTask("Reorder RSS in MANAGE group", "This reorders the RSS app before Config in the Manage group of the applauncher.", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/manage/apps/configuration",
229                 new OrderNodeBeforeTask("", "", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/manage/apps/rssAggregator", "configuration")));
230         tasks.add(setDefaultValues);
231         tasks.add(new RegisterWorkspaceForCacheFlushingTask("rss"));
232         return tasks;
233     }
234 
235     @Override
236     protected List<Task> getDefaultUpdateTasks(Version forVersion) {
237         final List<Task> tasks = new ArrayList<Task>();
238         tasks.addAll(super.getDefaultUpdateTasks(forVersion));
239         return tasks;
240     }
241 }