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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.util.ListUtil;
022    
023    import com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil;
024    
025    import java.rmi.RemoteException;
026    
027    /**
028     * Provides the SOAP utility for the
029     * {@link com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it is difficult for SOAP to
032     * support certain types.
033     *
034     * <p>
035     * ServiceBuilder follows certain rules in translating the methods. For example,
036     * if the method in the service utility returns a {@link java.util.List}, that
037     * is translated to an array of {@link com.liferay.portlet.bookmarks.model.BookmarksEntrySoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portlet.bookmarks.model.BookmarksEntry}, that is translated to a
040     * {@link com.liferay.portlet.bookmarks.model.BookmarksEntrySoap}. Methods that SOAP cannot
041     * safely wire are skipped.
042     * </p>
043     *
044     * <p>
045     * The benefits of using the SOAP utility is that it is cross platform
046     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
047     * even Perl, to call the generated services. One drawback of SOAP is that it is
048     * slow because it needs to serialize all calls into a text format (XML).
049     * </p>
050     *
051     * <p>
052     * You can see a list of services at http://localhost:8080/api/axis. Set the
053     * property <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 BookmarksEntryServiceHttp
063     * @see com.liferay.portlet.bookmarks.model.BookmarksEntrySoap
064     * @see com.liferay.portlet.bookmarks.service.BookmarksEntryServiceUtil
065     * @generated
066     */
067    @ProviderType
068    public class BookmarksEntryServiceSoap {
069            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap addEntry(
070                    long groupId, long folderId, java.lang.String name,
071                    java.lang.String url, java.lang.String description,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.addEntry(groupId,
076                                            folderId, name, url, description, serviceContext);
077    
078                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
079                    }
080                    catch (Exception e) {
081                            _log.error(e, e);
082    
083                            throw new RemoteException(e.getMessage());
084                    }
085            }
086    
087            public static void deleteEntry(long entryId) throws RemoteException {
088                    try {
089                            BookmarksEntryServiceUtil.deleteEntry(entryId);
090                    }
091                    catch (Exception e) {
092                            _log.error(e, e);
093    
094                            throw new RemoteException(e.getMessage());
095                    }
096            }
097    
098            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getEntries(
099                    long groupId, long folderId, int start, int end)
100                    throws RemoteException {
101                    try {
102                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
103                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
104                                            end);
105    
106                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
107                    }
108                    catch (Exception e) {
109                            _log.error(e, e);
110    
111                            throw new RemoteException(e.getMessage());
112                    }
113            }
114    
115            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getEntries(
116                    long groupId, long folderId, int start, int end,
117                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
118                    throws RemoteException {
119                    try {
120                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
121                                    BookmarksEntryServiceUtil.getEntries(groupId, folderId, start,
122                                            end, orderByComparator);
123    
124                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
125                    }
126                    catch (Exception e) {
127                            _log.error(e, e);
128    
129                            throw new RemoteException(e.getMessage());
130                    }
131            }
132    
133            public static int getEntriesCount(long groupId, long folderId)
134                    throws RemoteException {
135                    try {
136                            int returnValue = BookmarksEntryServiceUtil.getEntriesCount(groupId,
137                                            folderId);
138    
139                            return returnValue;
140                    }
141                    catch (Exception e) {
142                            _log.error(e, e);
143    
144                            throw new RemoteException(e.getMessage());
145                    }
146            }
147    
148            public static int getEntriesCount(long groupId, long folderId, int status)
149                    throws RemoteException {
150                    try {
151                            int returnValue = BookmarksEntryServiceUtil.getEntriesCount(groupId,
152                                            folderId, status);
153    
154                            return returnValue;
155                    }
156                    catch (Exception e) {
157                            _log.error(e, e);
158    
159                            throw new RemoteException(e.getMessage());
160                    }
161            }
162    
163            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap getEntry(
164                    long entryId) throws RemoteException {
165                    try {
166                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.getEntry(entryId);
167    
168                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(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 getFoldersEntriesCount(long groupId, Long[] folderIds)
178                    throws RemoteException {
179                    try {
180                            int returnValue = BookmarksEntryServiceUtil.getFoldersEntriesCount(groupId,
181                                            ListUtil.toList(folderIds));
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 com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
193                    long groupId, int start, int end) throws RemoteException {
194                    try {
195                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
196                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, start, end);
197    
198                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(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.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
208                    long groupId, long userId, int start, int end)
209                    throws RemoteException {
210                    try {
211                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
212                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, userId,
213                                            start, end);
214    
215                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.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 com.liferay.portlet.bookmarks.model.BookmarksEntrySoap[] getGroupEntries(
225                    long groupId, long userId, long rootFolderId, int start, int end)
226                    throws RemoteException {
227                    try {
228                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> returnValue =
229                                    BookmarksEntryServiceUtil.getGroupEntries(groupId, userId,
230                                            rootFolderId, start, end);
231    
232                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModels(returnValue);
233                    }
234                    catch (Exception e) {
235                            _log.error(e, e);
236    
237                            throw new RemoteException(e.getMessage());
238                    }
239            }
240    
241            public static int getGroupEntriesCount(long groupId)
242                    throws RemoteException {
243                    try {
244                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId);
245    
246                            return returnValue;
247                    }
248                    catch (Exception e) {
249                            _log.error(e, e);
250    
251                            throw new RemoteException(e.getMessage());
252                    }
253            }
254    
255            public static int getGroupEntriesCount(long groupId, long userId)
256                    throws RemoteException {
257                    try {
258                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
259                                            userId);
260    
261                            return returnValue;
262                    }
263                    catch (Exception e) {
264                            _log.error(e, e);
265    
266                            throw new RemoteException(e.getMessage());
267                    }
268            }
269    
270            public static int getGroupEntriesCount(long groupId, long userId,
271                    long rootFolderId) throws RemoteException {
272                    try {
273                            int returnValue = BookmarksEntryServiceUtil.getGroupEntriesCount(groupId,
274                                            userId, rootFolderId);
275    
276                            return returnValue;
277                    }
278                    catch (Exception e) {
279                            _log.error(e, e);
280    
281                            throw new RemoteException(e.getMessage());
282                    }
283            }
284    
285            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntry(
286                    long entryId, long parentFolderId) throws RemoteException {
287                    try {
288                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntry(entryId,
289                                            parentFolderId);
290    
291                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
292                    }
293                    catch (Exception e) {
294                            _log.error(e, e);
295    
296                            throw new RemoteException(e.getMessage());
297                    }
298            }
299    
300            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntryFromTrash(
301                    long entryId, long parentFolderId) throws RemoteException {
302                    try {
303                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntryFromTrash(entryId,
304                                            parentFolderId);
305    
306                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
307                    }
308                    catch (Exception e) {
309                            _log.error(e, e);
310    
311                            throw new RemoteException(e.getMessage());
312                    }
313            }
314    
315            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap moveEntryToTrash(
316                    long entryId) throws RemoteException {
317                    try {
318                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.moveEntryToTrash(entryId);
319    
320                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
321                    }
322                    catch (Exception e) {
323                            _log.error(e, e);
324    
325                            throw new RemoteException(e.getMessage());
326                    }
327            }
328    
329            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
330                    com.liferay.portlet.bookmarks.model.BookmarksEntrySoap entry)
331                    throws RemoteException {
332                    try {
333                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(com.liferay.portlet.bookmarks.model.impl.BookmarksEntryModelImpl.toModel(
334                                                    entry));
335    
336                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
337                    }
338                    catch (Exception e) {
339                            _log.error(e, e);
340    
341                            throw new RemoteException(e.getMessage());
342                    }
343            }
344    
345            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap openEntry(
346                    long entryId) throws RemoteException {
347                    try {
348                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.openEntry(entryId);
349    
350                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
351                    }
352                    catch (Exception e) {
353                            _log.error(e, e);
354    
355                            throw new RemoteException(e.getMessage());
356                    }
357            }
358    
359            public static void restoreEntryFromTrash(long entryId)
360                    throws RemoteException {
361                    try {
362                            BookmarksEntryServiceUtil.restoreEntryFromTrash(entryId);
363                    }
364                    catch (Exception e) {
365                            _log.error(e, e);
366    
367                            throw new RemoteException(e.getMessage());
368                    }
369            }
370    
371            public static void subscribeEntry(long entryId) throws RemoteException {
372                    try {
373                            BookmarksEntryServiceUtil.subscribeEntry(entryId);
374                    }
375                    catch (Exception e) {
376                            _log.error(e, e);
377    
378                            throw new RemoteException(e.getMessage());
379                    }
380            }
381    
382            public static void unsubscribeEntry(long entryId) throws RemoteException {
383                    try {
384                            BookmarksEntryServiceUtil.unsubscribeEntry(entryId);
385                    }
386                    catch (Exception e) {
387                            _log.error(e, e);
388    
389                            throw new RemoteException(e.getMessage());
390                    }
391            }
392    
393            public static com.liferay.portlet.bookmarks.model.BookmarksEntrySoap updateEntry(
394                    long entryId, long groupId, long folderId, java.lang.String name,
395                    java.lang.String url, java.lang.String description,
396                    com.liferay.portal.service.ServiceContext serviceContext)
397                    throws RemoteException {
398                    try {
399                            com.liferay.portlet.bookmarks.model.BookmarksEntry returnValue = BookmarksEntryServiceUtil.updateEntry(entryId,
400                                            groupId, folderId, name, url, description, serviceContext);
401    
402                            return com.liferay.portlet.bookmarks.model.BookmarksEntrySoap.toSoapModel(returnValue);
403                    }
404                    catch (Exception e) {
405                            _log.error(e, e);
406    
407                            throw new RemoteException(e.getMessage());
408                    }
409            }
410    
411            private static Log _log = LogFactoryUtil.getLog(BookmarksEntryServiceSoap.class);
412    }