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