001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.http;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.util.MethodHandler;
022    import com.liferay.portal.kernel.util.MethodKey;
023    import com.liferay.portal.security.auth.HttpPrincipal;
024    import com.liferay.portal.service.http.TunnelUtil;
025    
026    import com.liferay.portlet.messageboards.service.MBCategoryServiceUtil;
027    
028    /**
029     * Provides the HTTP utility for the
030     * {@link MBCategoryServiceUtil} service utility. The
031     * static methods of this class calls the same methods of the service utility.
032     * However, the signatures are different because it requires an additional
033     * {@link HttpPrincipal} parameter.
034     *
035     * <p>
036     * The benefits of using the HTTP utility is that it is fast and allows for
037     * tunneling without the cost of serializing to text. The drawback is that it
038     * only works with Java.
039     * </p>
040     *
041     * <p>
042     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
043     * configure security.
044     * </p>
045     *
046     * <p>
047     * The HTTP utility is only generated for remote services.
048     * </p>
049     *
050     * @author Brian Wing Shun Chan
051     * @see MBCategoryServiceSoap
052     * @see HttpPrincipal
053     * @see MBCategoryServiceUtil
054     * @generated
055     */
056    @ProviderType
057    public class MBCategoryServiceHttp {
058            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
059                    HttpPrincipal httpPrincipal, long userId, long parentCategoryId,
060                    java.lang.String name, java.lang.String description,
061                    com.liferay.portal.service.ServiceContext serviceContext)
062                    throws com.liferay.portal.kernel.exception.PortalException {
063                    try {
064                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
065                                            "addCategory", _addCategoryParameterTypes0);
066    
067                            MethodHandler methodHandler = new MethodHandler(methodKey, userId,
068                                            parentCategoryId, name, description, serviceContext);
069    
070                            Object returnObj = null;
071    
072                            try {
073                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
074                            }
075                            catch (Exception e) {
076                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
077                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
078                                    }
079    
080                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
081                            }
082    
083                            return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
084                    }
085                    catch (com.liferay.portal.kernel.exception.SystemException se) {
086                            _log.error(se, se);
087    
088                            throw se;
089                    }
090            }
091    
092            public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
093                    HttpPrincipal httpPrincipal, long parentCategoryId,
094                    java.lang.String name, java.lang.String description,
095                    java.lang.String displayStyle, java.lang.String emailAddress,
096                    java.lang.String inProtocol, java.lang.String inServerName,
097                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
098                    java.lang.String inPassword, int inReadInterval,
099                    java.lang.String outEmailAddress, boolean outCustom,
100                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
101                    java.lang.String outUserName, java.lang.String outPassword,
102                    boolean mailingListActive, boolean allowAnonymousEmail,
103                    com.liferay.portal.service.ServiceContext serviceContext)
104                    throws com.liferay.portal.kernel.exception.PortalException {
105                    try {
106                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
107                                            "addCategory", _addCategoryParameterTypes1);
108    
109                            MethodHandler methodHandler = new MethodHandler(methodKey,
110                                            parentCategoryId, name, description, displayStyle,
111                                            emailAddress, inProtocol, inServerName, inServerPort,
112                                            inUseSSL, inUserName, inPassword, inReadInterval,
113                                            outEmailAddress, outCustom, outServerName, outServerPort,
114                                            outUseSSL, outUserName, outPassword, mailingListActive,
115                                            allowAnonymousEmail, serviceContext);
116    
117                            Object returnObj = null;
118    
119                            try {
120                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
121                            }
122                            catch (Exception e) {
123                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
124                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
125                                    }
126    
127                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
128                            }
129    
130                            return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
131                    }
132                    catch (com.liferay.portal.kernel.exception.SystemException se) {
133                            _log.error(se, se);
134    
135                            throw se;
136                    }
137            }
138    
139            public static void deleteCategory(HttpPrincipal httpPrincipal,
140                    long categoryId, boolean includeTrashedEntries)
141                    throws com.liferay.portal.kernel.exception.PortalException {
142                    try {
143                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
144                                            "deleteCategory", _deleteCategoryParameterTypes2);
145    
146                            MethodHandler methodHandler = new MethodHandler(methodKey,
147                                            categoryId, includeTrashedEntries);
148    
149                            try {
150                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
151                            }
152                            catch (Exception e) {
153                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
154                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
155                                    }
156    
157                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
158                            }
159                    }
160                    catch (com.liferay.portal.kernel.exception.SystemException se) {
161                            _log.error(se, se);
162    
163                            throw se;
164                    }
165            }
166    
167            public static void deleteCategory(HttpPrincipal httpPrincipal,
168                    long groupId, long categoryId)
169                    throws com.liferay.portal.kernel.exception.PortalException {
170                    try {
171                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
172                                            "deleteCategory", _deleteCategoryParameterTypes3);
173    
174                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
175                                            categoryId);
176    
177                            try {
178                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
179                            }
180                            catch (Exception e) {
181                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
182                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
183                                    }
184    
185                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
186                            }
187                    }
188                    catch (com.liferay.portal.kernel.exception.SystemException se) {
189                            _log.error(se, se);
190    
191                            throw se;
192                    }
193            }
194    
195            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
196                    HttpPrincipal httpPrincipal, long groupId) {
197                    try {
198                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
199                                            "getCategories", _getCategoriesParameterTypes4);
200    
201                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
202    
203                            Object returnObj = null;
204    
205                            try {
206                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
207                            }
208                            catch (Exception e) {
209                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
210                            }
211    
212                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
213                    }
214                    catch (com.liferay.portal.kernel.exception.SystemException se) {
215                            _log.error(se, se);
216    
217                            throw se;
218                    }
219            }
220    
221            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
222                    HttpPrincipal httpPrincipal, long groupId, int status) {
223                    try {
224                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
225                                            "getCategories", _getCategoriesParameterTypes5);
226    
227                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
228                                            status);
229    
230                            Object returnObj = null;
231    
232                            try {
233                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
234                            }
235                            catch (Exception e) {
236                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
237                            }
238    
239                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
240                    }
241                    catch (com.liferay.portal.kernel.exception.SystemException se) {
242                            _log.error(se, se);
243    
244                            throw se;
245                    }
246            }
247    
248            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
249                    HttpPrincipal httpPrincipal, long groupId, long parentCategoryId,
250                    int start, int end) {
251                    try {
252                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
253                                            "getCategories", _getCategoriesParameterTypes6);
254    
255                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
256                                            parentCategoryId, start, end);
257    
258                            Object returnObj = null;
259    
260                            try {
261                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
262                            }
263                            catch (Exception e) {
264                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
265                            }
266    
267                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
268                    }
269                    catch (com.liferay.portal.kernel.exception.SystemException se) {
270                            _log.error(se, se);
271    
272                            throw se;
273                    }
274            }
275    
276            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
277                    HttpPrincipal httpPrincipal, long groupId, long parentCategoryId,
278                    int status, int start, int end) {
279                    try {
280                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
281                                            "getCategories", _getCategoriesParameterTypes7);
282    
283                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
284                                            parentCategoryId, status, start, end);
285    
286                            Object returnObj = null;
287    
288                            try {
289                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
290                            }
291                            catch (Exception e) {
292                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
293                            }
294    
295                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
296                    }
297                    catch (com.liferay.portal.kernel.exception.SystemException se) {
298                            _log.error(se, se);
299    
300                            throw se;
301                    }
302            }
303    
304            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
305                    HttpPrincipal httpPrincipal, long groupId, long excludedCategoryId,
306                    long parentCategoryId, int status, int start, int end) {
307                    try {
308                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
309                                            "getCategories", _getCategoriesParameterTypes8);
310    
311                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
312                                            excludedCategoryId, parentCategoryId, status, start, end);
313    
314                            Object returnObj = null;
315    
316                            try {
317                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
318                            }
319                            catch (Exception e) {
320                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
321                            }
322    
323                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
324                    }
325                    catch (com.liferay.portal.kernel.exception.SystemException se) {
326                            _log.error(se, se);
327    
328                            throw se;
329                    }
330            }
331    
332            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
333                    HttpPrincipal httpPrincipal, long groupId, long[] parentCategoryIds,
334                    int start, int end) {
335                    try {
336                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
337                                            "getCategories", _getCategoriesParameterTypes9);
338    
339                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
340                                            parentCategoryIds, start, end);
341    
342                            Object returnObj = null;
343    
344                            try {
345                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
346                            }
347                            catch (Exception e) {
348                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
349                            }
350    
351                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)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<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
361                    HttpPrincipal httpPrincipal, long groupId, long[] parentCategoryIds,
362                    int status, int start, int end) {
363                    try {
364                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
365                                            "getCategories", _getCategoriesParameterTypes10);
366    
367                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
368                                            parentCategoryIds, status, start, end);
369    
370                            Object returnObj = null;
371    
372                            try {
373                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
374                            }
375                            catch (Exception e) {
376                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
377                            }
378    
379                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
380                    }
381                    catch (com.liferay.portal.kernel.exception.SystemException se) {
382                            _log.error(se, se);
383    
384                            throw se;
385                    }
386            }
387    
388            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
389                    HttpPrincipal httpPrincipal, long groupId, long[] excludedCategoryIds,
390                    long[] parentCategoryIds, int status, int start, int end) {
391                    try {
392                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
393                                            "getCategories", _getCategoriesParameterTypes11);
394    
395                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
396                                            excludedCategoryIds, parentCategoryIds, status, start, end);
397    
398                            Object returnObj = null;
399    
400                            try {
401                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
402                            }
403                            catch (Exception e) {
404                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
405                            }
406    
407                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
408                    }
409                    catch (com.liferay.portal.kernel.exception.SystemException se) {
410                            _log.error(se, se);
411    
412                            throw se;
413                    }
414            }
415    
416            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
417                    HttpPrincipal httpPrincipal, long groupId, long categoryId) {
418                    try {
419                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
420                                            "getCategoriesAndThreads",
421                                            _getCategoriesAndThreadsParameterTypes12);
422    
423                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
424                                            categoryId);
425    
426                            Object returnObj = null;
427    
428                            try {
429                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
430                            }
431                            catch (Exception e) {
432                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
433                            }
434    
435                            return (java.util.List<java.lang.Object>)returnObj;
436                    }
437                    catch (com.liferay.portal.kernel.exception.SystemException se) {
438                            _log.error(se, se);
439    
440                            throw se;
441                    }
442            }
443    
444            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
445                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status) {
446                    try {
447                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
448                                            "getCategoriesAndThreads",
449                                            _getCategoriesAndThreadsParameterTypes13);
450    
451                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
452                                            categoryId, status);
453    
454                            Object returnObj = null;
455    
456                            try {
457                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
458                            }
459                            catch (Exception e) {
460                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
461                            }
462    
463                            return (java.util.List<java.lang.Object>)returnObj;
464                    }
465                    catch (com.liferay.portal.kernel.exception.SystemException se) {
466                            _log.error(se, se);
467    
468                            throw se;
469                    }
470            }
471    
472            public static java.util.List<java.lang.Object> getCategoriesAndThreads(
473                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
474                    int start, int end) {
475                    try {
476                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
477                                            "getCategoriesAndThreads",
478                                            _getCategoriesAndThreadsParameterTypes14);
479    
480                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
481                                            categoryId, status, start, end);
482    
483                            Object returnObj = null;
484    
485                            try {
486                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
487                            }
488                            catch (Exception e) {
489                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
490                            }
491    
492                            return (java.util.List<java.lang.Object>)returnObj;
493                    }
494                    catch (com.liferay.portal.kernel.exception.SystemException se) {
495                            _log.error(se, se);
496    
497                            throw se;
498                    }
499            }
500    
501            public static int getCategoriesAndThreadsCount(
502                    HttpPrincipal httpPrincipal, long groupId, long categoryId) {
503                    try {
504                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
505                                            "getCategoriesAndThreadsCount",
506                                            _getCategoriesAndThreadsCountParameterTypes15);
507    
508                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
509                                            categoryId);
510    
511                            Object returnObj = null;
512    
513                            try {
514                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
515                            }
516                            catch (Exception e) {
517                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
518                            }
519    
520                            return ((Integer)returnObj).intValue();
521                    }
522                    catch (com.liferay.portal.kernel.exception.SystemException se) {
523                            _log.error(se, se);
524    
525                            throw se;
526                    }
527            }
528    
529            public static int getCategoriesAndThreadsCount(
530                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status) {
531                    try {
532                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
533                                            "getCategoriesAndThreadsCount",
534                                            _getCategoriesAndThreadsCountParameterTypes16);
535    
536                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
537                                            categoryId, status);
538    
539                            Object returnObj = null;
540    
541                            try {
542                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
543                            }
544                            catch (Exception e) {
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 getCategoriesCount(HttpPrincipal httpPrincipal,
558                    long groupId, long parentCategoryId) {
559                    try {
560                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
561                                            "getCategoriesCount", _getCategoriesCountParameterTypes17);
562    
563                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
564                                            parentCategoryId);
565    
566                            Object returnObj = null;
567    
568                            try {
569                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
570                            }
571                            catch (Exception e) {
572                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
573                            }
574    
575                            return ((Integer)returnObj).intValue();
576                    }
577                    catch (com.liferay.portal.kernel.exception.SystemException se) {
578                            _log.error(se, se);
579    
580                            throw se;
581                    }
582            }
583    
584            public static int getCategoriesCount(HttpPrincipal httpPrincipal,
585                    long groupId, long parentCategoryId, int status) {
586                    try {
587                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
588                                            "getCategoriesCount", _getCategoriesCountParameterTypes18);
589    
590                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
591                                            parentCategoryId, status);
592    
593                            Object returnObj = null;
594    
595                            try {
596                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
597                            }
598                            catch (Exception e) {
599                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
600                            }
601    
602                            return ((Integer)returnObj).intValue();
603                    }
604                    catch (com.liferay.portal.kernel.exception.SystemException se) {
605                            _log.error(se, se);
606    
607                            throw se;
608                    }
609            }
610    
611            public static int getCategoriesCount(HttpPrincipal httpPrincipal,
612                    long groupId, long excludedCategoryId, long parentCategoryId, int status) {
613                    try {
614                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
615                                            "getCategoriesCount", _getCategoriesCountParameterTypes19);
616    
617                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
618                                            excludedCategoryId, parentCategoryId, status);
619    
620                            Object returnObj = null;
621    
622                            try {
623                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
624                            }
625                            catch (Exception e) {
626                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
627                            }
628    
629                            return ((Integer)returnObj).intValue();
630                    }
631                    catch (com.liferay.portal.kernel.exception.SystemException se) {
632                            _log.error(se, se);
633    
634                            throw se;
635                    }
636            }
637    
638            public static int getCategoriesCount(HttpPrincipal httpPrincipal,
639                    long groupId, long[] parentCategoryIds) {
640                    try {
641                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
642                                            "getCategoriesCount", _getCategoriesCountParameterTypes20);
643    
644                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
645                                            parentCategoryIds);
646    
647                            Object returnObj = null;
648    
649                            try {
650                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
651                            }
652                            catch (Exception e) {
653                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
654                            }
655    
656                            return ((Integer)returnObj).intValue();
657                    }
658                    catch (com.liferay.portal.kernel.exception.SystemException se) {
659                            _log.error(se, se);
660    
661                            throw se;
662                    }
663            }
664    
665            public static int getCategoriesCount(HttpPrincipal httpPrincipal,
666                    long groupId, long[] parentCategoryIds, int status) {
667                    try {
668                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
669                                            "getCategoriesCount", _getCategoriesCountParameterTypes21);
670    
671                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
672                                            parentCategoryIds, status);
673    
674                            Object returnObj = null;
675    
676                            try {
677                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
678                            }
679                            catch (Exception e) {
680                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
681                            }
682    
683                            return ((Integer)returnObj).intValue();
684                    }
685                    catch (com.liferay.portal.kernel.exception.SystemException se) {
686                            _log.error(se, se);
687    
688                            throw se;
689                    }
690            }
691    
692            public static int getCategoriesCount(HttpPrincipal httpPrincipal,
693                    long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
694                    int status) {
695                    try {
696                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
697                                            "getCategoriesCount", _getCategoriesCountParameterTypes22);
698    
699                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
700                                            excludedCategoryIds, parentCategoryIds, status);
701    
702                            Object returnObj = null;
703    
704                            try {
705                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
706                            }
707                            catch (Exception e) {
708                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
709                            }
710    
711                            return ((Integer)returnObj).intValue();
712                    }
713                    catch (com.liferay.portal.kernel.exception.SystemException se) {
714                            _log.error(se, se);
715    
716                            throw se;
717                    }
718            }
719    
720            public static com.liferay.portlet.messageboards.model.MBCategory getCategory(
721                    HttpPrincipal httpPrincipal, long categoryId)
722                    throws com.liferay.portal.kernel.exception.PortalException {
723                    try {
724                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
725                                            "getCategory", _getCategoryParameterTypes23);
726    
727                            MethodHandler methodHandler = new MethodHandler(methodKey,
728                                            categoryId);
729    
730                            Object returnObj = null;
731    
732                            try {
733                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
734                            }
735                            catch (Exception e) {
736                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
737                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
738                                    }
739    
740                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
741                            }
742    
743                            return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
744                    }
745                    catch (com.liferay.portal.kernel.exception.SystemException se) {
746                            _log.error(se, se);
747    
748                            throw se;
749                    }
750            }
751    
752            public static long[] getCategoryIds(HttpPrincipal httpPrincipal,
753                    long groupId, long categoryId) {
754                    try {
755                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
756                                            "getCategoryIds", _getCategoryIdsParameterTypes24);
757    
758                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
759                                            categoryId);
760    
761                            Object returnObj = null;
762    
763                            try {
764                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
765                            }
766                            catch (Exception e) {
767                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
768                            }
769    
770                            return (long[])returnObj;
771                    }
772                    catch (com.liferay.portal.kernel.exception.SystemException se) {
773                            _log.error(se, se);
774    
775                            throw se;
776                    }
777            }
778    
779            public static java.util.List<java.lang.Long> getSubcategoryIds(
780                    HttpPrincipal httpPrincipal,
781                    java.util.List<java.lang.Long> categoryIds, long groupId,
782                    long categoryId) {
783                    try {
784                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
785                                            "getSubcategoryIds", _getSubcategoryIdsParameterTypes25);
786    
787                            MethodHandler methodHandler = new MethodHandler(methodKey,
788                                            categoryIds, groupId, categoryId);
789    
790                            Object returnObj = null;
791    
792                            try {
793                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
794                            }
795                            catch (Exception e) {
796                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
797                            }
798    
799                            return (java.util.List<java.lang.Long>)returnObj;
800                    }
801                    catch (com.liferay.portal.kernel.exception.SystemException se) {
802                            _log.error(se, se);
803    
804                            throw se;
805                    }
806            }
807    
808            public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
809                    HttpPrincipal httpPrincipal, long groupId, long userId, int start,
810                    int end) {
811                    try {
812                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
813                                            "getSubscribedCategories",
814                                            _getSubscribedCategoriesParameterTypes26);
815    
816                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
817                                            userId, start, end);
818    
819                            Object returnObj = null;
820    
821                            try {
822                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
823                            }
824                            catch (Exception e) {
825                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
826                            }
827    
828                            return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
829                    }
830                    catch (com.liferay.portal.kernel.exception.SystemException se) {
831                            _log.error(se, se);
832    
833                            throw se;
834                    }
835            }
836    
837            public static int getSubscribedCategoriesCount(
838                    HttpPrincipal httpPrincipal, long groupId, long userId) {
839                    try {
840                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
841                                            "getSubscribedCategoriesCount",
842                                            _getSubscribedCategoriesCountParameterTypes27);
843    
844                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
845                                            userId);
846    
847                            Object returnObj = null;
848    
849                            try {
850                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
851                            }
852                            catch (Exception e) {
853                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
854                            }
855    
856                            return ((Integer)returnObj).intValue();
857                    }
858                    catch (com.liferay.portal.kernel.exception.SystemException se) {
859                            _log.error(se, se);
860    
861                            throw se;
862                    }
863            }
864    
865            public static com.liferay.portlet.messageboards.model.MBCategory moveCategory(
866                    HttpPrincipal httpPrincipal, long categoryId, long parentCategoryId,
867                    boolean mergeWithParentCategory)
868                    throws com.liferay.portal.kernel.exception.PortalException {
869                    try {
870                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
871                                            "moveCategory", _moveCategoryParameterTypes28);
872    
873                            MethodHandler methodHandler = new MethodHandler(methodKey,
874                                            categoryId, parentCategoryId, mergeWithParentCategory);
875    
876                            Object returnObj = null;
877    
878                            try {
879                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
880                            }
881                            catch (Exception e) {
882                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
883                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
884                                    }
885    
886                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
887                            }
888    
889                            return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
890                    }
891                    catch (com.liferay.portal.kernel.exception.SystemException se) {
892                            _log.error(se, se);
893    
894                            throw se;
895                    }
896            }
897    
898            public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryFromTrash(
899                    HttpPrincipal httpPrincipal, long categoryId, long newCategoryId)
900                    throws com.liferay.portal.kernel.exception.PortalException {
901                    try {
902                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
903                                            "moveCategoryFromTrash",
904                                            _moveCategoryFromTrashParameterTypes29);
905    
906                            MethodHandler methodHandler = new MethodHandler(methodKey,
907                                            categoryId, newCategoryId);
908    
909                            Object returnObj = null;
910    
911                            try {
912                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
913                            }
914                            catch (Exception e) {
915                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
916                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
917                                    }
918    
919                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
920                            }
921    
922                            return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
923                    }
924                    catch (com.liferay.portal.kernel.exception.SystemException se) {
925                            _log.error(se, se);
926    
927                            throw se;
928                    }
929            }
930    
931            public static com.liferay.portlet.messageboards.model.MBCategory moveCategoryToTrash(
932                    HttpPrincipal httpPrincipal, long categoryId)
933                    throws com.liferay.portal.kernel.exception.PortalException {
934                    try {
935                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
936                                            "moveCategoryToTrash", _moveCategoryToTrashParameterTypes30);
937    
938                            MethodHandler methodHandler = new MethodHandler(methodKey,
939                                            categoryId);
940    
941                            Object returnObj = null;
942    
943                            try {
944                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
945                            }
946                            catch (Exception e) {
947                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
948                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
949                                    }
950    
951                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
952                            }
953    
954                            return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
955                    }
956                    catch (com.liferay.portal.kernel.exception.SystemException se) {
957                            _log.error(se, se);
958    
959                            throw se;
960                    }
961            }
962    
963            public static void restoreCategoryFromTrash(HttpPrincipal httpPrincipal,
964                    long categoryId)
965                    throws com.liferay.portal.kernel.exception.PortalException {
966                    try {
967                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
968                                            "restoreCategoryFromTrash",
969                                            _restoreCategoryFromTrashParameterTypes31);
970    
971                            MethodHandler methodHandler = new MethodHandler(methodKey,
972                                            categoryId);
973    
974                            try {
975                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
976                            }
977                            catch (Exception e) {
978                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
979                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
980                                    }
981    
982                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
983                            }
984                    }
985                    catch (com.liferay.portal.kernel.exception.SystemException se) {
986                            _log.error(se, se);
987    
988                            throw se;
989                    }
990            }
991    
992            public static void subscribeCategory(HttpPrincipal httpPrincipal,
993                    long groupId, long categoryId)
994                    throws com.liferay.portal.kernel.exception.PortalException {
995                    try {
996                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
997                                            "subscribeCategory", _subscribeCategoryParameterTypes32);
998    
999                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1000                                            categoryId);
1001    
1002                            try {
1003                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1004                            }
1005                            catch (Exception e) {
1006                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1007                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1008                                    }
1009    
1010                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1011                            }
1012                    }
1013                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1014                            _log.error(se, se);
1015    
1016                            throw se;
1017                    }
1018            }
1019    
1020            public static void unsubscribeCategory(HttpPrincipal httpPrincipal,
1021                    long groupId, long categoryId)
1022                    throws com.liferay.portal.kernel.exception.PortalException {
1023                    try {
1024                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
1025                                            "unsubscribeCategory", _unsubscribeCategoryParameterTypes33);
1026    
1027                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
1028                                            categoryId);
1029    
1030                            try {
1031                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
1032                            }
1033                            catch (Exception e) {
1034                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1035                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1036                                    }
1037    
1038                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1039                            }
1040                    }
1041                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1042                            _log.error(se, se);
1043    
1044                            throw se;
1045                    }
1046            }
1047    
1048            public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
1049                    HttpPrincipal httpPrincipal, long categoryId, long parentCategoryId,
1050                    java.lang.String name, java.lang.String description,
1051                    java.lang.String displayStyle, java.lang.String emailAddress,
1052                    java.lang.String inProtocol, java.lang.String inServerName,
1053                    int inServerPort, boolean inUseSSL, java.lang.String inUserName,
1054                    java.lang.String inPassword, int inReadInterval,
1055                    java.lang.String outEmailAddress, boolean outCustom,
1056                    java.lang.String outServerName, int outServerPort, boolean outUseSSL,
1057                    java.lang.String outUserName, java.lang.String outPassword,
1058                    boolean mailingListActive, boolean allowAnonymousEmail,
1059                    boolean mergeWithParentCategory,
1060                    com.liferay.portal.service.ServiceContext serviceContext)
1061                    throws com.liferay.portal.kernel.exception.PortalException {
1062                    try {
1063                            MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class,
1064                                            "updateCategory", _updateCategoryParameterTypes34);
1065    
1066                            MethodHandler methodHandler = new MethodHandler(methodKey,
1067                                            categoryId, parentCategoryId, name, description,
1068                                            displayStyle, emailAddress, inProtocol, inServerName,
1069                                            inServerPort, inUseSSL, inUserName, inPassword,
1070                                            inReadInterval, outEmailAddress, outCustom, outServerName,
1071                                            outServerPort, outUseSSL, outUserName, outPassword,
1072                                            mailingListActive, allowAnonymousEmail,
1073                                            mergeWithParentCategory, serviceContext);
1074    
1075                            Object returnObj = null;
1076    
1077                            try {
1078                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
1079                            }
1080                            catch (Exception e) {
1081                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1082                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
1083                                    }
1084    
1085                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
1086                            }
1087    
1088                            return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
1089                    }
1090                    catch (com.liferay.portal.kernel.exception.SystemException se) {
1091                            _log.error(se, se);
1092    
1093                            throw se;
1094                    }
1095            }
1096    
1097            private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceHttp.class);
1098            private static final Class<?>[] _addCategoryParameterTypes0 = new Class[] {
1099                            long.class, long.class, java.lang.String.class,
1100                            java.lang.String.class,
1101                            com.liferay.portal.service.ServiceContext.class
1102                    };
1103            private static final Class<?>[] _addCategoryParameterTypes1 = new Class[] {
1104                            long.class, java.lang.String.class, java.lang.String.class,
1105                            java.lang.String.class, java.lang.String.class,
1106                            java.lang.String.class, java.lang.String.class, int.class,
1107                            boolean.class, java.lang.String.class, java.lang.String.class,
1108                            int.class, java.lang.String.class, boolean.class,
1109                            java.lang.String.class, int.class, boolean.class,
1110                            java.lang.String.class, java.lang.String.class, boolean.class,
1111                            boolean.class, com.liferay.portal.service.ServiceContext.class
1112                    };
1113            private static final Class<?>[] _deleteCategoryParameterTypes2 = new Class[] {
1114                            long.class, boolean.class
1115                    };
1116            private static final Class<?>[] _deleteCategoryParameterTypes3 = new Class[] {
1117                            long.class, long.class
1118                    };
1119            private static final Class<?>[] _getCategoriesParameterTypes4 = new Class[] {
1120                            long.class
1121                    };
1122            private static final Class<?>[] _getCategoriesParameterTypes5 = new Class[] {
1123                            long.class, int.class
1124                    };
1125            private static final Class<?>[] _getCategoriesParameterTypes6 = new Class[] {
1126                            long.class, long.class, int.class, int.class
1127                    };
1128            private static final Class<?>[] _getCategoriesParameterTypes7 = new Class[] {
1129                            long.class, long.class, int.class, int.class, int.class
1130                    };
1131            private static final Class<?>[] _getCategoriesParameterTypes8 = new Class[] {
1132                            long.class, long.class, long.class, int.class, int.class, int.class
1133                    };
1134            private static final Class<?>[] _getCategoriesParameterTypes9 = new Class[] {
1135                            long.class, long[].class, int.class, int.class
1136                    };
1137            private static final Class<?>[] _getCategoriesParameterTypes10 = new Class[] {
1138                            long.class, long[].class, int.class, int.class, int.class
1139                    };
1140            private static final Class<?>[] _getCategoriesParameterTypes11 = new Class[] {
1141                            long.class, long[].class, long[].class, int.class, int.class,
1142                            int.class
1143                    };
1144            private static final Class<?>[] _getCategoriesAndThreadsParameterTypes12 = new Class[] {
1145                            long.class, long.class
1146                    };
1147            private static final Class<?>[] _getCategoriesAndThreadsParameterTypes13 = new Class[] {
1148                            long.class, long.class, int.class
1149                    };
1150            private static final Class<?>[] _getCategoriesAndThreadsParameterTypes14 = new Class[] {
1151                            long.class, long.class, int.class, int.class, int.class
1152                    };
1153            private static final Class<?>[] _getCategoriesAndThreadsCountParameterTypes15 =
1154                    new Class[] { long.class, long.class };
1155            private static final Class<?>[] _getCategoriesAndThreadsCountParameterTypes16 =
1156                    new Class[] { long.class, long.class, int.class };
1157            private static final Class<?>[] _getCategoriesCountParameterTypes17 = new Class[] {
1158                            long.class, long.class
1159                    };
1160            private static final Class<?>[] _getCategoriesCountParameterTypes18 = new Class[] {
1161                            long.class, long.class, int.class
1162                    };
1163            private static final Class<?>[] _getCategoriesCountParameterTypes19 = new Class[] {
1164                            long.class, long.class, long.class, int.class
1165                    };
1166            private static final Class<?>[] _getCategoriesCountParameterTypes20 = new Class[] {
1167                            long.class, long[].class
1168                    };
1169            private static final Class<?>[] _getCategoriesCountParameterTypes21 = new Class[] {
1170                            long.class, long[].class, int.class
1171                    };
1172            private static final Class<?>[] _getCategoriesCountParameterTypes22 = new Class[] {
1173                            long.class, long[].class, long[].class, int.class
1174                    };
1175            private static final Class<?>[] _getCategoryParameterTypes23 = new Class[] {
1176                            long.class
1177                    };
1178            private static final Class<?>[] _getCategoryIdsParameterTypes24 = new Class[] {
1179                            long.class, long.class
1180                    };
1181            private static final Class<?>[] _getSubcategoryIdsParameterTypes25 = new Class[] {
1182                            java.util.List.class, long.class, long.class
1183                    };
1184            private static final Class<?>[] _getSubscribedCategoriesParameterTypes26 = new Class[] {
1185                            long.class, long.class, int.class, int.class
1186                    };
1187            private static final Class<?>[] _getSubscribedCategoriesCountParameterTypes27 =
1188                    new Class[] { long.class, long.class };
1189            private static final Class<?>[] _moveCategoryParameterTypes28 = new Class[] {
1190                            long.class, long.class, boolean.class
1191                    };
1192            private static final Class<?>[] _moveCategoryFromTrashParameterTypes29 = new Class[] {
1193                            long.class, long.class
1194                    };
1195            private static final Class<?>[] _moveCategoryToTrashParameterTypes30 = new Class[] {
1196                            long.class
1197                    };
1198            private static final Class<?>[] _restoreCategoryFromTrashParameterTypes31 = new Class[] {
1199                            long.class
1200                    };
1201            private static final Class<?>[] _subscribeCategoryParameterTypes32 = new Class[] {
1202                            long.class, long.class
1203                    };
1204            private static final Class<?>[] _unsubscribeCategoryParameterTypes33 = new Class[] {
1205                            long.class, long.class
1206                    };
1207            private static final Class<?>[] _updateCategoryParameterTypes34 = new Class[] {
1208                            long.class, long.class, java.lang.String.class,
1209                            java.lang.String.class, java.lang.String.class,
1210                            java.lang.String.class, java.lang.String.class,
1211                            java.lang.String.class, int.class, boolean.class,
1212                            java.lang.String.class, java.lang.String.class, int.class,
1213                            java.lang.String.class, boolean.class, java.lang.String.class,
1214                            int.class, boolean.class, java.lang.String.class,
1215                            java.lang.String.class, boolean.class, boolean.class, boolean.class,
1216                            com.liferay.portal.service.ServiceContext.class
1217                    };
1218    }