@Override public void execute(InstallContext ctx) throws TaskExecutionException { super.execute(ctx); if (info) { ctx.info("Stored a backup of node " + workspace + ":" + path + " in " + backupPath + "."); } }
/** * Creates the mappings node and delegates to the super {@link #doExecute(InstallContext)} method. */ @Override protected void doExecute(InstallContext ctx) throws RepositoryException, TaskExecutionException { final Content parentNode = getParentNode(ctx); super.doExecute(ctx); parentNode.createContent("mappings"); NodeDataUtil.getOrCreate(parentNode, "class").setValue(info.magnolia.cms.beans.config.URI2RepositoryManager.class.getName()); subTasks.execute(ctx); }
@Override public void execute(InstallContext installContext) throws TaskExecutionException { final ModuleDefinition moduleDefinition = installContext.getCurrentModuleDefinition(); // register servlets for (ServletDefinition servletDefinition : moduleDefinition.getServlets()) { addTask(new RegisterServletTask(servletDefinition)); } super.execute(installContext); } }
@Override public void execute(InstallContext ctx) throws TaskExecutionException { try { final ModuleDefinition def = ctx.getCurrentModuleDefinition(); // register repositories for (RepositoryDefinition repDef : def.getRepositories()) { for (final String workspace : repDef.getWorkspaces()) { ArrayDelegateTask arrayDelegateTask = new ArrayDelegateTask(String.format("Bootstrap the %s if empty, grant it to superuser and subscribe it if activation is installed so that activation can be used.", workspace), new InitializeWorkspaceTask("", "", workspace), new AddPermissionTask("", "superuser", workspace, "/*", Permission.ALL, false), new SubscribeWorkspaceTask(workspace)); arrayDelegateTask.execute(ctx); } } } catch (Throwable e) { throw new TaskExecutionException("Could not bootstrap workspace: " + e.getMessage(), e); } }