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