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