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