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.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.bookmarks.service.BookmarksFolderServiceUtil;
025    
026    /**
027     * <p>
028     * This class provides a HTTP 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 requires an additional
032     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
033     * </p>
034     *
035     * <p>
036     * The benefits of using the HTTP utility is that it is fast and allows for
037     * tunneling without the cost of serializing to text. The drawback is that it
038     * only works with Java.
039     * </p>
040     *
041     * <p>
042     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
043     * configure security.
044     * </p>
045     *
046     * <p>
047     * The HTTP utility is only generated for remote services.
048     * </p>
049     *
050     * @author    Brian Wing Shun Chan
051     * @see       BookmarksFolderServiceSoap
052     * @see       com.liferay.portal.security.auth.HttpPrincipal
053     * @see       com.liferay.portlet.bookmarks.service.BookmarksFolderServiceUtil
054     * @generated
055     */
056    public class BookmarksFolderServiceHttp {
057            public static com.liferay.portlet.bookmarks.model.BookmarksFolder addFolder(
058                    HttpPrincipal httpPrincipal, long parentFolderId,
059                    java.lang.String name, java.lang.String description,
060                    com.liferay.portal.service.ServiceContext serviceContext)
061                    throws com.liferay.portal.kernel.exception.PortalException,
062                            com.liferay.portal.kernel.exception.SystemException {
063                    try {
064                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
065                                            "addFolder", _addFolderParameterTypes0);
066    
067                            MethodHandler methodHandler = new MethodHandler(methodKey,
068                                            parentFolderId, name, description, serviceContext);
069    
070                            Object returnObj = null;
071    
072                            try {
073                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
074                            }
075                            catch (Exception e) {
076                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
077                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
078                                    }
079    
080                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
081                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
082                                    }
083    
084                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
085                            }
086    
087                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
088                    }
089                    catch (com.liferay.portal.kernel.exception.SystemException se) {
090                            _log.error(se, se);
091    
092                            throw se;
093                    }
094            }
095    
096            public static void deleteFolder(HttpPrincipal httpPrincipal, long folderId)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException {
099                    try {
100                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
101                                            "deleteFolder", _deleteFolderParameterTypes1);
102    
103                            MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
104    
105                            try {
106                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
107                            }
108                            catch (Exception e) {
109                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
110                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
111                                    }
112    
113                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
114                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
115                                    }
116    
117                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
118                            }
119                    }
120                    catch (com.liferay.portal.kernel.exception.SystemException se) {
121                            _log.error(se, se);
122    
123                            throw se;
124                    }
125            }
126    
127            public static void deleteFolder(HttpPrincipal httpPrincipal, long folderId,
128                    boolean includeTrashedEntries)
129                    throws com.liferay.portal.kernel.exception.PortalException,
130                            com.liferay.portal.kernel.exception.SystemException {
131                    try {
132                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
133                                            "deleteFolder", _deleteFolderParameterTypes2);
134    
135                            MethodHandler methodHandler = new MethodHandler(methodKey,
136                                            folderId, includeTrashedEntries);
137    
138                            try {
139                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
140                            }
141                            catch (Exception e) {
142                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
143                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
144                                    }
145    
146                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
147                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
148                                    }
149    
150                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
151                            }
152                    }
153                    catch (com.liferay.portal.kernel.exception.SystemException se) {
154                            _log.error(se, se);
155    
156                            throw se;
157                    }
158            }
159    
160            public static com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder(
161                    HttpPrincipal httpPrincipal, long folderId)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException {
164                    try {
165                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
166                                            "getFolder", _getFolderParameterTypes3);
167    
168                            MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
169    
170                            Object returnObj = null;
171    
172                            try {
173                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
174                            }
175                            catch (Exception e) {
176                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
177                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
178                                    }
179    
180                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
181                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
182                                    }
183    
184                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
185                            }
186    
187                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
188                    }
189                    catch (com.liferay.portal.kernel.exception.SystemException se) {
190                            _log.error(se, se);
191    
192                            throw se;
193                    }
194            }
195    
196            public static java.util.List<java.lang.Long> getFolderIds(
197                    HttpPrincipal httpPrincipal, long groupId, long folderId)
198                    throws com.liferay.portal.kernel.exception.PortalException,
199                            com.liferay.portal.kernel.exception.SystemException {
200                    try {
201                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
202                                            "getFolderIds", _getFolderIdsParameterTypes4);
203    
204                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
205                                            folderId);
206    
207                            Object returnObj = null;
208    
209                            try {
210                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
211                            }
212                            catch (Exception e) {
213                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
214                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
215                                    }
216    
217                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
218                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
219                                    }
220    
221                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
222                            }
223    
224                            return (java.util.List<java.lang.Long>)returnObj;
225                    }
226                    catch (com.liferay.portal.kernel.exception.SystemException se) {
227                            _log.error(se, se);
228    
229                            throw se;
230                    }
231            }
232    
233            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
234                    HttpPrincipal httpPrincipal, long groupId)
235                    throws com.liferay.portal.kernel.exception.SystemException {
236                    try {
237                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
238                                            "getFolders", _getFoldersParameterTypes5);
239    
240                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
241    
242                            Object returnObj = null;
243    
244                            try {
245                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
246                            }
247                            catch (Exception e) {
248                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
249                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
250                                    }
251    
252                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
253                            }
254    
255                            return (java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder>)returnObj;
256                    }
257                    catch (com.liferay.portal.kernel.exception.SystemException se) {
258                            _log.error(se, se);
259    
260                            throw se;
261                    }
262            }
263    
264            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
265                    HttpPrincipal httpPrincipal, long groupId, long parentFolderId)
266                    throws com.liferay.portal.kernel.exception.SystemException {
267                    try {
268                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
269                                            "getFolders", _getFoldersParameterTypes6);
270    
271                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
272                                            parentFolderId);
273    
274                            Object returnObj = null;
275    
276                            try {
277                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
278                            }
279                            catch (Exception e) {
280                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
281                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
282                                    }
283    
284                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
285                            }
286    
287                            return (java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder>)returnObj;
288                    }
289                    catch (com.liferay.portal.kernel.exception.SystemException se) {
290                            _log.error(se, se);
291    
292                            throw se;
293                    }
294            }
295    
296            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
297                    HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
298                    int start, int end)
299                    throws com.liferay.portal.kernel.exception.SystemException {
300                    try {
301                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
302                                            "getFolders", _getFoldersParameterTypes7);
303    
304                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
305                                            parentFolderId, start, end);
306    
307                            Object returnObj = null;
308    
309                            try {
310                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
311                            }
312                            catch (Exception e) {
313                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
314                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
315                                    }
316    
317                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
318                            }
319    
320                            return (java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder>)returnObj;
321                    }
322                    catch (com.liferay.portal.kernel.exception.SystemException se) {
323                            _log.error(se, se);
324    
325                            throw se;
326                    }
327            }
328    
329            public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
330                    HttpPrincipal httpPrincipal, long groupId, long parentFolderId,
331                    int status, int start, int end)
332                    throws com.liferay.portal.kernel.exception.SystemException {
333                    try {
334                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
335                                            "getFolders", _getFoldersParameterTypes8);
336    
337                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
338                                            parentFolderId, status, start, end);
339    
340                            Object returnObj = null;
341    
342                            try {
343                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
344                            }
345                            catch (Exception e) {
346                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
347                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
348                                    }
349    
350                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
351                            }
352    
353                            return (java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder>)returnObj;
354                    }
355                    catch (com.liferay.portal.kernel.exception.SystemException se) {
356                            _log.error(se, se);
357    
358                            throw se;
359                    }
360            }
361    
362            public static java.util.List<java.lang.Object> getFoldersAndEntries(
363                    HttpPrincipal httpPrincipal, long groupId, long folderId)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    try {
366                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
367                                            "getFoldersAndEntries", _getFoldersAndEntriesParameterTypes9);
368    
369                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
370                                            folderId);
371    
372                            Object returnObj = null;
373    
374                            try {
375                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
376                            }
377                            catch (Exception e) {
378                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
379                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
380                                    }
381    
382                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
383                            }
384    
385                            return (java.util.List<java.lang.Object>)returnObj;
386                    }
387                    catch (com.liferay.portal.kernel.exception.SystemException se) {
388                            _log.error(se, se);
389    
390                            throw se;
391                    }
392            }
393    
394            public static java.util.List<java.lang.Object> getFoldersAndEntries(
395                    HttpPrincipal httpPrincipal, long groupId, long folderId, int status)
396                    throws com.liferay.portal.kernel.exception.SystemException {
397                    try {
398                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
399                                            "getFoldersAndEntries",
400                                            _getFoldersAndEntriesParameterTypes10);
401    
402                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
403                                            folderId, status);
404    
405                            Object returnObj = null;
406    
407                            try {
408                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
409                            }
410                            catch (Exception e) {
411                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
412                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
413                                    }
414    
415                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
416                            }
417    
418                            return (java.util.List<java.lang.Object>)returnObj;
419                    }
420                    catch (com.liferay.portal.kernel.exception.SystemException se) {
421                            _log.error(se, se);
422    
423                            throw se;
424                    }
425            }
426    
427            public static java.util.List<java.lang.Object> getFoldersAndEntries(
428                    HttpPrincipal httpPrincipal, long groupId, long folderId, int status,
429                    int start, int end)
430                    throws com.liferay.portal.kernel.exception.SystemException {
431                    try {
432                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
433                                            "getFoldersAndEntries",
434                                            _getFoldersAndEntriesParameterTypes11);
435    
436                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
437                                            folderId, status, start, end);
438    
439                            Object returnObj = null;
440    
441                            try {
442                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
443                            }
444                            catch (Exception e) {
445                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
446                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
447                                    }
448    
449                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
450                            }
451    
452                            return (java.util.List<java.lang.Object>)returnObj;
453                    }
454                    catch (com.liferay.portal.kernel.exception.SystemException se) {
455                            _log.error(se, se);
456    
457                            throw se;
458                    }
459            }
460    
461            public static int getFoldersAndEntriesCount(HttpPrincipal httpPrincipal,
462                    long groupId, long folderId)
463                    throws com.liferay.portal.kernel.exception.SystemException {
464                    try {
465                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
466                                            "getFoldersAndEntriesCount",
467                                            _getFoldersAndEntriesCountParameterTypes12);
468    
469                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
470                                            folderId);
471    
472                            Object returnObj = null;
473    
474                            try {
475                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
476                            }
477                            catch (Exception e) {
478                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
479                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
480                                    }
481    
482                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
483                            }
484    
485                            return ((Integer)returnObj).intValue();
486                    }
487                    catch (com.liferay.portal.kernel.exception.SystemException se) {
488                            _log.error(se, se);
489    
490                            throw se;
491                    }
492            }
493    
494            public static int getFoldersAndEntriesCount(HttpPrincipal httpPrincipal,
495                    long groupId, long folderId, int status)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    try {
498                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
499                                            "getFoldersAndEntriesCount",
500                                            _getFoldersAndEntriesCountParameterTypes13);
501    
502                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
503                                            folderId, status);
504    
505                            Object returnObj = null;
506    
507                            try {
508                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
509                            }
510                            catch (Exception e) {
511                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
512                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
513                                    }
514    
515                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
516                            }
517    
518                            return ((Integer)returnObj).intValue();
519                    }
520                    catch (com.liferay.portal.kernel.exception.SystemException se) {
521                            _log.error(se, se);
522    
523                            throw se;
524                    }
525            }
526    
527            public static int getFoldersCount(HttpPrincipal httpPrincipal,
528                    long groupId, long parentFolderId)
529                    throws com.liferay.portal.kernel.exception.SystemException {
530                    try {
531                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
532                                            "getFoldersCount", _getFoldersCountParameterTypes14);
533    
534                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
535                                            parentFolderId);
536    
537                            Object returnObj = null;
538    
539                            try {
540                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
541                            }
542                            catch (Exception e) {
543                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
544                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
545                                    }
546    
547                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
548                            }
549    
550                            return ((Integer)returnObj).intValue();
551                    }
552                    catch (com.liferay.portal.kernel.exception.SystemException se) {
553                            _log.error(se, se);
554    
555                            throw se;
556                    }
557            }
558    
559            public static int getFoldersCount(HttpPrincipal httpPrincipal,
560                    long groupId, long parentFolderId, int status)
561                    throws com.liferay.portal.kernel.exception.SystemException {
562                    try {
563                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
564                                            "getFoldersCount", _getFoldersCountParameterTypes15);
565    
566                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
567                                            parentFolderId, status);
568    
569                            Object returnObj = null;
570    
571                            try {
572                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
573                            }
574                            catch (Exception e) {
575                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
576                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
577                                    }
578    
579                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
580                            }
581    
582                            return ((Integer)returnObj).intValue();
583                    }
584                    catch (com.liferay.portal.kernel.exception.SystemException se) {
585                            _log.error(se, se);
586    
587                            throw se;
588                    }
589            }
590    
591            public static void getSubfolderIds(HttpPrincipal httpPrincipal,
592                    java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
593                    throws com.liferay.portal.kernel.exception.SystemException {
594                    try {
595                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
596                                            "getSubfolderIds", _getSubfolderIdsParameterTypes16);
597    
598                            MethodHandler methodHandler = new MethodHandler(methodKey,
599                                            folderIds, groupId, folderId);
600    
601                            try {
602                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
603                            }
604                            catch (Exception e) {
605                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
606                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
607                                    }
608    
609                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
610                            }
611                    }
612                    catch (com.liferay.portal.kernel.exception.SystemException se) {
613                            _log.error(se, se);
614    
615                            throw se;
616                    }
617            }
618    
619            public static java.util.List<java.lang.Long> getSubfolderIds(
620                    HttpPrincipal httpPrincipal, long groupId, long folderId,
621                    boolean recurse)
622                    throws com.liferay.portal.kernel.exception.SystemException {
623                    try {
624                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
625                                            "getSubfolderIds", _getSubfolderIdsParameterTypes17);
626    
627                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
628                                            folderId, recurse);
629    
630                            Object returnObj = null;
631    
632                            try {
633                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
634                            }
635                            catch (Exception e) {
636                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
637                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
638                                    }
639    
640                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
641                            }
642    
643                            return (java.util.List<java.lang.Long>)returnObj;
644                    }
645                    catch (com.liferay.portal.kernel.exception.SystemException se) {
646                            _log.error(se, se);
647    
648                            throw se;
649                    }
650            }
651    
652            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolder(
653                    HttpPrincipal httpPrincipal, long folderId, long parentFolderId)
654                    throws com.liferay.portal.kernel.exception.PortalException,
655                            com.liferay.portal.kernel.exception.SystemException {
656                    try {
657                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
658                                            "moveFolder", _moveFolderParameterTypes18);
659    
660                            MethodHandler methodHandler = new MethodHandler(methodKey,
661                                            folderId, parentFolderId);
662    
663                            Object returnObj = null;
664    
665                            try {
666                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
667                            }
668                            catch (Exception e) {
669                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
670                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
671                                    }
672    
673                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
674                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
675                                    }
676    
677                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
678                            }
679    
680                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
681                    }
682                    catch (com.liferay.portal.kernel.exception.SystemException se) {
683                            _log.error(se, se);
684    
685                            throw se;
686                    }
687            }
688    
689            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolderFromTrash(
690                    HttpPrincipal httpPrincipal, long folderId, long parentFolderId)
691                    throws com.liferay.portal.kernel.exception.PortalException,
692                            com.liferay.portal.kernel.exception.SystemException {
693                    try {
694                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
695                                            "moveFolderFromTrash", _moveFolderFromTrashParameterTypes19);
696    
697                            MethodHandler methodHandler = new MethodHandler(methodKey,
698                                            folderId, parentFolderId);
699    
700                            Object returnObj = null;
701    
702                            try {
703                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
704                            }
705                            catch (Exception e) {
706                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
707                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
708                                    }
709    
710                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
711                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
712                                    }
713    
714                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
715                            }
716    
717                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
718                    }
719                    catch (com.liferay.portal.kernel.exception.SystemException se) {
720                            _log.error(se, se);
721    
722                            throw se;
723                    }
724            }
725    
726            public static void moveFolderToTrash(HttpPrincipal httpPrincipal,
727                    long folderId)
728                    throws com.liferay.portal.kernel.exception.PortalException,
729                            com.liferay.portal.kernel.exception.SystemException {
730                    try {
731                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
732                                            "moveFolderToTrash", _moveFolderToTrashParameterTypes20);
733    
734                            MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
735    
736                            try {
737                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
738                            }
739                            catch (Exception e) {
740                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
741                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
742                                    }
743    
744                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
745                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
746                                    }
747    
748                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
749                            }
750                    }
751                    catch (com.liferay.portal.kernel.exception.SystemException se) {
752                            _log.error(se, se);
753    
754                            throw se;
755                    }
756            }
757    
758            public static void restoreFolderFromTrash(HttpPrincipal httpPrincipal,
759                    long folderId)
760                    throws com.liferay.portal.kernel.exception.PortalException,
761                            com.liferay.portal.kernel.exception.SystemException {
762                    try {
763                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
764                                            "restoreFolderFromTrash",
765                                            _restoreFolderFromTrashParameterTypes21);
766    
767                            MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
768    
769                            try {
770                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
771                            }
772                            catch (Exception e) {
773                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
774                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
775                                    }
776    
777                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
778                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
779                                    }
780    
781                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
782                            }
783                    }
784                    catch (com.liferay.portal.kernel.exception.SystemException se) {
785                            _log.error(se, se);
786    
787                            throw se;
788                    }
789            }
790    
791            public static void subscribeFolder(HttpPrincipal httpPrincipal,
792                    long groupId, long folderId)
793                    throws com.liferay.portal.kernel.exception.PortalException,
794                            com.liferay.portal.kernel.exception.SystemException {
795                    try {
796                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
797                                            "subscribeFolder", _subscribeFolderParameterTypes22);
798    
799                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
800                                            folderId);
801    
802                            try {
803                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
804                            }
805                            catch (Exception e) {
806                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
807                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
808                                    }
809    
810                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
811                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
812                                    }
813    
814                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
815                            }
816                    }
817                    catch (com.liferay.portal.kernel.exception.SystemException se) {
818                            _log.error(se, se);
819    
820                            throw se;
821                    }
822            }
823    
824            public static void unsubscribeFolder(HttpPrincipal httpPrincipal,
825                    long groupId, long folderId)
826                    throws com.liferay.portal.kernel.exception.PortalException,
827                            com.liferay.portal.kernel.exception.SystemException {
828                    try {
829                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
830                                            "unsubscribeFolder", _unsubscribeFolderParameterTypes23);
831    
832                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
833                                            folderId);
834    
835                            try {
836                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
837                            }
838                            catch (Exception e) {
839                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
840                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
841                                    }
842    
843                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
844                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
845                                    }
846    
847                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
848                            }
849                    }
850                    catch (com.liferay.portal.kernel.exception.SystemException se) {
851                            _log.error(se, se);
852    
853                            throw se;
854                    }
855            }
856    
857            public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateFolder(
858                    HttpPrincipal httpPrincipal, long folderId, long parentFolderId,
859                    java.lang.String name, java.lang.String description,
860                    boolean mergeWithParentFolder,
861                    com.liferay.portal.service.ServiceContext serviceContext)
862                    throws com.liferay.portal.kernel.exception.PortalException,
863                            com.liferay.portal.kernel.exception.SystemException {
864                    try {
865                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
866                                            "updateFolder", _updateFolderParameterTypes24);
867    
868                            MethodHandler methodHandler = new MethodHandler(methodKey,
869                                            folderId, parentFolderId, name, description,
870                                            mergeWithParentFolder, serviceContext);
871    
872                            Object returnObj = null;
873    
874                            try {
875                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
876                            }
877                            catch (Exception e) {
878                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
879                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
880                                    }
881    
882                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
883                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
884                                    }
885    
886                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
887                            }
888    
889                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
890                    }
891                    catch (com.liferay.portal.kernel.exception.SystemException se) {
892                            _log.error(se, se);
893    
894                            throw se;
895                    }
896            }
897    
898            private static Log _log = LogFactoryUtil.getLog(BookmarksFolderServiceHttp.class);
899            private static final Class<?>[] _addFolderParameterTypes0 = new Class[] {
900                            long.class, java.lang.String.class, java.lang.String.class,
901                            com.liferay.portal.service.ServiceContext.class
902                    };
903            private static final Class<?>[] _deleteFolderParameterTypes1 = new Class[] {
904                            long.class
905                    };
906            private static final Class<?>[] _deleteFolderParameterTypes2 = new Class[] {
907                            long.class, boolean.class
908                    };
909            private static final Class<?>[] _getFolderParameterTypes3 = new Class[] {
910                            long.class
911                    };
912            private static final Class<?>[] _getFolderIdsParameterTypes4 = new Class[] {
913                            long.class, long.class
914                    };
915            private static final Class<?>[] _getFoldersParameterTypes5 = new Class[] {
916                            long.class
917                    };
918            private static final Class<?>[] _getFoldersParameterTypes6 = new Class[] {
919                            long.class, long.class
920                    };
921            private static final Class<?>[] _getFoldersParameterTypes7 = new Class[] {
922                            long.class, long.class, int.class, int.class
923                    };
924            private static final Class<?>[] _getFoldersParameterTypes8 = new Class[] {
925                            long.class, long.class, int.class, int.class, int.class
926                    };
927            private static final Class<?>[] _getFoldersAndEntriesParameterTypes9 = new Class[] {
928                            long.class, long.class
929                    };
930            private static final Class<?>[] _getFoldersAndEntriesParameterTypes10 = new Class[] {
931                            long.class, long.class, int.class
932                    };
933            private static final Class<?>[] _getFoldersAndEntriesParameterTypes11 = new Class[] {
934                            long.class, long.class, int.class, int.class, int.class
935                    };
936            private static final Class<?>[] _getFoldersAndEntriesCountParameterTypes12 = new Class[] {
937                            long.class, long.class
938                    };
939            private static final Class<?>[] _getFoldersAndEntriesCountParameterTypes13 = new Class[] {
940                            long.class, long.class, int.class
941                    };
942            private static final Class<?>[] _getFoldersCountParameterTypes14 = new Class[] {
943                            long.class, long.class
944                    };
945            private static final Class<?>[] _getFoldersCountParameterTypes15 = new Class[] {
946                            long.class, long.class, int.class
947                    };
948            private static final Class<?>[] _getSubfolderIdsParameterTypes16 = new Class[] {
949                            java.util.List.class, long.class, long.class
950                    };
951            private static final Class<?>[] _getSubfolderIdsParameterTypes17 = new Class[] {
952                            long.class, long.class, boolean.class
953                    };
954            private static final Class<?>[] _moveFolderParameterTypes18 = new Class[] {
955                            long.class, long.class
956                    };
957            private static final Class<?>[] _moveFolderFromTrashParameterTypes19 = new Class[] {
958                            long.class, long.class
959                    };
960            private static final Class<?>[] _moveFolderToTrashParameterTypes20 = new Class[] {
961                            long.class
962                    };
963            private static final Class<?>[] _restoreFolderFromTrashParameterTypes21 = new Class[] {
964                            long.class
965                    };
966            private static final Class<?>[] _subscribeFolderParameterTypes22 = new Class[] {
967                            long.class, long.class
968                    };
969            private static final Class<?>[] _unsubscribeFolderParameterTypes23 = new Class[] {
970                            long.class, long.class
971                    };
972            private static final Class<?>[] _updateFolderParameterTypes24 = new Class[] {
973                            long.class, long.class, java.lang.String.class,
974                            java.lang.String.class, boolean.class,
975                            com.liferay.portal.service.ServiceContext.class
976                    };
977    }