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.events;
016    
017    import com.liferay.portal.kernel.dao.db.DB;
018    import com.liferay.portal.kernel.upgrade.UpgradeException;
019    import com.liferay.portal.verify.VerifyException;
020    
021    import java.sql.Connection;
022    
023    /**
024     * @author Brian Wing Shun Chan
025     * @author Alexander Chow
026     * @author Raymond Aug??
027     */
028    public class StartupHelperUtil {
029    
030            public static StartupHelper getStartupHelper() {
031                    return _startupHelper;
032            }
033    
034            public static boolean isStartupFinished() {
035                    return getStartupHelper().isStartupFinished();
036            }
037    
038            public static boolean isUpgraded() {
039                    return getStartupHelper().isUpgraded();
040            }
041    
042            public static boolean isUpgrading() {
043                    return getStartupHelper().isUpgrading();
044            }
045    
046            public static boolean isVerified() {
047                    return getStartupHelper().isVerified();
048            }
049    
050            public static void setDropIndexes(boolean dropIndexes) {
051                    getStartupHelper().setDropIndexes(dropIndexes);
052            }
053    
054            public static void setStartupFinished(boolean startupFinished) {
055                    getStartupHelper().setStartupFinished(startupFinished);
056            }
057    
058            public static void updateIndexes() {
059                    getStartupHelper().updateIndexes();
060            }
061    
062            public static void updateIndexes(boolean dropIndexes) {
063                    getStartupHelper().updateIndexes(dropIndexes);
064            }
065    
066            public static void updateIndexes(
067                    DB db, Connection connection, boolean dropIndexes) {
068    
069                    getStartupHelper().updateIndexes(db, connection, dropIndexes);
070            }
071    
072            public static void upgradeProcess(int buildNumber) throws UpgradeException {
073                    getStartupHelper().upgradeProcess(buildNumber);
074            }
075    
076            public static void verifyProcess(boolean newBuildNumber, boolean verified)
077                    throws VerifyException {
078    
079                    getStartupHelper().verifyProcess(newBuildNumber, verified);
080            }
081    
082            public void setStartupHelper(StartupHelper startupHelper) {
083                    _startupHelper = startupHelper;
084            }
085    
086            private static StartupHelper _startupHelper;
087    
088    }