View Javadoc
1   /**
2    * This file Copyright (c) 2013-2015 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.pages.setup;
35  
36  import static info.magnolia.jcr.nodebuilder.Ops.*;
37  
38  import info.magnolia.i18nsystem.setup.RemoveHardcodedI18nPropertiesFromDialogsTask;
39  import info.magnolia.i18nsystem.setup.RemoveHardcodedI18nPropertiesFromSubappsTask;
40  import info.magnolia.jcr.nodebuilder.task.ErrorHandling;
41  import info.magnolia.jcr.nodebuilder.task.NodeBuilderTask;
42  import info.magnolia.jcr.util.NodeTypes;
43  import info.magnolia.module.DefaultModuleVersionHandler;
44  import info.magnolia.module.InstallContext;
45  import info.magnolia.module.delta.ArrayDelegateTask;
46  import info.magnolia.module.delta.BootstrapConditionally;
47  import info.magnolia.module.delta.BootstrapSingleModuleResource;
48  import info.magnolia.module.delta.CheckAndModifyPropertyValueTask;
49  import info.magnolia.module.delta.DeltaBuilder;
50  import info.magnolia.module.delta.IsModuleInstalledOrRegistered;
51  import info.magnolia.module.delta.NewPropertyTask;
52  import info.magnolia.module.delta.NodeExistsDelegateTask;
53  import info.magnolia.module.delta.OrderNodeAfterTask;
54  import info.magnolia.module.delta.PartialBootstrapTask;
55  import info.magnolia.module.delta.PropertyExistsDelegateTask;
56  import info.magnolia.module.delta.RemoveNodeTask;
57  import info.magnolia.module.delta.RemovePropertiesTask;
58  import info.magnolia.module.delta.RemovePropertyTask;
59  import info.magnolia.module.delta.RenameNodesTask;
60  import info.magnolia.module.delta.SetPropertyTask;
61  import info.magnolia.module.delta.Task;
62  import info.magnolia.pages.app.PagesContentApp;
63  import info.magnolia.pages.app.action.PreviewPreviousVersionActionDefinition;
64  import info.magnolia.pages.app.action.RestorePreviousVersionActionDefinition;
65  import info.magnolia.pages.app.editor.PagesEditorSubAppDescriptor;
66  import info.magnolia.repository.RepositoryConstants;
67  import info.magnolia.ui.admincentral.setup.ConvertAclToAppPermissionTask;
68  import info.magnolia.ui.contentapp.ConfiguredContentAppDescriptor;
69  import info.magnolia.ui.contentapp.ContentApp;
70  import info.magnolia.ui.contentapp.availability.IsNotVersionedDetailLocationRule;
71  import info.magnolia.ui.contentapp.browser.action.ShowVersionsActionDefinition;
72  import info.magnolia.ui.contentapp.detail.DetailSubAppDescriptor;
73  import info.magnolia.ui.contentapp.setup.for5_3.ContentAppMigrationTask;
74  import info.magnolia.ui.framework.setup.AddIsPublishedRuleToAllDeactivateActionsTask;
75  import info.magnolia.ui.framework.setup.SetWritePermissionForActionsTask;
76  
77  import java.util.ArrayList;
78  import java.util.Arrays;
79  import java.util.List;
80  
81  /**
82   * Version handler for the pages app module.
83   */
84  public class PagesModuleVersionHandler extends DefaultModuleVersionHandler {
85  
86      public static final String PAGES_APP_ACTIONS = "/modules/pages/apps/pages/subApps/browser/actions/";
87  
88      public PagesModuleVersionHandler() {
89          super();
90  
91          register(DeltaBuilder.update("5.0", "Configuration update for Magnolia 5.0")
92                  .addTask(new IsModuleInstalledOrRegistered("", "", "adminInterface",
93                          new BootstrapConditionally("Bootstrap activation commands", "Bootstraps the default activation and deletion commands which no longer reside under adminInterface.", "config.modules.pages.commands.xml")))
94                  .addTask(new ConvertAclToAppPermissionTask("Convert permissions for Pages app", "Convert ACL permissions for old 'Website' menu to new 'pages-app' permission", "/modules/adminInterface/config/menu/website", "/modules/pages/apps/pages", true)));
95  
96          register(DeltaBuilder.update("5.0.1", "")
97                  .addTask(new NodeExistsDelegateTask("Remove dialog links Node", "Remove dialog definition in pages/dialogs/links", RepositoryConstants.CONFIG, "/modules/pages/dialogs/link",
98                          new RemoveNodeTask("Remove dialog links Node", "Remove dialog definition in pages/dialogs/links", RepositoryConstants.CONFIG, "/modules/pages/dialogs/link")))
99                  .addTask(new NodeExistsDelegateTask("Add title to CreatePage dialog", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/createPage/form",
100                         new NewPropertyTask("Add title to CreatePage dialog", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/createPage/form", "label", "pages.dialog.add_page"))));
101 
102         register(DeltaBuilder.update("5.0.2", "")
103                 // new action for confirmation
104                 .addTask(new PartialBootstrapTask("Add new confirmation action definition", "", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/browser/actions/confirmDeletion"))
105 
106                 .addTask(new NodeExistsDelegateTask("Remove action availability from delete action", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete/availability",
107                         new RemoveNodeTask("", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete/availability")))
108                 .addTask(new PropertyExistsDelegateTask("Remove label for delete action", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete", "label",
109                         new RemovePropertyTask("", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete", "label")))
110                 .addTask(new PropertyExistsDelegateTask("Remove icon for delete action", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete", "icon",
111                         new RemovePropertyTask("", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete", "icon")))
112 
113                 // update actionbar for confirmation
114                 .addTask(new NodeExistsDelegateTask("Update actionbar configuration", "Rename action mapping to new confirmation action", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actionbar",
115                         new RenameNodesTask("Rename action bar items", "Rename delete to confirmDeletion", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actionbar", "delete", "confirmDeletion", NodeTypes.ContentNode.NAME))));
116 
117         register(DeltaBuilder.update("5.1", "")
118                 .addTask(new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "confirmDeletion",
119                         new NewPropertyTask("", "", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "confirmDeletion/availability", "multiple", true)))
120 
121                 // add show versions action
122                 // if module diff is installed, this task will create a second node showVersions
123                 // we'll handle the renaming of the correct node in module diff
124                 .addTask(new NodeBuilderTask("Create showVersions action", "", ErrorHandling.logging, RepositoryConstants.CONFIG, PAGES_APP_ACTIONS,
125                         addNode("showVersions", NodeTypes.ContentNode.NAME).then(
126                                 addProperty("class", ShowVersionsActionDefinition.class.getName()),
127                                 addProperty("icon", "icon-show-versions"),
128                                 addNode("availability", NodeTypes.ContentNode.NAME).then(
129                                         addProperty("ruleClass", "info.magnolia.ui.api.availability.HasVersionsRule")
130                                         )
131                                 )
132                         ))
133                 // bootstrap versionActions to action bar if it doesn't exists already
134                 .addTask(new NodeExistsDelegateTask("Bootstrap actionbar section group for versionActions", "", RepositoryConstants.CONFIG, "/pages/subApps/browser/actionbar/sections/pageActions/groups/versionActions", null,
135                         new PartialBootstrapTask("", "", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/browser/actionbar/sections/pageActions/groups/versionActions")
136                         ))
137 
138                 // Remove hardcoded i18n properties, e.g. label, description, etc.
139                 .addTask(new RemoveHardcodedI18nPropertiesFromSubappsTask("pages"))
140 
141                 // cleanup pages commands
142                 .addTask(new NodeExistsDelegateTask("remove the activate command chain from pages app", "", RepositoryConstants.CONFIG, "/modules/pages/commands/website/activate",
143                         new RemoveNodeTask("", "", RepositoryConstants.CONFIG, "/modules/pages/commands/website/activate")))
144                 .addTask(new NodeExistsDelegateTask("remove the deactivate command chain from pages app", "", RepositoryConstants.CONFIG, "/modules/pages/commands/website/deactivate",
145                         new RemoveNodeTask("", "", RepositoryConstants.CONFIG, "/modules/pages/commands/website/deactivate")))
146 
147                 .addTask(new PartialBootstrapTask("Bootstrap new activate commands to website catalog.", "", "/mgnl-bootstrap/pages/config.modules.pages.commands.xml", "/commands/website/activate"))
148                 .addTask(new PartialBootstrapTask("Bootstrap new deactivate commands to website catalog.", "", "/mgnl-bootstrap/pages/config.modules.pages.commands.xml", "/commands/website/deactivate"))
149 
150                 // Add availability rules to detail view actions
151                 .addTask(new NodeBuilderTask("Add availability rule to edit action", "", ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/detail/actions/edit",
152                         addNode("availability", NodeTypes.ContentNode.NAME).then(
153                                 addProperty("ruleClass", IsNotVersionedDetailLocationRule.class.getName())
154                                 )
155                         ))
156                 .addTask(new NodeBuilderTask("Add availability rule to activate action", "", ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/detail/actions/activate",
157                         addNode("availability", NodeTypes.ContentNode.NAME).then(
158                                 addProperty("ruleClass", IsNotVersionedDetailLocationRule.class.getName())
159                                 )
160                         ))
161                 .addTask(new NodeBuilderTask("Add availability rule to deactivate action", "", ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/detail/actions/deactivate",
162                         addNode("availability", NodeTypes.ContentNode.NAME).then(
163                                 addProperty("ruleClass", IsNotVersionedDetailLocationRule.class.getName())
164                                 )
165                         ))
166 
167                 .addTask(new PartialBootstrapTask("Bootstrap move action in Pages app", "",
168                         "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/browser/actions/move"))
169                 .addTask(new PartialBootstrapTask("Bootstrap move action to Pages app actionbar", "Adds action move to folder/editingActions section in actionbar.",
170                         "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/browser/actionbar/sections/pageActions/groups/editingActions/items/move")));
171 
172         register(DeltaBuilder.update("5.1.1", "")
173                 .addTask(new NodeExistsDelegateTask("Add root availability to import", "Add root availability to import action in Pages app", RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "import/availability",
174                         new NewPropertyTask("Add root availability to import", "Add root availability to import action in Pages app", RepositoryConstants.CONFIG,
175                                 PAGES_APP_ACTIONS + "import/availability", "root", true))));
176 
177         register(DeltaBuilder.update("5.2.2", "")
178                 .addTask(new RemoveHardcodedI18nPropertiesFromDialogsTask("pages"))
179                 .addTask(new SetPropertyTask(RepositoryConstants.CONFIG, "/modules/pages/apps/pages", "class", ConfiguredContentAppDescriptor.class.getName()))
180                 .addTask(new SetPropertyTask(RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "import/availability", "root", "true"))
181                 .addTask(new PartialBootstrapTask("Bootstrap restore version action", "", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "pages/subApps/browser/actions/restoreVersion"))
182                 .addTask(new NodeExistsDelegateTask("Bootstrap restore version action to actionbar", "", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actionbar/sections/pageActions/groups/versionActions/items",
183                         new ArrayDelegateTask("",
184                                 new PartialBootstrapTask("", "", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/browser/actionbar/sections/pageActions/groups/versionActions/items/restoreVersion"),
185                                 new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actionbar/sections/pageActions/groups/versionActions/items/showVersions",
186                                         new OrderNodeAfterTask("", "", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actionbar/sections/pageActions/groups/versionActions/items/restoreVersion", "showVersions"))))));
187 
188         register(DeltaBuilder.update("5.2.3", "")
189                 .addTask(new SetWritePermissionForActionsTask(PAGES_APP_ACTIONS,
190                         new String[] { "add", "confirmDeletion", "edit", "editPageName", "editTemplate", "restorePreviousVersion", "import", "move", "restoreVersion" }))
191                 .addTask(new SetWritePermissionForActionsTask("/modules/pages/apps/pages/subApps/detail/actions", new String[] { "edit" })));
192 
193         register(DeltaBuilder.update("5.2.5", "")
194                 .addTask(new IsModuleInstalledOrRegistered("Configure recursive activation and deletion as asynchronous", "scheduler", new ArrayDelegateTask("",
195                         new NodeExistsDelegateTask("Configure recursive activation as asynchronous", PAGES_APP_ACTIONS + "activateRecursive",
196                                 new SetPropertyTask(RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "activateRecursive", "asynchronous", "true")),
197                         new NodeExistsDelegateTask("Configure deletion as asynchronous", PAGES_APP_ACTIONS + "delete",
198                                 new SetPropertyTask(RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete", "asynchronous", "true"))
199                         ))));
200 
201         register(DeltaBuilder.update("5.3", "")
202                 .addTask(new ArrayDelegateTask("Make dialogs light", "Turns edit page and edit template dialogs into light dialogs.",
203                         new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/editPage",
204                                 new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/editPage", "modalityLevel", "light")),
205                         new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/createPage",
206                                 new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/createPage", "modalityLevel", "strong")),
207                         new NodeExistsDelegateTask("", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/editTemplate",
208                                 new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/pages/dialogs/editTemplate", "modalityLevel", "light"))))
209          .addTask(new ContentAppMigrationTask("/modules/pages", RestorePreviousVersionActionDefinition.class, PreviewPreviousVersionActionDefinition.class)));
210 
211         register(DeltaBuilder.update("5.3.1", "")
212                 .addTask(new SetWritePermissionForActionsTask(PAGES_APP_ACTIONS, new String [] { "activate", "activateRecursive", "deactivate", "activateDeletion" })));
213 
214         register(DeltaBuilder.update("5.3.3", "")
215                 .addTask(new UpdatePageEditorActionAvailability()));
216 
217         register(DeltaBuilder.update("5.3.4", "")
218                 .addTask(new NodeExistsDelegateTask("Make action available on multiple nodes", "Makes restorePreviousVersion action available on multiple nodes.",
219                         RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/restorePreviousVersion/availability",
220                         new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/restorePreviousVersion/availability", "multiple", true)))
221                 .addTask(new NodeExistsDelegateTask("Configure restorePreviousVersion", "Makes restorePreviousVersion action act only on mgnl:page node type.",
222                         RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/restorePreviousVersion",
223                         new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/restorePreviousVersion", "parentNodeTypeOnly", true)))
224 
225                 .addTask(new NodeExistsDelegateTask("Bootstrap actionbar availability.", "/modules/pages/apps/pages/subApps/detail/actionbar/sections",
226                         new ArrayDelegateTask("Bootstrap actionbar availability for pageActions and pagePreviewActions.",
227                                 new PartialBootstrapTask("Bootstrap pagePreviewActions actionbar section availability rule.",
228                                         "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml",
229                                         "/pages/subApps/detail/actionbar/sections/pagePreviewActions/availability/rules/isPageElement"),
230                                 new PartialBootstrapTask("Bootstrap pagePreviewActions actionbar section availability rule.",
231                                         "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml",
232                                         "/pages/subApps/detail/actionbar/sections/pagePreviewActions/availability/rules/isNotDeleted"),
233                                 new PartialBootstrapTask("Bootstrap pageActions actionbar section availability rule.",
234                                         "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml",
235                                         "/pages/subApps/detail/actionbar/sections/pageActions/availability/rules/isPageElement"),
236                                 new PartialBootstrapTask("Bootstrap pageActions actionbar section availability rule.",
237                                         "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml",
238                                         "/pages/subApps/detail/actionbar/sections/pageActions/availability/rules/isNotDeleted"))))
239         );
240 
241         register(DeltaBuilder.update("5.3.6", "")
242                 .addTask(new AddIsPublishedRuleToAllDeactivateActionsTask("","/modules/pages/apps/"))
243                 .addTask(new ArrayDelegateTask("Bootstrap IsPublishableRule",
244                         new PartialBootstrapTask("", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/browser/actions/activate/availability/rules/IsPublishableRule"),
245                         new PartialBootstrapTask("", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/browser/actions/activateRecursive/availability/rules/IsPublishableRule"))));
246         register(DeltaBuilder.update("5.3.8", "")
247                 .addTask(new NodeExistsDelegateTask("Bootstrap newComponent dialog", "newComponent dialog is no longer hard-coded within CreateComponentAction, bootstrap it if it doesn't exist already.",
248                         RepositoryConstants.CONFIG, "/modules/pages/dialogs/newComponent",
249                         null, new BootstrapSingleModuleResource("", "", "dialogs/config.modules.pages.dialogs.newComponent.xml")))
250         );
251         register(DeltaBuilder.update("5.3.9", "")
252                 .addTask(new NodeExistsDelegateTask("Configure multiple", "Allow select multiple items for activateDeletion action.",
253                         RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/activateDeletion/availability",
254                         new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/activateDeletion/availability", "multiple", "true"))
255                         )
256         );
257         register(DeltaBuilder.update("5.4", "")
258                 .addTask(new NodeExistsDelegateTask("Bootstrap page editor extensions.", "/modules/pages/apps/pages/subApps/detail", new ArrayDelegateTask("",
259                         new CheckAndModifyPropertyValueTask("/modules/pages/apps/pages/subApps/detail", "class", DetailSubAppDescriptor.class.getName(), PagesEditorSubAppDescriptor.class.getName()),
260                         new CheckAndModifyPropertyValueTask("/modules/pages/apps/pages", "appClass", ContentApp.class.getName(), PagesContentApp.class.getName()),
261                         new PartialBootstrapTask("Bootstrap pageBar extensions", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/detail/pageBar"),
262                         new PartialBootstrapTask("Bootstrap statusBar extensions", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/detail/statusBar"))))
263                 .addTask(new NodeExistsDelegateTask("Add IsPageEditableRule to apps/pages/subApps/detail/actions/editProperties", "/modules/pages/apps/pages/subApps/detail/actions/editProperties",
264                         new ArrayDelegateTask("", "",
265                                 new NodeExistsDelegateTask("", "/modules/pages/apps/pages/subApps/detail/actions/editProperties/availability", null,
266                                         new info.magnolia.jcr.nodebuilder.task.NodeBuilderTask("", "", info.magnolia.jcr.nodebuilder.task.ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/detail/actions/editProperties",
267                                                 addNode("availability", NodeTypes.ContentNode.NAME))),
268                                 new NodeExistsDelegateTask("", "/modules/pages/apps/pages/subApps/detail/actions/editProperties/availability/rules", null,
269                                         new info.magnolia.jcr.nodebuilder.task.NodeBuilderTask("", "", info.magnolia.jcr.nodebuilder.task.ErrorHandling.logging, RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/detail/actions/editProperties/availability",
270                                                 addNode("rules", NodeTypes.ContentNode.NAME))),
271                                 new NodeExistsDelegateTask("", "/modules/pages/apps/pages/subApps/detail/actions/editProperties/availability/rules/isPageEditable", null,
272                                         new PartialBootstrapTask("", "/mgnl-bootstrap/pages/config.modules.pages.apps.pages.xml", "/pages/subApps/detail/actions/editProperties/availability/rules/isPageEditable")))))
273         );
274         register(DeltaBuilder.update("5.4.1", "")
275                 .addTask(new NodeExistsDelegateTask("Configure multiple", "Allow select multiple items for activateDeletion action.",
276                                 RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/activateDeletion/availability",
277                                 new NewPropertyTask("", "", RepositoryConstants.CONFIG, "/modules/pages/apps/pages/subApps/browser/actions/activateDeletion/availability", "multiple", "true")))
278                 .addTask(new RemovePropertiesTask("Remove obsolete or superfluous access roles", RepositoryConstants.CONFIG, Arrays.asList(
279                         PAGES_APP_ACTIONS + "activate/availability/access/roles/demo-publisher",
280                         PAGES_APP_ACTIONS + "activate/availability/access/roles/superuser",
281                         PAGES_APP_ACTIONS + "deactivate/availability/access/roles/demo-publisher",
282                         PAGES_APP_ACTIONS + "deactivate/availability/access/roles/superuser",
283                         PAGES_APP_ACTIONS + "activateRecursive/availability/access/roles/demo-publisher",
284                         PAGES_APP_ACTIONS + "activateRecursive/availability/access/roles/superuser",
285                         PAGES_APP_ACTIONS + "activateDeletion/availability/access/roles/demo-publisher",
286                         PAGES_APP_ACTIONS + "activateDeletion/availability/access/roles/superuser"), false))
287         );
288     }
289 
290     @Override
291     protected List<Task> getExtraInstallTasks(InstallContext installContext) {
292         List<Task> tasks = new ArrayList<Task>();
293         tasks.addAll(super.getExtraInstallTasks(installContext));
294         tasks.add(new IsModuleInstalledOrRegistered("Configure recursive activation and deletion as asynchronous", "scheduler", new ArrayDelegateTask("",
295                 new NodeExistsDelegateTask("Configure recursive activation as asynchronous", PAGES_APP_ACTIONS + "activateRecursive",
296                         new SetPropertyTask(RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "activateRecursive", "asynchronous", "true")),
297                 new NodeExistsDelegateTask("Configure deletion as asynchronous", PAGES_APP_ACTIONS + "delete",
298                         new SetPropertyTask(RepositoryConstants.CONFIG, PAGES_APP_ACTIONS + "delete", "asynchronous", "true"))
299                 )));
300         return tasks;
301     }
302 }