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.kernel.search.background.task;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
020    import com.liferay.portal.kernel.util.ProxyFactory;
021    
022    /**
023     * @author Andrew Betts
024     */
025    @ProviderType
026    public class ReindexStatusMessageSenderUtil {
027    
028            public static ReindexStatusMessageSender
029                    getReindexStatusMessageSender() {
030    
031                    PortalRuntimePermission.checkGetBeanProperty(
032                            ReindexStatusMessageSenderUtil.class);
033    
034                    return _reindexStatusMessageSender;
035            }
036    
037            public static void sendStatusMessage(
038                    String className, long count, long total) {
039    
040                    getReindexStatusMessageSender().sendStatusMessage(
041                            className, count, total);
042            }
043    
044            public static void sendStatusMessage(
045                    String phase, long companyId, long[] companyIds) {
046    
047                    getReindexStatusMessageSender().sendStatusMessage(
048                            phase, companyId, companyIds);
049            }
050    
051            private static final ReindexStatusMessageSender
052                    _reindexStatusMessageSender = ProxyFactory.newServiceTrackedInstance(
053                            ReindexStatusMessageSender.class);
054    
055    }