001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.upgrade;
016    
017    import com.liferay.portal.kernel.upgrade.UpgradeProcess;
018    import com.liferay.portal.kernel.util.ReleaseInfo;
019    import com.liferay.portal.upgrade.v7_0_0.UpgradeAdminPortlets;
020    import com.liferay.portal.upgrade.v7_0_0.UpgradeAsset;
021    import com.liferay.portal.upgrade.v7_0_0.UpgradeBackgroundTask;
022    import com.liferay.portal.upgrade.v7_0_0.UpgradeBookmarksPreferences;
023    import com.liferay.portal.upgrade.v7_0_0.UpgradeCalEvent;
024    import com.liferay.portal.upgrade.v7_0_0.UpgradeDLPreferences;
025    import com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary;
026    import com.liferay.portal.upgrade.v7_0_0.UpgradeDynamicDataMapping;
027    import com.liferay.portal.upgrade.v7_0_0.UpgradeEmailNotificationPreferences;
028    import com.liferay.portal.upgrade.v7_0_0.UpgradeExpando;
029    import com.liferay.portal.upgrade.v7_0_0.UpgradeJournal;
030    import com.liferay.portal.upgrade.v7_0_0.UpgradeJournalDisplayPreferences;
031    import com.liferay.portal.upgrade.v7_0_0.UpgradeLanguagePreferences;
032    import com.liferay.portal.upgrade.v7_0_0.UpgradeLock;
033    import com.liferay.portal.upgrade.v7_0_0.UpgradeMessageBoards;
034    import com.liferay.portal.upgrade.v7_0_0.UpgradePortletSettings;
035    import com.liferay.portal.upgrade.v7_0_0.UpgradeRepositoryEntry;
036    import com.liferay.portal.upgrade.v7_0_0.UpgradeSchema;
037    import com.liferay.portal.upgrade.v7_0_0.UpgradeShopping;
038    import com.liferay.portal.upgrade.v7_0_0.UpgradeShoppingPreferences;
039    import com.liferay.portal.upgrade.v7_0_0.UpgradeSubscription;
040    import com.liferay.portal.upgrade.v7_0_0.UpgradeWiki;
041    
042    /**
043     * @author Julio Camarero
044     */
045    public class UpgradeProcess_7_0_0 extends UpgradeProcess {
046    
047            @Override
048            public int getThreshold() {
049                    return ReleaseInfo.RELEASE_7_0_0_BUILD_NUMBER;
050            }
051    
052            @Override
053            protected void doUpgrade() throws Exception {
054                    upgrade(UpgradeSchema.class);
055                    upgrade(UpgradeAdminPortlets.class);
056                    upgrade(UpgradeAsset.class);
057                    upgrade(UpgradeBackgroundTask.class);
058                    upgrade(UpgradeBookmarksPreferences.class);
059                    upgrade(UpgradeCalEvent.class);
060                    upgrade(UpgradeDLPreferences.class);
061                    upgrade(UpgradeDocumentLibrary.class);
062                    upgrade(UpgradeDynamicDataMapping.class);
063                    upgrade(UpgradeEmailNotificationPreferences.class);
064                    upgrade(UpgradeExpando.class);
065                    upgrade(UpgradeLanguagePreferences.class);
066                    upgrade(UpgradeJournal.class);
067                    upgrade(UpgradeJournalDisplayPreferences.class);
068                    upgrade(UpgradeLock.class);
069                    upgrade(UpgradeMessageBoards.class);
070                    upgrade(UpgradeRepositoryEntry.class);
071                    upgrade(UpgradeShopping.class);
072                    upgrade(UpgradeShoppingPreferences.class);
073                    upgrade(UpgradeSubscription.class);
074                    upgrade(UpgradeWiki.class);
075    
076                    // This must be the last upgrade process. Otherwise, upgrades based on
077                    // BaseUpgradePortletPreferences will fail because the portlet
078                    // preferences will be in the new settings format.
079    
080                    upgrade(UpgradePortletSettings.class);
081            }
082    
083    }