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.portlet.messageboards.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for MBThread. This utility wraps
024     * {@link com.liferay.portlet.messageboards.service.impl.MBThreadServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see MBThreadService
032     * @see com.liferay.portlet.messageboards.service.base.MBThreadServiceBaseImpl
033     * @see com.liferay.portlet.messageboards.service.impl.MBThreadServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class MBThreadServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.messageboards.service.impl.MBThreadServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static void deleteThread(long threadId)
044                    throws com.liferay.portal.kernel.exception.PortalException {
045                    getService().deleteThread(threadId);
046            }
047    
048            /**
049            * Returns the Spring bean ID for this bean.
050            *
051            * @return the Spring bean ID for this bean
052            */
053            public static java.lang.String getBeanIdentifier() {
054                    return getService().getBeanIdentifier();
055            }
056    
057            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
058                    long groupId, long userId, java.util.Date modifiedDate, int status,
059                    int start, int end)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService()
062                                       .getGroupThreads(groupId, userId, modifiedDate, status,
063                            start, end);
064            }
065    
066            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
067                    long groupId, long userId, int status, int start, int end)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    return getService().getGroupThreads(groupId, userId, status, start, end);
070            }
071    
072            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
073                    long groupId, long userId, int status, boolean subscribed,
074                    boolean includeAnonymous, int start, int end)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    return getService()
077                                       .getGroupThreads(groupId, userId, status, subscribed,
078                            includeAnonymous, start, end);
079            }
080    
081            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
082                    long groupId, long userId, int status, boolean subscribed, int start,
083                    int end) throws com.liferay.portal.kernel.exception.PortalException {
084                    return getService()
085                                       .getGroupThreads(groupId, userId, status, subscribed, start,
086                            end);
087            }
088    
089            public static int getGroupThreadsCount(long groupId, long userId,
090                    java.util.Date modifiedDate, int status) {
091                    return getService()
092                                       .getGroupThreadsCount(groupId, userId, modifiedDate, status);
093            }
094    
095            public static int getGroupThreadsCount(long groupId, long userId, int status) {
096                    return getService().getGroupThreadsCount(groupId, userId, status);
097            }
098    
099            public static int getGroupThreadsCount(long groupId, long userId,
100                    int status, boolean subscribed) {
101                    return getService()
102                                       .getGroupThreadsCount(groupId, userId, status, subscribed);
103            }
104    
105            public static int getGroupThreadsCount(long groupId, long userId,
106                    int status, boolean subscribed, boolean includeAnonymous) {
107                    return getService()
108                                       .getGroupThreadsCount(groupId, userId, status, subscribed,
109                            includeAnonymous);
110            }
111    
112            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
113                    long groupId, long categoryId, int status, int start, int end) {
114                    return getService().getThreads(groupId, categoryId, status, start, end);
115            }
116    
117            public static int getThreadsCount(long groupId, long categoryId, int status) {
118                    return getService().getThreadsCount(groupId, categoryId, status);
119            }
120    
121            public static com.liferay.portal.kernel.lock.Lock lockThread(long threadId)
122                    throws com.liferay.portal.kernel.exception.PortalException {
123                    return getService().lockThread(threadId);
124            }
125    
126            public static com.liferay.portlet.messageboards.model.MBThread moveThread(
127                    long categoryId, long threadId)
128                    throws com.liferay.portal.kernel.exception.PortalException {
129                    return getService().moveThread(categoryId, threadId);
130            }
131    
132            public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
133                    long categoryId, long threadId)
134                    throws com.liferay.portal.kernel.exception.PortalException {
135                    return getService().moveThreadFromTrash(categoryId, threadId);
136            }
137    
138            public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
139                    long threadId)
140                    throws com.liferay.portal.kernel.exception.PortalException {
141                    return getService().moveThreadToTrash(threadId);
142            }
143    
144            public static void restoreThreadFromTrash(long threadId)
145                    throws com.liferay.portal.kernel.exception.PortalException {
146                    getService().restoreThreadFromTrash(threadId);
147            }
148    
149            public static com.liferay.portal.kernel.search.Hits search(long groupId,
150                    long creatorUserId, long startDate, long endDate, int status,
151                    int start, int end)
152                    throws com.liferay.portal.kernel.exception.PortalException {
153                    return getService()
154                                       .search(groupId, creatorUserId, startDate, endDate, status,
155                            start, end);
156            }
157    
158            public static com.liferay.portal.kernel.search.Hits search(long groupId,
159                    long creatorUserId, int status, int start, int end)
160                    throws com.liferay.portal.kernel.exception.PortalException {
161                    return getService().search(groupId, creatorUserId, status, start, end);
162            }
163    
164            /**
165            * Sets the Spring bean ID for this bean.
166            *
167            * @param beanIdentifier the Spring bean ID for this bean
168            */
169            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
170                    getService().setBeanIdentifier(beanIdentifier);
171            }
172    
173            public static com.liferay.portlet.messageboards.model.MBThread splitThread(
174                    long messageId, java.lang.String subject,
175                    com.liferay.portal.service.ServiceContext serviceContext)
176                    throws com.liferay.portal.kernel.exception.PortalException {
177                    return getService().splitThread(messageId, subject, serviceContext);
178            }
179    
180            public static void unlockThread(long threadId)
181                    throws com.liferay.portal.kernel.exception.PortalException {
182                    getService().unlockThread(threadId);
183            }
184    
185            public static MBThreadService getService() {
186                    if (_service == null) {
187                            _service = (MBThreadService)PortalBeanLocatorUtil.locate(MBThreadService.class.getName());
188    
189                            ReferenceRegistry.registerReference(MBThreadServiceUtil.class,
190                                    "_service");
191                    }
192    
193                    return _service;
194            }
195    
196            /**
197             * @deprecated As of 6.2.0
198             */
199            @Deprecated
200            public void setService(MBThreadService service) {
201            }
202    
203            private static MBThreadService _service;
204    }