001    /**
002     * Copyright (c) 2000-2010 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.upgrade.UpgradeException;
018    import com.liferay.portal.verify.VerifyException;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     * @author Alexander Chow
023     * @author Raymond Augé
024     */
025    public class StartupHelperUtil {
026    
027            public static StartupHelper getStartupHelper() {
028                    return _startupHelper;
029            }
030    
031            public static void setDropIndexes(boolean dropIndexes) {
032                    getStartupHelper().setDropIndexes(dropIndexes);
033            }
034    
035            public static void updateIndexes() {
036                    getStartupHelper().updateIndexes();
037            }
038    
039            public static void upgradeProcess(int buildNumber) throws UpgradeException {
040                    getStartupHelper().upgradeProcess(buildNumber);
041            }
042    
043            public static void verifyProcess(boolean verified) throws VerifyException {
044                    getStartupHelper().verifyProcess(verified);
045            }
046    
047            public static boolean isUpgraded() {
048                    return getStartupHelper().isUpgraded();
049            }
050    
051            public static boolean isVerified() {
052                    return getStartupHelper().isVerified();
053            }
054    
055            public void setStartupHelper(StartupHelper startupHelper) {
056                    _startupHelper = startupHelper;
057            }
058    
059            private static StartupHelper _startupHelper;
060    
061    }