001    /**
002     * Copyright (c) 2000-2012 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 isUpgraded() {
035                    return getStartupHelper().isUpgraded();
036            }
037    
038            public static boolean isVerified() {
039                    return getStartupHelper().isVerified();
040            }
041    
042            public static void setDropIndexes(boolean dropIndexes) {
043                    getStartupHelper().setDropIndexes(dropIndexes);
044            }
045    
046            public static void updateIndexes() {
047                    getStartupHelper().updateIndexes();
048            }
049    
050            public static void updateIndexes(boolean dropIndexes) {
051                    getStartupHelper().updateIndexes(dropIndexes);
052            }
053    
054            public static void updateIndexes(
055                    DB db, Connection connection, boolean dropIndexes) {
056    
057                    getStartupHelper().updateIndexes(db, connection, dropIndexes);
058            }
059    
060            public static void upgradeProcess(int buildNumber) throws UpgradeException {
061                    getStartupHelper().upgradeProcess(buildNumber);
062            }
063    
064            public static void verifyProcess(boolean verified) throws VerifyException {
065                    getStartupHelper().verifyProcess(verified);
066            }
067    
068            public void setStartupHelper(StartupHelper startupHelper) {
069                    _startupHelper = startupHelper;
070            }
071    
072            private static StartupHelper _startupHelper;
073    
074    }