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.UpgradeSocial;
021    import com.liferay.portal.upgrade.v5_1_8_to_5_2_8.UpgradeSchema;
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_8.UpgradeDocumentLibrary;
031    
032    /**
033     * @author Douglas Wong
034     */
035    public class UpgradeProcess_5_1_8_to_5_2_8 extends UpgradeProcess {
036    
037            @Override
038            public int getThreshold() {
039                    return ReleaseInfo.RELEASE_5_2_8_BUILD_NUMBER;
040            }
041    
042            @Override
043            protected void doUpgrade() throws Exception {
044                    upgrade(UpgradeSchema.class);
045    
046                    // 5.1.2 to 5.2.0
047    
048                    upgrade(UpgradeExpando.class);
049                    upgrade(UpgradeJournal.class);
050                    upgrade(UpgradeOrganization.class);
051                    upgrade(UpgradePortletId.class);
052                    upgrade(UpgradePortletPermissions.class);
053                    upgrade(UpgradeTags.class);
054    
055                    // 5.2.1 to 5.2.2
056    
057                    upgrade(UpgradeWebForm.class);
058    
059                    // 5.2.2 to 5.2.3
060    
061                    upgrade(UpgradeDuplicates.class);
062    
063                    // 5.2.4 to 5.2.5
064    
065                    upgrade(UpgradeSocial.class);
066    
067                    // 5.2.5 to 5.2.6
068    
069                    upgrade(UpgradeGroup.class);
070    
071                    // 5.2.7 to 5.2.8
072    
073                    upgrade(UpgradeDocumentLibrary.class);
074            }
075    
076    }