private void addCancelButtonTextFieldToFormSubmitTemplate(DeltaBuilder delta) { final String parentPath = "/modules/form/dialogs/formSubmit/form/tabs/tabMain/fields"; String generalDescTxt = " an additional field 'cancelButtonLabel' to" + parentPath + "."; Task bootstrapSingleModuleResource = new BootstrapSingleModuleResource("Add" + generalDescTxt, "Adds" + generalDescTxt, "dialogs/config.modules.form.dialogs.formSubmit.yaml", "/formSubmit/form/tabs/tabMain/fields/cancelButtonText"); NodeExistsDelegateTask nodeExistsDelegateTask = new NodeExistsDelegateTask("Conditionally add" + generalDescTxt + "(If " + parentPath + " exists.)", parentPath, bootstrapSingleModuleResource); delta.addTask(nodeExistsDelegateTask); }
@Override protected void doExecute(InstallContext installContext) throws RepositoryException, TaskExecutionException { final Session session = installContext.getConfigJCRSession(); final String newCacheFactoryName = StringUtils.substringBefore(StringUtils.lowerCase(StringUtils.substringAfterLast(session.getNode("/modules/cache/config/cacheFactory/").getProperty("class").getString(), ".")), "factory"); new RenameNodeTask("", RepositoryConstants.CONFIG, "/modules/cache/config", "cacheFactory", newCacheFactoryName, false).execute(installContext); new BootstrapSingleModuleResource("config.modules.cache.config.cacheFactory.xml").execute(installContext); new MoveNodeTask("", "/modules/cache/config/" + newCacheFactoryName, "/modules/cache/config/cacheFactory/delegateFactories/" + newCacheFactoryName, false).execute(installContext); } }
@Override public void bootstrap(final InstallContext installContext, int importUUIDBehavior) throws IOException, RepositoryException { BootstrapUtil.bootstrap(getResourcesToBootstrap(installContext)[0], subPath, importUUIDBehavior); }
protected List<Task> getCommonTasks() { final List<Task> commonTasks = new ArrayList<>(); commonTasks.add(new IsInstallSamplesTask("Re-Bootstrap website content for sample pages", "Re-bootstrap website content to account for all changes", new ArrayDelegateTask("", new BootstrapSingleResource("", "", "/mgnl-bootstrap-samples/samples/website.ftl-sample-site.xml"), new BootstrapSingleResource("", "", "/mgnl-bootstrap-samples/samples/dam.samples.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING)))); // We re-bootstrap twice because a simple (and single) re-bootstrap (using ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING) would NOT // "move" an existing site definition (which might actually exist from a previous version) in the site module commonTasks.add(new BootstrapSingleModuleResource("config.modules.samples.config.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)); commonTasks.add(new BootstrapSingleModuleResource("config.modules.samples.config.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)); return commonTasks; }
@Test public void partialXmlBootstrap() throws Exception { // GIVEN Node child = NodeUtil.createPath(session.getRootNode(), "parent/child", NodeTypes.ContentNode.NAME); child.setProperty("propertyWhichShouldBeRemoved", "propertyWhichShouldBeRemoved"); final BootstrapSingleModuleResource task = new BootstrapSingleModuleResource("", "", "config.parent.xml", "parent/child"); // WHEN task.execute(ctx); //THEN assertThat(session.getRootNode(), hasNode("parent")); assertThat(session.getNode("/parent"), hasNode("child")); assertThat(session.getNode("/parent/child"), not(hasProperty("propertyWhichShouldBeRemoved"))); }
@Test public void testAutogeneratedDescription() throws Exception { // GIVEN PropertyExistsDelegateTask task; // WHEN task = new PropertyExistsDelegateTask("taskName", "/somePath/someNode", "someProperty", new BootstrapSingleModuleResource("/info/magnolia/test/website.newtestpages1.xml"), new BootstrapSingleModuleResource("/info/magnolia/test/website.newtestpages2.xml") ); // THEN assertEquals( "Execute task [Bootstraps module resource '/info/magnolia/test/website.newtestpages1.xml' from '/mgnl-bootstrap/' folder.] if property '/somePath/someNode/someProperty' exists " + "or [Bootstraps module resource '/info/magnolia/test/website.newtestpages2.xml' from '/mgnl-bootstrap/' folder.] if not.", task.getDescription()); } }
@Test public void partialYamlBootstrap() throws Exception { // GIVEN Node child = NodeUtil.createPath(session.getRootNode(), "/parent/child", NodeTypes.ContentNode.NAME); child.setProperty("propertyWhichShouldBeRemoved", "propertyWhichShouldBeRemoved"); final BootstrapSingleModuleResource task = new BootstrapSingleModuleResource("", "", "config.parent.yaml", "/parent/child"); // WHEN task.execute(ctx); //THEN assertThat(session.getRootNode(), hasNode("parent")); assertThat(session.getNode("/parent"), hasNode("child")); assertThat(session.getNode("/parent"), not(hasNode("sibling"))); assertThat(session.getNode("/parent/child"), hasProperty("property", "value")); assertThat(session.getNode("/parent/child"), not(hasProperty("propertyWhichShouldBeRemoved"))); }
public ExchangeSimpleModuleVersionHandler() { super(); register(DeltaBuilder.checkPrecondition("4.4.6", "4.5")); register(DeltaBuilder.update("4.5", "URL of activation filter is no longer password protected but uses encryption instead.") .addTask(new BootstrapSingleModuleResource("Configure ActivationPage", "Register class to be used.", "config.modules.exchange-simple.pages.activationPage.xml")) .addTask(new BootstrapSingleModuleResource("ActivationPage Menu", "Configure menu in AdminInterface.", "config.modules.adminInterface.config.menu.tools.activationPage.xml")) .addTask(new IsAuthorInstanceDelegateTask("Security update", "Update security keys if on author instance.", new AbstractTask("", "") { @Override public void execute(InstallContext installContext) throws TaskExecutionException { try { SecurityUtil.updateKeys(SecurityUtil.generateKeyPair(1024)); } catch (NoSuchAlgorithmException e) { throw new TaskExecutionException(e.getMessage(), e); } } })) .addTask(new FilterOrderingTask("activation", new String[] { "context", "login", "multipartRequest" }))); register(DeltaBuilder.update("4.5.8", "") .addTask(new BootstrapSingleModuleResource("Configure Activation Log Storage", "Register ActivationLogStorage class", "config.modules.exchange-simple.config.activationLogStorage.xml")) .addTask(new BootstrapSingleModuleResource("Configure ActivationMonitorPage", "Register ActivationMonitorPage class", "config.modules.exchange-simple.pages.activationMonitor.xml")) .addTask(new BootstrapSingleModuleResource("Activation Monitor Page in menu", "Register Activation Monitor page in AdminInterface Tools menu", "config.modules.adminInterface.config.menu.tools.activationMonitor.xml")) .addTask(new OrderNodeAfterTask("Order Activation Monitor menu item.", "Order Activation Monitor menu item.", RepositoryConstants.CONFIG, "/modules/adminInterface/config/menu/tools/activationMonitor", "activationPage"))); }
public RestIntegrationModuleVersionHandler() { register(DeltaBuilder.update("2.0", "") .addTask(new UpdateRestEditorRoleTask("Update old rest role to new rest-editor role", "")) .addTask(new BootstrapSingleModuleResource("Bootstrap file userroles.rest-admin.xml", "", "userroles.rest-admin.xml")) .addTask(new BootstrapSingleModuleResource("Bootstrap file userroles.rest-anonymous.xml", "", "userroles.rest-anonymous.xml")) .addTask(new RemoveRoleFromUserTask("Remove rest-editor role from superuser", "superuser", "rest-editor")) .addTask(new AddRoleToUserTask("Add role 'rest-admin' to user 'superuser'", "superuser", "rest-admin")) .addTask(new AddRoleToUserTask("Add role 'rest-anonymous' to user 'anonymous'", "anonymous", "rest-anonymous")) ); }
@Test public void autoGeneratedDescription() throws Exception { // GIVEN Task task; // WHEN task = new BootstrapSingleModuleResource("resourceName"); // THEN assertEquals("Bootstraps module resource 'resourceName' from '/mgnl-bootstrap/' folder.", task.getDescription()); } }
public SchedulerModuleVersionHandler() { register(DeltaBuilder.update("2.1.1", "") .addTask(new BootstrapSingleModuleResource("config.modules.scheduler.messageViews.xml")) ); register(DeltaBuilder.update("2.1.3", "") .addTask(new RenamePropertiesTask("Rename deprecated properties", RepositoryConstants.CONFIG, "/modules/scheduler/config/jobs", "active", "enabled")) ); }
public SiteModuleVersionHandler() { register(DeltaBuilder.update("1.0.1", "") .addTask(updateI18nContentSupport)); register(DeltaBuilder.update("1.0.3", "") .addTask(new NodeExistsDelegateTask("Create empty site definition node if it does not exist", "/modules/site/config/site", null, new BootstrapSingleModuleResource("config.modules.site.config.site.xml")))); register(DeltaBuilder.update("1.0.5", "") .addTask(new BootstrapConditionally("Add site-aware JSP renderer if it does not exist", "/mgnl-bootstrap/site/config.modules.site.renderers.site-jsp.xml")) .addTask(new PropertyValueDelegateTask("Reconfigure site renderer to delegate to freemarker renderer", "/modules/site/renderers/site", "class", SiteAwareFreemarkerRenderer.class.getName(), true, new ArrayDelegateTask("", new SetPropertyTask(RepositoryConstants.CONFIG, "/modules/site/renderers/site", "wrappedRendererType", "freemarker"), new SetPropertyTask(RepositoryConstants.CONFIG, "/modules/site/renderers/site", "class", SiteAwareRendererWrapper.class.getName()), new RemoveNodeTask("", "/modules/site/renderers/site/contextAttributes"), new RemovePropertyTask("", "/modules/site/renderers/site/", "type")))) .addTask(orderSiteMergeFilter) //fix incorrect order of siteMerge filter after update from M5.3 which is before multiSite filter ); register(DeltaBuilder.update("1.1", "") .addTask(new NodeExistsDelegateTask("Remove themes folder if empty", "Location /modules/site/config/themes is deprecated but still supported", RepositoryConstants.CONFIG, "/modules/site/config/themes", new RemoveNodeWithoutChildren("/modules/site/config/themes")))); }
.addTask(new BootstrapSingleResource("Bootstrap 'empty' validator", "Add validator for empty field.", "/mgnl-bootstrap/form/validators/config.modules.form.config.validators.empty.yaml")) .addTask(new BootstrapSingleModuleResource("Mail type", "Bootstraps dialog option for mail type to be sent overriding content type in the process.", "dialogs/config.modules.form.dialogs.form.yaml", "/form/form/tabs/tabConfirmEmail/fields/confirmMailType")) .addTask(new NodeExistsDelegateTask("Order field 'confirmMailType'", "Order field 'confirmMailType' if 'confirmContentType' field exists.", RepositoryConstants.CONFIG, "/modules/form/dialogs/form/form/tabs/tabConfirmEmail/fields/confirmContentType", new BootstrapSingleModuleResource("", "","dialogs/config.modules.form.dialogs.formFile.yaml", "/formFile/form/tabs/tabMain/fields/validation"))) ); .addTask(new ArrayDelegateTask("Bootstrap configuration for HTML5 input types support", new BootstrapSingleResource("", "", "/mgnl-bootstrap/form/templates/components/config.modules.form.templates.components.formNumber.yaml"), new BootstrapSingleModuleResource("", "","templates/components/config.modules.form.templates.components.formGroupFields.yaml", "formGroupFields/areas/fields/availableComponents/formNumber"), new BootstrapSingleResource("", "", "/mgnl-bootstrap/form/dialogs/config.modules.form.dialogs.formNumber.yaml"), new BootstrapSingleModuleResource("", "", "dialogs/config.modules.form.dialogs.formEdit.yaml", "/formEdit/form/tabs/tabAdvanced/") .addTask(new BootstrapSingleModuleResource("", "Bootstrap new hideInStepNavigation field into formStep component", "dialogs/config.modules.form.dialogs.formStep.yaml", "/formStep/form/tabs/tabMain/fields/hideInStepNavigation")) ); new NodeExistsDelegateTask("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/title' if node doesn't exist", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/title", null, new BootstrapSingleModuleResource("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/title'", "Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/title'", "dialogs/config.modules.form.dialogs.formNumber.yaml", "formNumber/form/tabs/tabMain/fields/title")), new NodeExistsDelegateTask("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/controlName' if node doesn't exist", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/controlName", null, new BootstrapSingleModuleResource("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/controlName'", "Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/controlName'", "dialogs/config.modules.form.dialogs.formNumber.yaml", "formNumber/form/tabs/tabMain/fields/controlName")), new NodeExistsDelegateTask("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/description' if node doesn't exist", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/description", null, new BootstrapSingleModuleResource("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/description'", "Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/description'", "dialogs/config.modules.form.dialogs.formNumber.yaml", "formNumber/form/tabs/tabMain/fields/description")), new NodeExistsDelegateTask("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/mandatory' if node doesn't exist", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/mandatory", null, new BootstrapSingleModuleResource("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/mandatory'", "Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/mandatory'", "dialogs/config.modules.form.dialogs.formNumber.yaml", "formNumber/form/tabs/tabMain/fields/mandatory")), new NodeExistsDelegateTask("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/validation' if node doesn't exist", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/validation", null, new BootstrapSingleModuleResource("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/validation'", "Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/validation'", "dialogs/config.modules.form.dialogs.formNumber.yaml", "formNumber/form/tabs/tabMain/fields/validation")), new NodeExistsDelegateTask("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/maxLength' if node doesn't exist", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/maxLength", null, new BootstrapSingleModuleResource("Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/maxLength'", "Bootstrap '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/maxLength'", "dialogs/config.modules.form.dialogs.formNumber.yaml", "formNumber/form/tabs/tabMain/fields/maxLength")), new HasPropertyDelegateTask("Remove '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/rows'", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/rows", "extends", new RemoveNodeTask("Remove '/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/rows'", "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields/rows")), new SetPropertyTask(RepositoryConstants.CONFIG, "/modules/form/dialogs/formNumber/form/tabs/tabMain/fields", "extends", "override")
.addTask(new BootstrapSingleModuleResource("Bootstrap appLaucnher-layout conf.", "Bootstraping the applauncher-layout config.", "config.modules.ui-admincentral.config.appLauncherLayout.groups.edit.apps.forum.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap apps into forum.", "Bootstrapping the apps into the forum conf.", "apps/config.modules.forum.apps.forum.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap subApp-folder.", "Bootstrapping subApp-folder into forum conf.", "apps/config.modules.forum.apps.forum.subApps.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap subApp browser (rootNode).", "Bootstrapping browser-subApp-rootNode into forum conf.", "apps/config.modules.forum.apps.forum.subApps.browser.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap actionbar for browser-subApp.", "Bootstrapping actionbar for browser-subApp.", "apps/config.modules.forum.apps.forum.subApps.browser.actionbar.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap actions for browser-subApp.", "Bootstrapping action for browser-subApp.", "apps/config.modules.forum.apps.forum.subApps.browser.actions.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap workbench for browser-subApp.", "Bootstrapping workbench for browser-subApp.", "apps/config.modules.forum.apps.forum.subApps.browser.workbench.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap subApp moderation (rootNode).", "Bootstrapping moderation-subApprootNode into forum conf.", "apps/config.modules.forum.apps.forum.subApps.moderation.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap actionbar for moderation-subApp.", "Bootstrapping actionbar for moderation-subApp.", "apps/config.modules.forum.apps.forum.subApps.moderation.actionbar.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap actions for moderation-subApp.", "Bootstrapping action for moderation-subApp.", "apps/config.modules.forum.apps.forum.subApps.moderation.actions.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap workbench for moderation-subApp.", "Bootstrapping workbench for moderation-subApp.", "apps/config.modules.forum.apps.forum.subApps.moderation.workbench.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap dialog addForum.", "Bootstrap dialog addForum.", "dialogs/config.modules.forum.dialogs.forumAdd.xml", ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW)) .addTask(new BootstrapSingleModuleResource("Bootstrap dialog threadNewUIA.", "Bootstrapping dialog threadNewUIA.", "dialogs/config.modules.forum.dialogs.threadNewUIA.xml", ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW)) .addTask(new BootstrapSingleModuleResource("Bootstrap browser sub-app content connector.", "Bootstrapping browser sub-app content connector into forum conf.", "apps/config.modules.forum.apps.forum.subApps.browser.contentConnector.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new BootstrapSingleModuleResource("Bootstrap moderation sub-app content connector.", "Bootstrapping moderation sub-app content connector into forum conf.", "apps/config.modules.forum.apps.forum.subApps.moderation.contentConnector.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW)) .addTask(new ContentAppMigrationTask("/modules/forum")) .addTask(new AppLauncherReorderingTask("forum", "edit", Order.AFTER, "assets"))); .addTask(new SetWritePermissionForActionsTask(FORUM_APP_ACTIONS, new String[] { "addForum", "deleteForum", "lockForum", "unlockForum", "createThread", "confirmDeleteForum", "confirmDeleteThread", "deleteThread", "editThread", "editForum", "editMessage", "confirmDeleteMessage", "deleteMessage", "validateMessage", "invalidateMessage", "lockThread", "unlockThread", "activate", "deactivate" })) .addTask(new BootstrapSingleModuleResource("Bootstrap actions for moderation-subApp.", "Bootstrapping action for moderation-subApp.", "apps/config.modules.forum.apps.forum.subApps.moderation.actions.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW))); .addTask(new PartialBootstrapTask("Bootstrap 'addMessage' action for moderation subApp", "", "/mgnl-bootstrap/forum/apps/config.modules.forum.apps.forum.subApps.moderation.actions.xml", "actions/addMessage")) .addTask(new PartialBootstrapTask("Bootstrap 'addMessage' configuration for editActions group of message in moderation subApp", "", "/mgnl-bootstrap/forum/apps/config.modules.forum.apps.forum.subApps.moderation.actionbar.xml", "actionbar/sections/message/groups/editActions/items/addMessage"))
public MailModuleVersionHandler() { register(DeltaBuilder.update("4.5", "") .addTask(new BootstrapSingleModuleResource("Templates configuration", "Reconfigures the templates configuration.", "config.modules.mail.config.templatesConfiguration.xml"))); new RemovePropertyTask("", "", RepositoryConstants.CONFIG, "/modules/mail/config/factory/renderers/", "velocity"))) .addTask(new RemoveNodeTask("Remove legacy ui page", "Removes old legacy adminInterface page.", RepositoryConstants.CONFIG, "/modules/mail/pages")) .addTask(new BootstrapSingleModuleResource("Bootstrap field types", "Bootstraps new field types used by mail tools app.", "config.modules.mail.fieldTypes.xml")) .addTask(new BootstrapSingleModuleResource("Bootstrap app", "Bootstraps mail app.", "config.modules.mail.apps.xml")) .addTask(new BootstrapSingleModuleResource("Bootstrap simple mail configuration", "Bootstraps simple mail configuration.", "config.modules.mail.config.simpleConfiguration.xml")) .addTask(new BootstrapSingleModuleResource("Bootstrap mail command", "Bootstraps send mail command.", "config.modules.mail.commands.default.sendMail.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)) .addTask(new BootstrapSingleModuleResource("Bootstrap menu item", "Registers mail tools app to app launcher.", "config.modules.ui-admincentral.config.appLauncherLayout.groups.tools.apps.mail.xml")) .addTask(new ConvertAclToAppPermissionTask("Convert permissions for 'sendMail' app", "Convert ACL permissions for old 'sendMail' page to new 'mail' app permission", "/.magnolia/pages/sendMail", "/modules/mail/apps/mail", true)) new BootstrapSingleModuleResource("config.modules.mail.config.smtpConfiguration.xml"), new PropertyExistsDelegateTask("", "/modules/mail/config/smtp/", MailConstants.SMTP_PORT, new MovePropertyTask("", RepositoryConstants.CONFIG, "/modules/mail/config/smtp/smtpPort", "/modules/mail/config/smtpConfiguration/port", true)
"/mgnl-bootstrap/core/config.server.IPConfig.xml"), new BootstrapSingleModuleResource("i18n content", "bootstrap the config", "config.server.i18n.content.xml"), new BootstrapSingleModuleResource("i18n system", "bootstrap the config", "config.server.i18n.system.xml"),
public ActivationModuleVersionHandler() { register(DeltaBuilder.update("5.0.2", "") .addTask(new BootstrapSingleModuleResource("Add new versioned activation command chain", "", "config.modules.activation.commands.versioned.xml"))); register(DeltaBuilder.update("5.1.1", "") .addTask(new IsModuleInstalledOrRegistered("Modify default delete command", "Change default delete command to do deactivation of content from public instance and then remove content from public instance", new RemoveNodeTask("Remove Activation tools from dev group of appLauncher", "", RepositoryConstants.CONFIG, "/modules/ui-admincentral/config/appLauncherLayout/groups/dev/apps/activation")) ), new BootstrapSingleModuleResource("Bootstrap app", "Bootstrap activation apps.", "config.modules.activation.apps.xml") )) );
.addTask(new RemoveNodeTask("Remove PageEditorServlet", "Remove obsolete PageEditorServlet configuration.", RepositoryConstants.CONFIG, "/server/filters/servlets/PageEditorServlet")) .addTask(new RemoveNodeTask("Remove obsolete 'templating-editor' configuration", "", RepositoryConstants.CONFIG, "/modules/magnolia-templating-editor")) .addTask(new BootstrapSingleModuleResource("Bootstrap link transformers", "Bootstrap 'server/rendering/linkManagement/transformers", "config.server.rendering.linkManagement.xml", "/linkManagement/transformers"))); register((DeltaBuilder.update("5.0.1", "")) .addTask(new CheckAndModifyPropertyValueTask("MIMEMapping", "Change xsl extension mime-type from text/xml to application/xml", RepositoryConstants.CONFIG, "/server/MIMEMapping/xsl", "mime-type", "text/xml", "application/xml")) .addTask(new CheckAndModifyPropertyValueTask("MIMEMapping", "Change xml extension mime-type from text/xml to application/xml", RepositoryConstants.CONFIG, "/server/MIMEMapping/xml", "mime-type", "text/xml", "application/xml"))); register((DeltaBuilder.update("5.0.3", "")) .addTask(new BootstrapSingleModuleResource("JSON", "Add JSON mime-type", "config.server.MIMEMapping.xml", "/MIMEMapping/json"))); register((DeltaBuilder.update("5.1", "")) .addTask(new WarnTask("respectOrderDocument parameter", "As of Magnolia 5.1, the respectOrderDocument parameter has been reintroduced in repo config files and set to true by default. You will need to set it manually for each workspace in your installation. Please, refer to the release notes for more details.")) register((DeltaBuilder.update("5.1.2", "")) .addTask(new ChangeNodeTypeOfSubAppsTask("Change primary node type of subapps", "If primary node type of subapps node is set to " + NodeTypes.Content.NAME + " then change it to " + NodeTypes.ContentNode.NAME)) .addTask(new BootstrapSingleModuleResource("Anonymous user", "Change anonymous user permission. He can't have write access to himself.", "users.system.anonymous.xml", "/anonymous/acl_users"))); .addTask(new BootstrapSingleModuleResource("Add mime mapping for .map", "Add mime mapping for .map", "config.server.MIMEMapping.xml", "/MIMEMapping/map"))); .addTasks(getLockableMixinAdditionTasksForAllWorkspaces()) .addTask(new NodeExistsDelegateTask("Add korean language into system languages", "/server/i18n/system/ko", null, new BootstrapSingleModuleResource("", "", "config.server.i18n.system.xml", "/system/languages/ko"))) ); .addTask(new BootstrapSingleModuleResource("Add mime mapping for YAML", "Add mime mapping for YAML", "config.server.MIMEMapping.xml", "/MIMEMapping/x-yaml")) .addTask(new RenameVersionNodesTask(repositoryManager)) ); new RemovePropertyTask("", "/server/filters/csrfTokenSecurity", "enabled")), new ArrayDelegateTask("Add csrfTokenSecurity filter", "", new BootstrapSingleModuleResource("", "", "config.server.filters.xml", "/filters/csrfTokenSecurity"),
.addTask(new BootstrapSingleModuleResource("Rendering Engine", "Add configuration for the new rendering engine.", "config.server.rendering.engine.xml")) );
.addTask(new BootstrapSingleModuleResource("Register the new DataSelectField", "", "config.modules.ui-framework.fieldTypes.dataSelectField.xml")) .addTask(new AddFolderSupportToDataAppsTask("Add folder support for apps", "Adds folder support for hierarchical data types", new String[] { "Contact", "RssAggregator", "category" })));