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.portlet.messageboards.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * The utility for the message boards thread remote service. This utility wraps {@link com.liferay.portlet.messageboards.service.impl.MBThreadServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * 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.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
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    public class MBThreadServiceUtil {
037            public static void deleteThread(long threadId)
038                    throws com.liferay.portal.kernel.exception.PortalException,
039                            com.liferay.portal.kernel.exception.SystemException {
040                    getService().deleteThread(threadId);
041            }
042    
043            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
044                    long groupId, long userId, int status, boolean subscribed,
045                    boolean includeAnonymous, int start, int end)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    return getService()
049                                       .getGroupThreads(groupId, userId, status, subscribed,
050                            includeAnonymous, start, end);
051            }
052    
053            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
054                    long groupId, long userId, int status, boolean subscribed, int start,
055                    int end)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    return getService()
059                                       .getGroupThreads(groupId, userId, status, subscribed, start,
060                            end);
061            }
062    
063            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
064                    long groupId, long userId, int status, int start, int end)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService().getGroupThreads(groupId, userId, status, start, end);
068            }
069    
070            public static int getGroupThreadsCount(long groupId, long userId, int status)
071                    throws com.liferay.portal.kernel.exception.SystemException {
072                    return getService().getGroupThreadsCount(groupId, userId, status);
073            }
074    
075            public static int getGroupThreadsCount(long groupId, long userId,
076                    int status, boolean subscribed)
077                    throws com.liferay.portal.kernel.exception.SystemException {
078                    return getService()
079                                       .getGroupThreadsCount(groupId, userId, status, subscribed);
080            }
081    
082            public static int getGroupThreadsCount(long groupId, long userId,
083                    int status, boolean subscribed, boolean includeAnonymous)
084                    throws com.liferay.portal.kernel.exception.SystemException {
085                    return getService()
086                                       .getGroupThreadsCount(groupId, userId, status, subscribed,
087                            includeAnonymous);
088            }
089    
090            public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
091                    long groupId, long categoryId, int status, int start, int end)
092                    throws com.liferay.portal.kernel.exception.SystemException {
093                    return getService().getThreads(groupId, categoryId, status, start, end);
094            }
095    
096            public static int getThreadsCount(long groupId, long categoryId, int status)
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getThreadsCount(groupId, categoryId, status);
099            }
100    
101            public static com.liferay.portal.model.Lock lockThread(long threadId)
102                    throws com.liferay.portal.kernel.exception.PortalException,
103                            com.liferay.portal.kernel.exception.SystemException {
104                    return getService().lockThread(threadId);
105            }
106    
107            public static com.liferay.portlet.messageboards.model.MBThread moveThread(
108                    long categoryId, long threadId)
109                    throws com.liferay.portal.kernel.exception.PortalException,
110                            com.liferay.portal.kernel.exception.SystemException {
111                    return getService().moveThread(categoryId, threadId);
112            }
113    
114            public static com.liferay.portlet.messageboards.model.MBThread splitThread(
115                    long messageId, com.liferay.portal.service.ServiceContext serviceContext)
116                    throws com.liferay.portal.kernel.exception.PortalException,
117                            com.liferay.portal.kernel.exception.SystemException {
118                    return getService().splitThread(messageId, serviceContext);
119            }
120    
121            public static void unlockThread(long threadId)
122                    throws com.liferay.portal.kernel.exception.PortalException,
123                            com.liferay.portal.kernel.exception.SystemException {
124                    getService().unlockThread(threadId);
125            }
126    
127            public static MBThreadService getService() {
128                    if (_service == null) {
129                            _service = (MBThreadService)PortalBeanLocatorUtil.locate(MBThreadService.class.getName());
130                    }
131    
132                    return _service;
133            }
134    
135            public void setService(MBThreadService service) {
136                    _service = service;
137            }
138    
139            private static MBThreadService _service;
140    }