Example usage for com.liferay.portal.kernel.util PortletKeys ALERTS

List of usage examples for com.liferay.portal.kernel.util PortletKeys ALERTS

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PortletKeys ALERTS.

Prototype

String ALERTS

To view the source code for com.liferay.portal.kernel.util PortletKeys ALERTS.

Click Source Link

Usage

From source file:com.liferay.announcements.web.internal.upgrade.AnnouncementsWebUpgrade.java

License:Open Source License

@Override
public void register(Registry registry) {
    BaseUpgradeWebModuleRelease upgradeWebModuleRelease = new BaseUpgradeWebModuleRelease() {

        @Override/* ww w . j a v a2  s .  com*/
        protected String getBundleSymbolicName() {
            return "com.liferay.announcements.web";
        }

        @Override
        protected String[] getPortletIds() {
            return new String[] { "1_WAR_soannouncementsportlet", "83", "84" };
        }

    };

    try {
        upgradeWebModuleRelease.upgrade();
    } catch (UpgradeException ue) {
        throw new RuntimeException(ue);
    }

    registry.register("com.liferay.announcements.web", "0.0.0", "1.0.3", new DummyUpgradeStep());

    UpgradeStep upgradePortletId = new BaseReplacePortletId() {

        @Override
        protected String[][] getRenamePortletIdsArray() {
            return new String[][] { new String[] { "1_WAR_soannouncementsportlet", PortletKeys.ANNOUNCEMENTS },
                    new String[] { "83", PortletKeys.ALERTS },
                    new String[] { "84", PortletKeys.ANNOUNCEMENTS } };
        }

    };

    registry.register("com.liferay.announcements.web", "0.0.1", "1.0.1", upgradePortletId);

    // See LPS-65946

    registry.register("com.liferay.announcements.web", "1.0.0", "1.0.1", upgradePortletId);

    registry.register("com.liferay.announcements.web", "1.0.1", "1.0.2", new UpgradePermission(true));

    // See LPS-69656

    registry.register("com.liferay.announcements.web", "1.0.2", "1.0.3", upgradePortletId,
            new UpgradePermission(true));
}