當前位置: 首頁>>代碼示例>>Java>>正文


Java DeltaBuilder類代碼示例

本文整理匯總了Java中info.magnolia.module.delta.DeltaBuilder的典型用法代碼示例。如果您正苦於以下問題:Java DeltaBuilder類的具體用法?Java DeltaBuilder怎麽用?Java DeltaBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DeltaBuilder類屬於info.magnolia.module.delta包,在下文中一共展示了DeltaBuilder類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: VanityUrlModuleVersionHandler

import info.magnolia.module.delta.DeltaBuilder; //導入依賴的package包/類
public VanityUrlModuleVersionHandler() {
    DeltaBuilder update131 = update("1.3.1", "Update to version 1.3.1");
    update131.addTask(new BootstrapConditionally("Bootstrap new config", "Bootstrap new public url service configuration.", "/mgnl-bootstrap/magnolia-vanity-url/config.modules.magnolia-vanity-url.config.publicUrlService.xml"));
    register(update131);

    DeltaBuilder update133 = update("1.3.3", "Update to version 1.3.3");
    update133.addTask(new BootstrapSingleModuleResource("Bootstrap new config", "Bootstrap folder/type definition in app.", "config.modules.magnolia-vanity-url.apps.vanityUrl.xml"));
    register(update133);

    DeltaBuilder update141 = update("1.4.1", "Update to version 1.4.1");
    update141.addTask(new BootstrapSingleModuleResource("Bootstrap new config", "Bootstrap folder/type definition in app.", "config.modules.magnolia-vanity-url.apps.vanityUrl.xml"));
    register(update141);

    DeltaBuilder update142 = update("1.4.2", "Update to version 1.4.2");
    update142.addTask(new BootstrapSingleModuleResource("Bootstrap new config", "Bootstrap new forward type definition in app dialog.", "config.modules.magnolia-vanity-url.apps.vanityUrl.xml"));
    register(update142);

    DeltaBuilder update150 = DeltaBuilder.update("1.5.0", "Update to version 1.5.0");
    update150.addTask(new BootstrapSingleModuleResource("Bootstrap new config", "Bootstrap new validation in app dialog.", "config.modules.magnolia-vanity-url.apps.vanityUrl.xml"));
    register(update150);
}
 
開發者ID:aperto,項目名稱:magnolia-vanity-url,代碼行數:22,代碼來源:VanityUrlModuleVersionHandler.java

示例2: NewsModuleVersionHandler

import info.magnolia.module.delta.DeltaBuilder; //導入依賴的package包/類
/**
 * Constructor.
 * Here you can register deltas for tasks that need to be run when UPDATING an EXISTING module.
 */
public NewsModuleVersionHandler() {
    register(DeltaBuilder.update("1.1.1", "Add a userrole news-editor")
            .addTask(new BootstrapSingleResource("Userrole config", "Installing a userrole for the news module",
                    "/mgnl-bootstrap/magnolia-news-module/userroles/userroles.news-editor.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING)));

    register(DeltaBuilder.update("1.1.4", "Upgrading news module to Magnolia 5.5")
            .addTask(new RemoveNodeTask("Remove old nodes", "/modules/" + MODULE_NAME + "/apps"))
            .addTask(new RemoveNodeTask("Remove old nodes", "/modules/" + MODULE_NAME + "/dialogs"))
    );

    register(DeltaBuilder.update("1.1.6", "Un-nesting news items")
            .addTask(new FindAndMoveNestedNewsTask())
    );
}
 
開發者ID:tricode,項目名稱:magnolia-news,代碼行數:19,代碼來源:NewsModuleVersionHandler.java

示例3: BlogsModuleVersionHandler

import info.magnolia.module.delta.DeltaBuilder; //導入依賴的package包/類
/**
 * Constructor.
 * Here you can register deltas for tasks that need to be run when UPDATING an EXISTING module.
 */
public BlogsModuleVersionHandler() {
    register(DeltaBuilder.update("1.1.1", "Add a userrole blog-editor")
            .addTask(new BootstrapSingleModuleResource("Userrole config", "Installing a userrole for the blog module",
                    "/userroles/userroles.blog-editor.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))
    );

    register(DeltaBuilder.update("1.1.2", "Updating blog module")
            .addTask(new BootstrapSingleModuleResource("Rendering config", "Installing new freemarker context attributes for blogfn alias",
                    "/config/config.modules.rendering.renderers.freemarker.contextAttributes.blogfn.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))
    );

    register(DeltaBuilder.update("1.1.3", "Updating blog module")
            .addTask(new BootstrapSingleResource("Update config", "Fix dialog setting on edit blog folder",
                    "/mgnl-bootstrap/updates/config.modules.magnolia-blogs-module.apps.tricode-blogs.subApps.browser.actions.editFolder.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))
            .addTask(new BootstrapSingleResource("Update config", "Add new action for editing initial activation date",
                    "/mgnl-bootstrap/updates/config.modules.magnolia-blogs-module.apps.tricode-blogs.subApps.browser.actions.editActivationDate.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))
            .addTask(new BootstrapSingleResource("Update config", "Add new edit activation date action to action bar",
                    "/mgnl-bootstrap/updates/config.modules.magnolia-blogs-module.apps.tricode-blogs.subApps.browser.actionbar.sections.blog.groups.activationActions.items.editActivationDate.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))
    );

    register(DeltaBuilder.update("1.1.5", "Upgrading blog module to Magnolia 5.5")
            .addTask(new RemoveNodeTask("Remove old nodes", "/modules/" + MODULE_NAME + "/apps"))
            .addTask(new RemoveNodeTask("Remove old nodes", "/modules/" + MODULE_NAME + "/dialogs"))
    );

    register(DeltaBuilder.update("1.1.8", "Add publish date to blogs")
            .addTask(new BootstrapSingleModuleResource("Update config", "Add new CurrentDateField definition",
                    "/config/config.modules.ui-framework.fieldTypes.currentDateField.xml", ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))
    );
}
 
開發者ID:tricode,項目名稱:magnolia-blog,代碼行數:35,代碼來源:BlogsModuleVersionHandler.java


注:本文中的info.magnolia.module.delta.DeltaBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。