001    /**
002     * Copyright (c) 2000-present 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.BookmarksFolderServiceUtil;
024    
025    import java.rmi.RemoteException;
026    
027    /**
028     * Provides the SOAP utility for the
029     * {@link com.liferay.portlet.bookmarks.service.BookmarksFolderServiceUtil} 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.BookmarksFolderSoap}.
038     * If the method in the service utility returns a
039     * {@link com.liferay.portlet.bookmarks.model.BookmarksFolder}, that is translated to a
040     * {@link com.liferay.portlet.bookmarks.model.BookmarksFolderSoap}. 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 BookmarksFolderServiceHttp
063     * @see com.liferay.portlet.bookmarks.model.BookmarksFolderSoap
064     * @see com.liferay.portlet.bookmarks.service.BookmarksFolderServiceUtil
065     * @generated
066     */
067    @ProviderType
068    public class BookmarksFolderServiceSoap {
069            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap addFolder(
070                    long parentFolderId, java.lang.String name,
071                    java.lang.String description,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws RemoteException {
074                    try {
075                            com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.addFolder(parentFolderId,
076                                            name, description, serviceContext);
077    
078                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.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 deleteFolder(long folderId) throws RemoteException {
088                    try {
089                            BookmarksFolderServiceUtil.deleteFolder(folderId);
090                    }
091                    catch (Exception e) {
092                            _log.error(e, e);
093    
094                            throw new RemoteException(e.getMessage());
095                    }
096            }
097    
098            public static void deleteFolder(long folderId, boolean includeTrashedEntries)
099                    throws RemoteException {
100                    try {
101                            BookmarksFolderServiceUtil.deleteFolder(folderId,
102                                    includeTrashedEntries);
103                    }
104                    catch (Exception e) {
105                            _log.error(e, e);
106    
107                            throw new RemoteException(e.getMessage());
108                    }
109            }
110    
111            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap getFolder(
112                    long folderId) throws RemoteException {
113                    try {
114                            com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.getFolder(folderId);
115    
116                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
117                    }
118                    catch (Exception e) {
119                            _log.error(e, e);
120    
121                            throw new RemoteException(e.getMessage());
122                    }
123            }
124    
125            public static java.lang.Long[] getFolderIds(long groupId, long folderId)
126                    throws RemoteException {
127                    try {
128                            java.util.List<java.lang.Long> returnValue = BookmarksFolderServiceUtil.getFolderIds(groupId,
129                                            folderId);
130    
131                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
132                    }
133                    catch (Exception e) {
134                            _log.error(e, e);
135    
136                            throw new RemoteException(e.getMessage());
137                    }
138            }
139    
140            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
141                    long groupId) throws RemoteException {
142                    try {
143                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
144                                    BookmarksFolderServiceUtil.getFolders(groupId);
145    
146                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
147                    }
148                    catch (Exception e) {
149                            _log.error(e, e);
150    
151                            throw new RemoteException(e.getMessage());
152                    }
153            }
154    
155            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
156                    long groupId, long parentFolderId) throws RemoteException {
157                    try {
158                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
159                                    BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId);
160    
161                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
162                    }
163                    catch (Exception e) {
164                            _log.error(e, e);
165    
166                            throw new RemoteException(e.getMessage());
167                    }
168            }
169    
170            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
171                    long groupId, long parentFolderId, int start, int end)
172                    throws RemoteException {
173                    try {
174                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
175                                    BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId,
176                                            start, end);
177    
178                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModels(returnValue);
179                    }
180                    catch (Exception e) {
181                            _log.error(e, e);
182    
183                            throw new RemoteException(e.getMessage());
184                    }
185            }
186    
187            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap[] getFolders(
188                    long groupId, long parentFolderId, int status, int start, int end)
189                    throws RemoteException {
190                    try {
191                            java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> returnValue =
192                                    BookmarksFolderServiceUtil.getFolders(groupId, parentFolderId,
193                                            status, start, end);
194    
195                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.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 int getFoldersAndEntriesCount(long groupId, long folderId)
205                    throws RemoteException {
206                    try {
207                            int returnValue = BookmarksFolderServiceUtil.getFoldersAndEntriesCount(groupId,
208                                            folderId);
209    
210                            return returnValue;
211                    }
212                    catch (Exception e) {
213                            _log.error(e, e);
214    
215                            throw new RemoteException(e.getMessage());
216                    }
217            }
218    
219            public static int getFoldersAndEntriesCount(long groupId, long folderId,
220                    int status) throws RemoteException {
221                    try {
222                            int returnValue = BookmarksFolderServiceUtil.getFoldersAndEntriesCount(groupId,
223                                            folderId, status);
224    
225                            return returnValue;
226                    }
227                    catch (Exception e) {
228                            _log.error(e, e);
229    
230                            throw new RemoteException(e.getMessage());
231                    }
232            }
233    
234            public static int getFoldersCount(long groupId, long parentFolderId)
235                    throws RemoteException {
236                    try {
237                            int returnValue = BookmarksFolderServiceUtil.getFoldersCount(groupId,
238                                            parentFolderId);
239    
240                            return returnValue;
241                    }
242                    catch (Exception e) {
243                            _log.error(e, e);
244    
245                            throw new RemoteException(e.getMessage());
246                    }
247            }
248    
249            public static int getFoldersCount(long groupId, long parentFolderId,
250                    int status) throws RemoteException {
251                    try {
252                            int returnValue = BookmarksFolderServiceUtil.getFoldersCount(groupId,
253                                            parentFolderId, status);
254    
255                            return returnValue;
256                    }
257                    catch (Exception e) {
258                            _log.error(e, e);
259    
260                            throw new RemoteException(e.getMessage());
261                    }
262            }
263    
264            /**
265            * @deprecated As of 7.0.0, replaced by {@link #getSubfolderIds(List, long,
266            long, boolean)}
267            */
268            @Deprecated
269            public static void getSubfolderIds(Long[] folderIds, long groupId,
270                    long folderId) throws RemoteException {
271                    try {
272                            BookmarksFolderServiceUtil.getSubfolderIds(ListUtil.toList(
273                                            folderIds), groupId, folderId);
274                    }
275                    catch (Exception e) {
276                            _log.error(e, e);
277    
278                            throw new RemoteException(e.getMessage());
279                    }
280            }
281    
282            public static void getSubfolderIds(Long[] folderIds, long groupId,
283                    long folderId, boolean recurse) throws RemoteException {
284                    try {
285                            BookmarksFolderServiceUtil.getSubfolderIds(ListUtil.toList(
286                                            folderIds), groupId, folderId, recurse);
287                    }
288                    catch (Exception e) {
289                            _log.error(e, e);
290    
291                            throw new RemoteException(e.getMessage());
292                    }
293            }
294    
295            public static java.lang.Long[] getSubfolderIds(long groupId, long folderId,
296                    boolean recurse) throws RemoteException {
297                    try {
298                            java.util.List<java.lang.Long> returnValue = BookmarksFolderServiceUtil.getSubfolderIds(groupId,
299                                            folderId, recurse);
300    
301                            return returnValue.toArray(new java.lang.Long[returnValue.size()]);
302                    }
303                    catch (Exception e) {
304                            _log.error(e, e);
305    
306                            throw new RemoteException(e.getMessage());
307                    }
308            }
309    
310            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap moveFolder(
311                    long folderId, long parentFolderId) throws RemoteException {
312                    try {
313                            com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.moveFolder(folderId,
314                                            parentFolderId);
315    
316                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
317                    }
318                    catch (Exception e) {
319                            _log.error(e, e);
320    
321                            throw new RemoteException(e.getMessage());
322                    }
323            }
324    
325            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap moveFolderFromTrash(
326                    long folderId, long parentFolderId) throws RemoteException {
327                    try {
328                            com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.moveFolderFromTrash(folderId,
329                                            parentFolderId);
330    
331                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
332                    }
333                    catch (Exception e) {
334                            _log.error(e, e);
335    
336                            throw new RemoteException(e.getMessage());
337                    }
338            }
339    
340            public static com.liferay.portlet.bookmarks.model.BookmarksFolderSoap moveFolderToTrash(
341                    long folderId) throws RemoteException {
342                    try {
343                            com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.moveFolderToTrash(folderId);
344    
345                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
346                    }
347                    catch (Exception e) {
348                            _log.error(e, e);
349    
350                            throw new RemoteException(e.getMessage());
351                    }
352            }
353    
354            public static void restoreFolderFromTrash(long folderId)
355                    throws RemoteException {
356                    try {
357                            BookmarksFolderServiceUtil.restoreFolderFromTrash(folderId);
358                    }
359                    catch (Exception e) {
360                            _log.error(e, e);
361    
362                            throw new RemoteException(e.getMessage());
363                    }
364            }
365    
366            public static void subscribeFolder(long groupId, long folderId)
367                    throws RemoteException {
368                    try {
369                            BookmarksFolderServiceUtil.subscribeFolder(groupId, folderId);
370                    }
371                    catch (Exception e) {
372                            _log.error(e, e);
373    
374                            throw new RemoteException(e.getMessage());
375                    }
376            }
377    
378            public static void unsubscribeFolder(long groupId, long folderId)
379                    throws RemoteException {
380                    try {
381                            BookmarksFolderServiceUtil.unsubscribeFolder(groupId, folderId);
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.BookmarksFolderSoap updateFolder(
391                    long folderId, long parentFolderId, java.lang.String name,
392                    java.lang.String description, boolean mergeWithParentFolder,
393                    com.liferay.portal.service.ServiceContext serviceContext)
394                    throws RemoteException {
395                    try {
396                            com.liferay.portlet.bookmarks.model.BookmarksFolder returnValue = BookmarksFolderServiceUtil.updateFolder(folderId,
397                                            parentFolderId, name, description, mergeWithParentFolder,
398                                            serviceContext);
399    
400                            return com.liferay.portlet.bookmarks.model.BookmarksFolderSoap.toSoapModel(returnValue);
401                    }
402                    catch (Exception e) {
403                            _log.error(e, e);
404    
405                            throw new RemoteException(e.getMessage());
406                    }
407            }
408    
409            private static Log _log = LogFactoryUtil.getLog(BookmarksFolderServiceSoap.class);
410    }