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.bookmarks.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.ListUtil;
020    
021    import com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil;
022    
023    import java.rmi.RemoteException;
024    
025    /**
026     * Provides the SOAP utility for the
027     * {@link com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil} 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     *
032     * <p>
033     * ServiceBuilder follows certain rules in translating the methods. For example,
034     * if the method in the service utility returns a {@link java.util.List}, that
035     * is translated to an array of {@link com.liferay.portlet.bookmarks.model.BookmarksEntrySoap}.
036     * If the method in the service utility returns a
037     * {@link com.liferay.portlet.bookmarks.model.BookmarksEntry}, that is translated to a
038     * {@link com.liferay.portlet.bookmarks.model.BookmarksEntrySoap}. Methods that SOAP cannot
039     * safely wire are skipped.
040     * </p>
041     *
042     * <p>
043     * The benefits of using the SOAP utility is that it is cross platform
044     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
045     * even Perl, to call the generated services. One drawback of SOAP is that it is
046     * slow because it needs to serialize all calls into a text format (XML).
047     * </p>
048     *
049     * <p>
050     * You can see a list of services at http://localhost:8080/api/axis. Set the
051     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
052     * security.
053     * </p>
054     *
055     * <p>
056     * The SOAP utility is only generated for remote services.
057     * </p>
058     *
059     * @author Brian Wing Shun Chan
060     * @see BookmarksEntryServiceHttp
061     * @see com.liferay.portlet.bookmarks.model.BookmarksEntrySoap
062     * @see com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil
063     * @generated
064     */
065    public class BookmarksEntryServiceSoap {
066            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap addEntry(
067                    long groupId, long folderId, java.lang.String name,
068                    java.lang.String url, java.lang.String description,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws RemoteException {
071                    try {
072                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.addEntry(groupId,
073                                            folderId, name, url, description, serviceContext);
074    
075                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
076                    }
077                    catch (Exception e) {
078                            _log.error(e, e);
079    
080                            throw new RemoteException(e.getMessage());
081                    }
082            }
083    
084            public static void deleteEntry(long entryId) throws RemoteException {
085                    try {
086                            BookmarksEntryServiceUtil.deleteEntry(entryId);
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.bookmarks.model.BookmarksEntrySoap[] getEntries(
096                    long groupId, long folderId, int start, int end)
097                    throws RemoteException {
098                    try {
099                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
100                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
101                                            end);
102    
103                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.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.bookmarks.model.BookmarksEntrySoap[] getEntries(
113                    long groupId, long folderId, int start, int end,
114                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
115                    throws RemoteException {
116                    try {
117                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
118                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
119                                            end, orderByComparator);
120    
121                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.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 getEntriesCount(long groupId, long folderId)
131                    throws RemoteException {
132                    try {
133                            int returnValue = BookmarksEntryServiceUtil.getEntriesCount(groupId,
134                                            folderId);
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 getEntriesCount(long groupId, long folderId, int status)
146                    throws RemoteException {
147                    try {
148                            int returnValue = BookmarksEntryServiceUtil.getEntriesCount(groupId,
149                                            folderId, status);
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 com.liferay.portlet.bookmarks.model.BookmarksEntrySoap getEntry(
161                    long entryId) throws RemoteException {
162                    try {
163                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.getEntry(entryId);
164    
165                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(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 getFoldersEntriesCount(long groupId, Long[] folderIds)
175                    throws RemoteException {
176                    try {
177                            int returnValue = BookmarksEntryServiceUtil.getFoldersEntriesCount(groupId,
178                                            ListUtil.toList(folderIds));
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 com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
190                    long groupId, int start, int end) throws RemoteException {
191                    try {
192                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
193                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, start, end);
194    
195                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
196                    }
197                    catch (Exception e) {
198                            _log.error(e, e);
199    
200                            throw new RemoteException(e.getMessage());
201                    }
202            }
203    
204            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
205                    long groupId, long userId, int start, int end)
206                    throws RemoteException {
207                    try {
208                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
209                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, userId,
210                                            start, end);
211    
212                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
213                    }
214                    catch (Exception e) {
215                            _log.error(e, e);
216    
217                            throw new RemoteException(e.getMessage());
218                    }
219            }
220    
221            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
222                    long groupId, long userId, long rootFolderId, int start, int end)
223                    throws RemoteException {
224                    try {
225                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
226                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, userId,
227                                            rootFolderId, start, end);
228    
229                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
230                    }
231                    catch (Exception e) {
232                            _log.error(e, e);
233    
234                            throw new RemoteException(e.getMessage());
235                    }
236            }
237    
238            public static int getGroupEntriesCount(long groupId)
239                    throws RemoteException {
240                    try {
241                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId);
242    
243                            return returnValue;
244                    }
245                    catch (Exception e) {
246                            _log.error(e, e);
247    
248                            throw new RemoteException(e.getMessage());
249                    }
250            }
251    
252            public static int getGroupEntriesCount(long groupId, long userId)
253                    throws RemoteException {
254                    try {
255                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
256                                            userId);
257    
258                            return returnValue;
259                    }
260                    catch (Exception e) {
261                            _log.error(e, e);
262    
263                            throw new RemoteException(e.getMessage());
264                    }
265            }
266    
267            public static int getGroupEntriesCount(long groupId, long userId,
268                    long rootFolderId) throws RemoteException {
269                    try {
270                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
271                                            userId, rootFolderId);
272    
273                            return returnValue;
274                    }
275                    catch (Exception e) {
276                            _log.error(e, e);
277    
278                            throw new RemoteException(e.getMessage());
279                    }
280            }
281    
282            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntry(
283                    long entryId, long parentFolderId) throws RemoteException {
284                    try {
285                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntry(entryId,
286                                            parentFolderId);
287    
288                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
289                    }
290                    catch (Exception e) {
291                            _log.error(e, e);
292    
293                            throw new RemoteException(e.getMessage());
294                    }
295            }
296    
297            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntryFromTrash(
298                    long entryId, long parentFolderId) throws RemoteException {
299                    try {
300                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntryFromTrash(entryId,
301                                            parentFolderId);
302    
303                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.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 com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntryToTrash(
313                    long entryId) throws RemoteException {
314                    try {
315                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntryToTrash(entryId);
316    
317                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
318                    }
319                    catch (Exception e) {
320                            _log.error(e, e);
321    
322                            throw new RemoteException(e.getMessage());
323                    }
324            }
325    
326            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
327                    com.liferay.portlet.bookmarks.model.BookmarksEntrySoap entry)
328                    throws RemoteException {
329                    try {
330                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(com.liferay.portlet.bookmarks.model.impl.BookmarksEntryModelImpl.toModel(
331                                                    entry));
332    
333                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
334                    }
335                    catch (Exception e) {
336                            _log.error(e, e);
337    
338                            throw new RemoteException(e.getMessage());
339                    }
340            }
341    
342            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
343                    long entryId) throws RemoteException {
344                    try {
345                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(entryId);
346    
347                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
348                    }
349                    catch (Exception e) {
350                            _log.error(e, e);
351    
352                            throw new RemoteException(e.getMessage());
353                    }
354            }
355    
356            public static void restoreEntryFromTrash(long entryId)
357                    throws RemoteException {
358                    try {
359                            BookmarksEntryServiceUtil.restoreEntryFromTrash(entryId);
360                    }
361                    catch (Exception e) {
362                            _log.error(e, e);
363    
364                            throw new RemoteException(e.getMessage());
365                    }
366            }
367    
368            public static void subscribeEntry(long entryId) throws RemoteException {
369                    try {
370                            BookmarksEntryServiceUtil.subscribeEntry(entryId);
371                    }
372                    catch (Exception e) {
373                            _log.error(e, e);
374    
375                            throw new RemoteException(e.getMessage());
376                    }
377            }
378    
379            public static void unsubscribeEntry(long entryId) throws RemoteException {
380                    try {
381                            BookmarksEntryServiceUtil.unsubscribeEntry(entryId);
382                    }
383                    catch (Exception e) {
384                            _log.error(e, e);
385    
386                            throw new RemoteException(e.getMessage());
387                    }
388            }
389    
390            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap updateEntry(
391                    long entryId, long groupId, long folderId, java.lang.String name,
392                    java.lang.String url, java.lang.String description,
393                    com.liferay.portal.service.ServiceContext serviceContext)
394                    throws RemoteException {
395                    try {
396                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.updateEntry(entryId,
397                                            groupId, folderId, name, url, description, serviceContext);
398    
399                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
400                    }
401                    catch (Exception e) {
402                            _log.error(e, e);
403    
404                            throw new RemoteException(e.getMessage());
405                    }
406            }
407    
408            private static Log _log = LogFactoryUtil.getLog(BookmarksEntryServiceSoap.class);
409    }