001    /**
002     * Copyright (c) 2000-2013 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.v5_1_7_to_5_2_7.UpgradeDuplicates;
020    import com.liferay.portal.upgrade.v5_1_7_to_5_2_7.UpgradeSchema;
021    import com.liferay.portal.upgrade.v5_1_7_to_5_2_7.UpgradeSocial;
022    import com.liferay.portal.upgrade.v5_2_0.UpgradeExpando;
023    import com.liferay.portal.upgrade.v5_2_0.UpgradeJournal;
024    import com.liferay.portal.upgrade.v5_2_0.UpgradeOrganization;
025    import com.liferay.portal.upgrade.v5_2_0.UpgradePortletId;
026    import com.liferay.portal.upgrade.v5_2_0.UpgradePortletPermissions;
027    import com.liferay.portal.upgrade.v5_2_0.UpgradeTags;
028    import com.liferay.portal.upgrade.v5_2_2.UpgradeWebForm;
029    import com.liferay.portal.upgrade.v5_2_6.UpgradeGroup;
030    import com.liferay.portal.upgrade.v5_2_6.UpgradeNestedPortlets;
031    
032    /**
033     * @author Bijan Vakili
034     * @author Douglas Wong
035     */
036    public class UpgradeProcess_5_1_7_to_5_2_7 extends UpgradeProcess {
037    
038            @Override
039            public int getThreshold() {
040                    return ReleaseInfo.RELEASE_5_2_7_BUILD_NUMBER;
041            }
042    
043            @Override
044            protected void doUpgrade() throws Exception {
045                    upgrade(UpgradeSchema.class);
046    
047                    // 5.1.2 to 5.2.0
048    
049                    upgrade(UpgradeExpando.class);
050                    upgrade(UpgradeJournal.class);
051                    upgrade(UpgradeOrganization.class);
052                    upgrade(UpgradePortletId.class);
053                    upgrade(UpgradePortletPermissions.class);
054                    upgrade(UpgradeTags.class);
055    
056                    // 5.2.1 to 5.2.2
057    
058                    upgrade(UpgradeWebForm.class);
059    
060                    // 5.2.2 to 5.2.3
061    
062                    upgrade(UpgradeDuplicates.class);
063    
064                    // 5.2.4 to 5.2.5
065    
066                    upgrade(UpgradeSocial.class);
067    
068                    // 5.2.5 to 5.2.6
069    
070                    upgrade(UpgradeGroup.class);
071                    upgrade(UpgradeNestedPortlets.class);
072            }
073    
074    }