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 java.util.List<java.lang.Long> getSubfolderIds(
618                    HttpPrincipal httpPrincipal, 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, groupId,
626                                            folderId, recurse);
627    
628                            Object returnObj = null;
629    
630                            try {
631                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
632                            }
633                            catch (Exception e) {
634                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
635                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
636                                    }
637    
638                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
639                            }
640    
641                            return (java.util.List<java.lang.Long>)returnObj;
642                    }
643                    catch (com.liferay.portal.kernel.exception.SystemException se) {
644                            _log.error(se, se);
645    
646                            throw se;
647                    }
648            }
649    
650            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolder(
651                    HttpPrincipal httpPrincipal, long folderId, long parentFolderId)
652                    throws com.liferay.portal.kernel.exception.PortalException,
653                            com.liferay.portal.kernel.exception.SystemException {
654                    try {
655                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
656                                            "moveFolder", _moveFolderParameterTypes18);
657    
658                            MethodHandler methodHandler = new MethodHandler(methodKey,
659                                            folderId, parentFolderId);
660    
661                            Object returnObj = null;
662    
663                            try {
664                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
665                            }
666                            catch (Exception e) {
667                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
668                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
669                                    }
670    
671                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
672                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
673                                    }
674    
675                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
676                            }
677    
678                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
679                    }
680                    catch (com.liferay.portal.kernel.exception.SystemException se) {
681                            _log.error(se, se);
682    
683                            throw se;
684                    }
685            }
686    
687            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolderFromTrash(
688                    HttpPrincipal httpPrincipal, long folderId, long parentFolderId)
689                    throws com.liferay.portal.kernel.exception.PortalException,
690                            com.liferay.portal.kernel.exception.SystemException {
691                    try {
692                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
693                                            "moveFolderFromTrash", _moveFolderFromTrashParameterTypes19);
694    
695                            MethodHandler methodHandler = new MethodHandler(methodKey,
696                                            folderId, parentFolderId);
697    
698                            Object returnObj = null;
699    
700                            try {
701                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
702                            }
703                            catch (Exception e) {
704                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
705                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
706                                    }
707    
708                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
709                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
710                                    }
711    
712                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
713                            }
714    
715                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
716                    }
717                    catch (com.liferay.portal.kernel.exception.SystemException se) {
718                            _log.error(se, se);
719    
720                            throw se;
721                    }
722            }
723    
724            public static com.liferay.portlet.bookmarks.model.BookmarksFolder moveFolderToTrash(
725                    HttpPrincipal httpPrincipal, long folderId)
726                    throws com.liferay.portal.kernel.exception.PortalException,
727                            com.liferay.portal.kernel.exception.SystemException {
728                    try {
729                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
730                                            "moveFolderToTrash", _moveFolderToTrashParameterTypes20);
731    
732                            MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
733    
734                            Object returnObj = null;
735    
736                            try {
737                                    returnObj = 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                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
752                    }
753                    catch (com.liferay.portal.kernel.exception.SystemException se) {
754                            _log.error(se, se);
755    
756                            throw se;
757                    }
758            }
759    
760            public static void restoreFolderFromTrash(HttpPrincipal httpPrincipal,
761                    long folderId)
762                    throws com.liferay.portal.kernel.exception.PortalException,
763                            com.liferay.portal.kernel.exception.SystemException {
764                    try {
765                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
766                                            "restoreFolderFromTrash",
767                                            _restoreFolderFromTrashParameterTypes21);
768    
769                            MethodHandler methodHandler = new MethodHandler(methodKey, folderId);
770    
771                            try {
772                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
773                            }
774                            catch (Exception e) {
775                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
776                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
777                                    }
778    
779                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
780                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
781                                    }
782    
783                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
784                            }
785                    }
786                    catch (com.liferay.portal.kernel.exception.SystemException se) {
787                            _log.error(se, se);
788    
789                            throw se;
790                    }
791            }
792    
793            public static void subscribeFolder(HttpPrincipal httpPrincipal,
794                    long groupId, long folderId)
795                    throws com.liferay.portal.kernel.exception.PortalException,
796                            com.liferay.portal.kernel.exception.SystemException {
797                    try {
798                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
799                                            "subscribeFolder", _subscribeFolderParameterTypes22);
800    
801                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
802                                            folderId);
803    
804                            try {
805                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
806                            }
807                            catch (Exception e) {
808                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
809                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
810                                    }
811    
812                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
813                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
814                                    }
815    
816                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
817                            }
818                    }
819                    catch (com.liferay.portal.kernel.exception.SystemException se) {
820                            _log.error(se, se);
821    
822                            throw se;
823                    }
824            }
825    
826            public static void unsubscribeFolder(HttpPrincipal httpPrincipal,
827                    long groupId, long folderId)
828                    throws com.liferay.portal.kernel.exception.PortalException,
829                            com.liferay.portal.kernel.exception.SystemException {
830                    try {
831                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
832                                            "unsubscribeFolder", _unsubscribeFolderParameterTypes23);
833    
834                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
835                                            folderId);
836    
837                            try {
838                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
839                            }
840                            catch (Exception e) {
841                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
842                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
843                                    }
844    
845                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
846                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
847                                    }
848    
849                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
850                            }
851                    }
852                    catch (com.liferay.portal.kernel.exception.SystemException se) {
853                            _log.error(se, se);
854    
855                            throw se;
856                    }
857            }
858    
859            public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateFolder(
860                    HttpPrincipal httpPrincipal, long folderId, long parentFolderId,
861                    java.lang.String name, java.lang.String description,
862                    boolean mergeWithParentFolder,
863                    com.liferay.portal.service.ServiceContext serviceContext)
864                    throws com.liferay.portal.kernel.exception.PortalException,
865                            com.liferay.portal.kernel.exception.SystemException {
866                    try {
867                            MethodKey methodKey = new MethodKey(BookmarksFolderServiceUtil.class,
868                                            "updateFolder", _updateFolderParameterTypes24);
869    
870                            MethodHandler methodHandler = new MethodHandler(methodKey,
871                                            folderId, parentFolderId, name, description,
872                                            mergeWithParentFolder, serviceContext);
873    
874                            Object returnObj = null;
875    
876                            try {
877                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
878                            }
879                            catch (Exception e) {
880                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
881                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
882                                    }
883    
884                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
885                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
886                                    }
887    
888                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
889                            }
890    
891                            return (com.liferay.portlet.bookmarks.model.BookmarksFolder)returnObj;
892                    }
893                    catch (com.liferay.portal.kernel.exception.SystemException se) {
894                            _log.error(se, se);
895    
896                            throw se;
897                    }
898            }
899    
900            private static Log _log = LogFactoryUtil.getLog(BookmarksFolderServiceHttp.class);
901            private static final Class<?>[] _addFolderParameterTypes0 = new Class[] {
902                            long.class, java.lang.String.class, java.lang.String.class,
903                            com.liferay.portal.service.ServiceContext.class
904                    };
905            private static final Class<?>[] _deleteFolderParameterTypes1 = new Class[] {
906                            long.class
907                    };
908            private static final Class<?>[] _deleteFolderParameterTypes2 = new Class[] {
909                            long.class, boolean.class
910                    };
911            private static final Class<?>[] _getFolderParameterTypes3 = new Class[] {
912                            long.class
913                    };
914            private static final Class<?>[] _getFolderIdsParameterTypes4 = new Class[] {
915                            long.class, long.class
916                    };
917            private static final Class<?>[] _getFoldersParameterTypes5 = new Class[] {
918                            long.class
919                    };
920            private static final Class<?>[] _getFoldersParameterTypes6 = new Class[] {
921                            long.class, long.class
922                    };
923            private static final Class<?>[] _getFoldersParameterTypes7 = new Class[] {
924                            long.class, long.class, int.class, int.class
925                    };
926            private static final Class<?>[] _getFoldersParameterTypes8 = new Class[] {
927                            long.class, long.class, int.class, int.class, int.class
928                    };
929            private static final Class<?>[] _getFoldersAndEntriesParameterTypes9 = new Class[] {
930                            long.class, long.class
931                    };
932            private static final Class<?>[] _getFoldersAndEntriesParameterTypes10 = new Class[] {
933                            long.class, long.class, int.class
934                    };
935            private static final Class<?>[] _getFoldersAndEntriesParameterTypes11 = new Class[] {
936                            long.class, long.class, int.class, int.class, int.class
937                    };
938            private static final Class<?>[] _getFoldersAndEntriesCountParameterTypes12 = new Class[] {
939                            long.class, long.class
940                    };
941            private static final Class<?>[] _getFoldersAndEntriesCountParameterTypes13 = new Class[] {
942                            long.class, long.class, int.class
943                    };
944            private static final Class<?>[] _getFoldersCountParameterTypes14 = new Class[] {
945                            long.class, long.class
946                    };
947            private static final Class<?>[] _getFoldersCountParameterTypes15 = new Class[] {
948                            long.class, long.class, int.class
949                    };
950            private static final Class<?>[] _getSubfolderIdsParameterTypes16 = new Class[] {
951                            java.util.List.class, long.class, long.class
952                    };
953            private static final Class<?>[] _getSubfolderIdsParameterTypes17 = new Class[] {
954                            long.class, long.class, boolean.class
955                    };
956            private static final Class<?>[] _moveFolderParameterTypes18 = new Class[] {
957                            long.class, long.class
958                    };
959            private static final Class<?>[] _moveFolderFromTrashParameterTypes19 = new Class[] {
960                            long.class, long.class
961                    };
962            private static final Class<?>[] _moveFolderToTrashParameterTypes20 = new Class[] {
963                            long.class
964                    };
965            private static final Class<?>[] _restoreFolderFromTrashParameterTypes21 = new Class[] {
966                            long.class
967                    };
968            private static final Class<?>[] _subscribeFolderParameterTypes22 = new Class[] {
969                            long.class, long.class
970                    };
971            private static final Class<?>[] _unsubscribeFolderParameterTypes23 = new Class[] {
972                            long.class, long.class
973                    };
974            private static final Class<?>[] _updateFolderParameterTypes24 = new Class[] {
975                            long.class, long.class, java.lang.String.class,
976                            java.lang.String.class, boolean.class,
977                            com.liferay.portal.service.ServiceContext.class
978                    };
979    }