001    /**
002     * Copyright (c) 2000-2013 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.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    
020    import com.liferay.portlet.messageboards.service.MBThreadServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * <p>
026     * This class provides a SOAP utility for the
027     * {@link com.liferay.portlet.messageboards.service.MBThreadServiceUtil} service utility. The
028     * static methods of this class calls the same methods of the service utility.
029     * However, the signatures are different because it is difficult for SOAP to
030     * support certain types.
031     * </p>
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portlet.messageboards.model.MBThreadSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portlet.messageboards.model.MBThread}, that is translated to a
039     * {@link com.liferay.portlet.messageboards.model.MBThreadSoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at
052     * http://localhost:8080/api/secure/axis. Set the property
053     * <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
054     * security.
055     * </p>
056     *
057     * <p>
058     * The SOAP utility is only generated for remote services.
059     * </p>
060     *
061     * @author    Brian Wing Shun Chan
062     * @see       MBThreadServiceHttp
063     * @see       com.liferay.portlet.messageboards.model.MBThreadSoap
064     * @see       com.liferay.portlet.messageboards.service.MBThreadServiceUtil
065     * @generated
066     */
067    public class MBThreadServiceSoap {
068            public static void deleteThread(long threadId) throws RemoteException {
069                    try {
070                            MBThreadServiceUtil.deleteThread(threadId);
071                    }
072                    catch (Exception e) {
073                            _log.error(e, e);
074    
075                            throw new RemoteException(e.getMessage());
076                    }
077            }
078    
079            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
080                    long groupId, long userId, java.util.Date modifiedDate, int status,
081                    int start, int end) throws RemoteException {
082                    try {
083                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
084                                    MBThreadServiceUtil.getGroupThreads(groupId, userId,
085                                            modifiedDate, status, start, end);
086    
087                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
088                    }
089                    catch (Exception e) {
090                            _log.error(e, e);
091    
092                            throw new RemoteException(e.getMessage());
093                    }
094            }
095    
096            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
097                    long groupId, long userId, int status, boolean subscribed,
098                    boolean includeAnonymous, int start, int end) throws RemoteException {
099                    try {
100                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
101                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
102                                            subscribed, includeAnonymous, start, end);
103    
104                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
105                    }
106                    catch (Exception e) {
107                            _log.error(e, e);
108    
109                            throw new RemoteException(e.getMessage());
110                    }
111            }
112    
113            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
114                    long groupId, long userId, int status, boolean subscribed, int start,
115                    int end) throws RemoteException {
116                    try {
117                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
118                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
119                                            subscribed, start, end);
120    
121                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
122                    }
123                    catch (Exception e) {
124                            _log.error(e, e);
125    
126                            throw new RemoteException(e.getMessage());
127                    }
128            }
129    
130            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
131                    long groupId, long userId, int status, int start, int end)
132                    throws RemoteException {
133                    try {
134                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
135                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
136                                            start, end);
137    
138                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
139                    }
140                    catch (Exception e) {
141                            _log.error(e, e);
142    
143                            throw new RemoteException(e.getMessage());
144                    }
145            }
146    
147            public static int getGroupThreadsCount(long groupId, long userId,
148                    java.util.Date modifiedDate, int status) throws RemoteException {
149                    try {
150                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
151                                            userId, modifiedDate, status);
152    
153                            return returnValue;
154                    }
155                    catch (Exception e) {
156                            _log.error(e, e);
157    
158                            throw new RemoteException(e.getMessage());
159                    }
160            }
161    
162            public static int getGroupThreadsCount(long groupId, long userId, int status)
163                    throws RemoteException {
164                    try {
165                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
166                                            userId, status);
167    
168                            return returnValue;
169                    }
170                    catch (Exception e) {
171                            _log.error(e, e);
172    
173                            throw new RemoteException(e.getMessage());
174                    }
175            }
176    
177            public static int getGroupThreadsCount(long groupId, long userId,
178                    int status, boolean subscribed) throws RemoteException {
179                    try {
180                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
181                                            userId, status, subscribed);
182    
183                            return returnValue;
184                    }
185                    catch (Exception e) {
186                            _log.error(e, e);
187    
188                            throw new RemoteException(e.getMessage());
189                    }
190            }
191    
192            public static int getGroupThreadsCount(long groupId, long userId,
193                    int status, boolean subscribed, boolean includeAnonymous)
194                    throws RemoteException {
195                    try {
196                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
197                                            userId, status, subscribed, includeAnonymous);
198    
199                            return returnValue;
200                    }
201                    catch (Exception e) {
202                            _log.error(e, e);
203    
204                            throw new RemoteException(e.getMessage());
205                    }
206            }
207    
208            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getThreads(
209                    long groupId, long categoryId, int status, int start, int end)
210                    throws RemoteException {
211                    try {
212                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
213                                    MBThreadServiceUtil.getThreads(groupId, categoryId, status,
214                                            start, end);
215    
216                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
217                    }
218                    catch (Exception e) {
219                            _log.error(e, e);
220    
221                            throw new RemoteException(e.getMessage());
222                    }
223            }
224    
225            public static int getThreadsCount(long groupId, long categoryId, int status)
226                    throws RemoteException {
227                    try {
228                            int returnValue = MBThreadServiceUtil.getThreadsCount(groupId,
229                                            categoryId, status);
230    
231                            return returnValue;
232                    }
233                    catch (Exception e) {
234                            _log.error(e, e);
235    
236                            throw new RemoteException(e.getMessage());
237                    }
238            }
239    
240            public static com.liferay.portlet.messageboards.model.MBThreadSoap moveThread(
241                    long categoryId, long threadId) throws RemoteException {
242                    try {
243                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.moveThread(categoryId,
244                                            threadId);
245    
246                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
247                    }
248                    catch (Exception e) {
249                            _log.error(e, e);
250    
251                            throw new RemoteException(e.getMessage());
252                    }
253            }
254    
255            public static com.liferay.portlet.messageboards.model.MBThreadSoap splitThread(
256                    long messageId, java.lang.String subject,
257                    com.liferay.portal.service.ServiceContext serviceContext)
258                    throws RemoteException {
259                    try {
260                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.splitThread(messageId,
261                                            subject, serviceContext);
262    
263                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
264                    }
265                    catch (Exception e) {
266                            _log.error(e, e);
267    
268                            throw new RemoteException(e.getMessage());
269                    }
270            }
271    
272            public static void unlockThread(long threadId) throws RemoteException {
273                    try {
274                            MBThreadServiceUtil.unlockThread(threadId);
275                    }
276                    catch (Exception e) {
277                            _log.error(e, e);
278    
279                            throw new RemoteException(e.getMessage());
280                    }
281            }
282    
283            private static Log _log = LogFactoryUtil.getLog(MBThreadServiceSoap.class);
284    }