public static DeltaBuilder startup(ModuleDefinition moduleDef, List<Task> tasks) { final String description = "Tasks executed before starting up module " + moduleDef.getDescription(); return startup(moduleDef.getVersion(), description).addTasks(tasks); }
/** * @see #getBasicInstallTasks(InstallContext) override this method if you need a different set of default install tasks. * @see #getExtraInstallTasks(InstallContext) override this method if you need extra tasks for install. */ protected Delta getInstall(InstallContext installContext) { final List<Task> installTasks = new ArrayList<>(); installTasks.addAll(getBasicInstallTasks(installContext)); installTasks.addAll(getExtraInstallTasks(installContext)); installTasks.add(new ModuleVersionToLatestTask()); final List<Condition> conditions = getInstallConditions(); final Version version = installContext.getCurrentModuleDefinition().getVersion(); return DeltaBuilder.install(version, "").addTasks(installTasks).addConditions(conditions); }
result.add( db( from, version ).addTasks( maintenanceTasks ) );
/** * The minimal delta to be applied for each update, even if no delta was specifically registered * for the version being installed. */ protected Delta getDefaultUpdate(InstallContext installContext) { final Version toVersion = installContext.getCurrentModuleDefinition().getVersion(); final List<Task> defaultUpdateTasks = getDefaultUpdateTasks(toVersion); final List<Condition> defaultUpdateConditions = getDefaultUpdateConditions(toVersion); return DeltaBuilder.update(toVersion, "").addTasks(defaultUpdateTasks).addConditions(defaultUpdateConditions); }
public SamplesVersionHandler() { register(DeltaBuilder.update("5.4.1", "") .addTask(new ArrayDelegateTask("Remove samples configuration from JCR", new NodeExistsDelegateTask("", "/modules/samples/dialogs", new RemoveNodeTask("", "/modules/samples/dialogs")), new NodeExistsDelegateTask("", "/modules/samples/templates", new RemoveNodeTask("", "/modules/samples/templates")), new NodeExistsDelegateTask("", "/modules/samples/virtualURIMapping", new RemoveNodeTask("", "/modules/samples/virtualURIMapping")))) .addTasks(getCommonTasks())); register(DeltaBuilder.update("6.0", "") .addTask(new RemoveNodeTask("Remove JSP sample site", "Magnolia Templating JSP is deprecated as of 6.0.", WEBSITE, "/jsp-sample-site"))); }
.addTasks(getCommonTasks()) );
.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")))