001    /**
002     * Copyright (c) 2000-2012 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 http://localhost:8080/api/axis. Set the
052     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
053     * security.
054     * </p>
055     *
056     * <p>
057     * The SOAP utility is only generated for remote services.
058     * </p>
059     *
060     * @author    Brian Wing Shun Chan
061     * @see       MBThreadServiceHttp
062     * @see       com.liferay.portlet.messageboards.model.MBThreadSoap
063     * @see       com.liferay.portlet.messageboards.service.MBThreadServiceUtil
064     * @generated
065     */
066    public class MBThreadServiceSoap {
067            public static void deleteThread(long threadId) throws RemoteException {
068                    try {
069                            MBThreadServiceUtil.deleteThread(threadId);
070                    }
071                    catch (Exception e) {
072                            _log.error(e, e);
073    
074                            throw new RemoteException(e.getMessage());
075                    }
076            }
077    
078            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
079                    long groupId, long userId, java.util.Date modifiedDate, int status,
080                    int start, int end) throws RemoteException {
081                    try {
082                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
083                                    MBThreadServiceUtil.getGroupThreads(groupId, userId,
084                                            modifiedDate, status, start, end);
085    
086                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
087                    }
088                    catch (Exception e) {
089                            _log.error(e, e);
090    
091                            throw new RemoteException(e.getMessage());
092                    }
093            }
094    
095            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
096                    long groupId, long userId, int status, boolean subscribed,
097                    boolean includeAnonymous, int start, int end) throws RemoteException {
098                    try {
099                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
100                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
101                                            subscribed, includeAnonymous, start, end);
102    
103                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
104                    }
105                    catch (Exception e) {
106                            _log.error(e, e);
107    
108                            throw new RemoteException(e.getMessage());
109                    }
110            }
111    
112            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
113                    long groupId, long userId, int status, boolean subscribed, int start,
114                    int end) throws RemoteException {
115                    try {
116                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
117                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
118                                            subscribed, start, end);
119    
120                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
121                    }
122                    catch (Exception e) {
123                            _log.error(e, e);
124    
125                            throw new RemoteException(e.getMessage());
126                    }
127            }
128    
129            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getGroupThreads(
130                    long groupId, long userId, int status, int start, int end)
131                    throws RemoteException {
132                    try {
133                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
134                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
135                                            start, end);
136    
137                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
138                    }
139                    catch (Exception e) {
140                            _log.error(e, e);
141    
142                            throw new RemoteException(e.getMessage());
143                    }
144            }
145    
146            public static int getGroupThreadsCount(long groupId, long userId,
147                    java.util.Date modifiedDate, int status) throws RemoteException {
148                    try {
149                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
150                                            userId, modifiedDate, status);
151    
152                            return returnValue;
153                    }
154                    catch (Exception e) {
155                            _log.error(e, e);
156    
157                            throw new RemoteException(e.getMessage());
158                    }
159            }
160    
161            public static int getGroupThreadsCount(long groupId, long userId, int status)
162                    throws RemoteException {
163                    try {
164                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
165                                            userId, status);
166    
167                            return returnValue;
168                    }
169                    catch (Exception e) {
170                            _log.error(e, e);
171    
172                            throw new RemoteException(e.getMessage());
173                    }
174            }
175    
176            public static int getGroupThreadsCount(long groupId, long userId,
177                    int status, boolean subscribed) throws RemoteException {
178                    try {
179                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
180                                            userId, status, subscribed);
181    
182                            return returnValue;
183                    }
184                    catch (Exception e) {
185                            _log.error(e, e);
186    
187                            throw new RemoteException(e.getMessage());
188                    }
189            }
190    
191            public static int getGroupThreadsCount(long groupId, long userId,
192                    int status, boolean subscribed, boolean includeAnonymous)
193                    throws RemoteException {
194                    try {
195                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
196                                            userId, status, subscribed, includeAnonymous);
197    
198                            return returnValue;
199                    }
200                    catch (Exception e) {
201                            _log.error(e, e);
202    
203                            throw new RemoteException(e.getMessage());
204                    }
205            }
206    
207            public static com.liferay.portlet.messageboards.model.MBThreadSoap[] getThreads(
208                    long groupId, long categoryId, int status, int start, int end)
209                    throws RemoteException {
210                    try {
211                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
212                                    MBThreadServiceUtil.getThreads(groupId, categoryId, status,
213                                            start, end);
214    
215                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
216                    }
217                    catch (Exception e) {
218                            _log.error(e, e);
219    
220                            throw new RemoteException(e.getMessage());
221                    }
222            }
223    
224            public static int getThreadsCount(long groupId, long categoryId, int status)
225                    throws RemoteException {
226                    try {
227                            int returnValue = MBThreadServiceUtil.getThreadsCount(groupId,
228                                            categoryId, status);
229    
230                            return returnValue;
231                    }
232                    catch (Exception e) {
233                            _log.error(e, e);
234    
235                            throw new RemoteException(e.getMessage());
236                    }
237            }
238    
239            public static com.liferay.portlet.messageboards.model.MBThreadSoap moveThread(
240                    long categoryId, long threadId) throws RemoteException {
241                    try {
242                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.moveThread(categoryId,
243                                            threadId);
244    
245                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
246                    }
247                    catch (Exception e) {
248                            _log.error(e, e);
249    
250                            throw new RemoteException(e.getMessage());
251                    }
252            }
253    
254            public static com.liferay.portlet.messageboards.model.MBThreadSoap moveThreadFromTrash(
255                    long categoryId, long threadId) throws RemoteException {
256                    try {
257                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.moveThreadFromTrash(categoryId,
258                                            threadId);
259    
260                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
261                    }
262                    catch (Exception e) {
263                            _log.error(e, e);
264    
265                            throw new RemoteException(e.getMessage());
266                    }
267            }
268    
269            public static com.liferay.portlet.messageboards.model.MBThreadSoap moveThreadToTrash(
270                    long threadId) throws RemoteException {
271                    try {
272                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.moveThreadToTrash(threadId);
273    
274                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
275                    }
276                    catch (Exception e) {
277                            _log.error(e, e);
278    
279                            throw new RemoteException(e.getMessage());
280                    }
281            }
282    
283            public static void restoreThreadFromTrash(long threadId)
284                    throws RemoteException {
285                    try {
286                            MBThreadServiceUtil.restoreThreadFromTrash(threadId);
287                    }
288                    catch (Exception e) {
289                            _log.error(e, e);
290    
291                            throw new RemoteException(e.getMessage());
292                    }
293            }
294    
295            public static com.liferay.portlet.messageboards.model.MBThreadSoap splitThread(
296                    long messageId, java.lang.String subject,
297                    com.liferay.portal.service.ServiceContext serviceContext)
298                    throws RemoteException {
299                    try {
300                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.splitThread(messageId,
301                                            subject, serviceContext);
302    
303                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
304                    }
305                    catch (Exception e) {
306                            _log.error(e, e);
307    
308                            throw new RemoteException(e.getMessage());
309                    }
310            }
311    
312            public static void unlockThread(long threadId) throws RemoteException {
313                    try {
314                            MBThreadServiceUtil.unlockThread(threadId);
315                    }
316                    catch (Exception e) {
317                            _log.error(e, e);
318    
319                            throw new RemoteException(e.getMessage());
320                    }
321            }
322    
323            private static Log _log = LogFactoryUtil.getLog(MBThreadServiceSoap.class);
324    }