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.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/tunnel-web/secure/axis. Set the property
053     * <b>tunnel.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, int status, boolean subscribed,
081                    boolean includeAnonymous, int start, int end) throws RemoteException {
082                    try {
083                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
084                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
085                                            subscribed, includeAnonymous, 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, int start,
098                    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, 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, int start, int end)
115                    throws RemoteException {
116                    try {
117                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
118                                    MBThreadServiceUtil.getGroupThreads(groupId, userId, status,
119                                            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 int getGroupThreadsCount(long groupId, long userId, int status)
131                    throws RemoteException {
132                    try {
133                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
134                                            userId, status);
135    
136                            return returnValue;
137                    }
138                    catch (Exception e) {
139                            _log.error(e, e);
140    
141                            throw new RemoteException(e.getMessage());
142                    }
143            }
144    
145            public static int getGroupThreadsCount(long groupId, long userId,
146                    int status, boolean subscribed) throws RemoteException {
147                    try {
148                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
149                                            userId, status, subscribed);
150    
151                            return returnValue;
152                    }
153                    catch (Exception e) {
154                            _log.error(e, e);
155    
156                            throw new RemoteException(e.getMessage());
157                    }
158            }
159    
160            public static int getGroupThreadsCount(long groupId, long userId,
161                    int status, boolean subscribed, boolean includeAnonymous)
162                    throws RemoteException {
163                    try {
164                            int returnValue = MBThreadServiceUtil.getGroupThreadsCount(groupId,
165                                            userId, status, subscribed, includeAnonymous);
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 com.liferay.portlet.messageboards.model.MBThreadSoap[] getThreads(
177                    long groupId, long categoryId, int status, int start, int end)
178                    throws RemoteException {
179                    try {
180                            java.util.List<com.liferay.portlet.messageboards.model.MBThread> returnValue =
181                                    MBThreadServiceUtil.getThreads(groupId, categoryId, status,
182                                            start, end);
183    
184                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModels(returnValue);
185                    }
186                    catch (Exception e) {
187                            _log.error(e, e);
188    
189                            throw new RemoteException(e.getMessage());
190                    }
191            }
192    
193            public static int getThreadsCount(long groupId, long categoryId, int status)
194                    throws RemoteException {
195                    try {
196                            int returnValue = MBThreadServiceUtil.getThreadsCount(groupId,
197                                            categoryId, status);
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 moveThread(
209                    long categoryId, long threadId) throws RemoteException {
210                    try {
211                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.moveThread(categoryId,
212                                            threadId);
213    
214                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
215                    }
216                    catch (Exception e) {
217                            _log.error(e, e);
218    
219                            throw new RemoteException(e.getMessage());
220                    }
221            }
222    
223            public static com.liferay.portlet.messageboards.model.MBThreadSoap splitThread(
224                    long messageId, com.liferay.portal.service.ServiceContext serviceContext)
225                    throws RemoteException {
226                    try {
227                            com.liferay.portlet.messageboards.model.MBThread returnValue = MBThreadServiceUtil.splitThread(messageId,
228                                            serviceContext);
229    
230                            return com.liferay.portlet.messageboards.model.MBThreadSoap.toSoapModel(returnValue);
231                    }
232                    catch (Exception e) {
233                            _log.error(e, e);
234    
235                            throw new RemoteException(e.getMessage());
236                    }
237            }
238    
239            public static void unlockThread(long threadId) throws RemoteException {
240                    try {
241                            MBThreadServiceUtil.unlockThread(threadId);
242                    }
243                    catch (Exception e) {
244                            _log.error(e, e);
245    
246                            throw new RemoteException(e.getMessage());
247                    }
248            }
249    
250            private static Log _log = LogFactoryUtil.getLog(MBThreadServiceSoap.class);
251    }