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.MBMessageServiceUtil;
025    
026    /**
027     * <p>
028     * This class provides a HTTP utility for the
029     * {@link com.liferay.portlet.messageboards.service.MBMessageServiceUtil} 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       MBMessageServiceSoap
052     * @see       com.liferay.portal.security.auth.HttpPrincipal
053     * @see       com.liferay.portlet.messageboards.service.MBMessageServiceUtil
054     * @generated
055     */
056    public class MBMessageServiceHttp {
057            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
058                    HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
059                    long classPK, java.lang.String permissionClassName,
060                    long permissionClassPK, long permissionOwnerId, long threadId,
061                    long parentMessageId, java.lang.String subject, java.lang.String body,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    try {
066                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
067                                            "addDiscussionMessage", _addDiscussionMessageParameterTypes0);
068    
069                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
070                                            className, classPK, permissionClassName, permissionClassPK,
071                                            permissionOwnerId, threadId, parentMessageId, subject,
072                                            body, serviceContext);
073    
074                            Object returnObj = null;
075    
076                            try {
077                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
078                            }
079                            catch (Exception e) {
080                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
081                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
082                                    }
083    
084                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
085                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
086                                    }
087    
088                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
089                            }
090    
091                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
092                    }
093                    catch (com.liferay.portal.kernel.exception.SystemException se) {
094                            _log.error(se, se);
095    
096                            throw se;
097                    }
098            }
099    
100            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
101                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
102                    long threadId, long parentMessageId, java.lang.String subject,
103                    java.lang.String body, java.lang.String format,
104                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
105                    boolean anonymous, double priority, boolean allowPingbacks,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    try {
110                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
111                                            "addMessage", _addMessageParameterTypes1);
112    
113                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
114                                            categoryId, threadId, parentMessageId, subject, body,
115                                            format, inputStreamOVPs, anonymous, priority,
116                                            allowPingbacks, serviceContext);
117    
118                            Object returnObj = null;
119    
120                            try {
121                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
122                            }
123                            catch (Exception e) {
124                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
125                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
126                                    }
127    
128                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
129                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
130                                    }
131    
132                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
133                            }
134    
135                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
136                    }
137                    catch (com.liferay.portal.kernel.exception.SystemException se) {
138                            _log.error(se, se);
139    
140                            throw se;
141                    }
142            }
143    
144            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
145                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
146                    java.lang.String subject, java.lang.String body,
147                    java.lang.String format,
148                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
149                    boolean anonymous, double priority, boolean allowPingbacks,
150                    com.liferay.portal.service.ServiceContext serviceContext)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    try {
154                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
155                                            "addMessage", _addMessageParameterTypes2);
156    
157                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
158                                            categoryId, subject, body, format, inputStreamOVPs,
159                                            anonymous, priority, allowPingbacks, serviceContext);
160    
161                            Object returnObj = null;
162    
163                            try {
164                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
165                            }
166                            catch (Exception e) {
167                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
168                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
169                                    }
170    
171                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
172                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
173                                    }
174    
175                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
176                            }
177    
178                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
179                    }
180                    catch (com.liferay.portal.kernel.exception.SystemException se) {
181                            _log.error(se, se);
182    
183                            throw se;
184                    }
185            }
186    
187            public static void deleteDiscussionMessage(HttpPrincipal httpPrincipal,
188                    long groupId, java.lang.String className, long classPK,
189                    java.lang.String permissionClassName, long permissionClassPK,
190                    long permissionOwnerId, long messageId)
191                    throws com.liferay.portal.kernel.exception.PortalException,
192                            com.liferay.portal.kernel.exception.SystemException {
193                    try {
194                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
195                                            "deleteDiscussionMessage",
196                                            _deleteDiscussionMessageParameterTypes3);
197    
198                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
199                                            className, classPK, permissionClassName, permissionClassPK,
200                                            permissionOwnerId, messageId);
201    
202                            try {
203                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
204                            }
205                            catch (Exception e) {
206                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
207                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
208                                    }
209    
210                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
211                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
212                                    }
213    
214                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
215                            }
216                    }
217                    catch (com.liferay.portal.kernel.exception.SystemException se) {
218                            _log.error(se, se);
219    
220                            throw se;
221                    }
222            }
223    
224            public static void deleteMessage(HttpPrincipal httpPrincipal, long messageId)
225                    throws com.liferay.portal.kernel.exception.PortalException,
226                            com.liferay.portal.kernel.exception.SystemException {
227                    try {
228                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
229                                            "deleteMessage", _deleteMessageParameterTypes4);
230    
231                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
232    
233                            try {
234                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
235                            }
236                            catch (Exception e) {
237                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
238                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
239                                    }
240    
241                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
242                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
243                                    }
244    
245                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
246                            }
247                    }
248                    catch (com.liferay.portal.kernel.exception.SystemException se) {
249                            _log.error(se, se);
250    
251                            throw se;
252                    }
253            }
254    
255            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
256                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
257                    int start, int end)
258                    throws com.liferay.portal.kernel.exception.PortalException,
259                            com.liferay.portal.kernel.exception.SystemException {
260                    try {
261                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
262                                            "getCategoryMessages", _getCategoryMessagesParameterTypes5);
263    
264                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
265                                            categoryId, status, start, end);
266    
267                            Object returnObj = null;
268    
269                            try {
270                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
271                            }
272                            catch (Exception e) {
273                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
274                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
275                                    }
276    
277                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
278                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
279                                    }
280    
281                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
282                            }
283    
284                            return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
285                    }
286                    catch (com.liferay.portal.kernel.exception.SystemException se) {
287                            _log.error(se, se);
288    
289                            throw se;
290                    }
291            }
292    
293            public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
294                    long groupId, long categoryId, int status)
295                    throws com.liferay.portal.kernel.exception.SystemException {
296                    try {
297                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
298                                            "getCategoryMessagesCount",
299                                            _getCategoryMessagesCountParameterTypes6);
300    
301                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
302                                            categoryId, status);
303    
304                            Object returnObj = null;
305    
306                            try {
307                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
308                            }
309                            catch (Exception e) {
310                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
311                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
312                                    }
313    
314                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
315                            }
316    
317                            return ((Integer)returnObj).intValue();
318                    }
319                    catch (com.liferay.portal.kernel.exception.SystemException se) {
320                            _log.error(se, se);
321    
322                            throw se;
323                    }
324            }
325    
326            public static java.lang.String getCategoryMessagesRSS(
327                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
328                    int max, java.lang.String type, double version,
329                    java.lang.String displayStyle, java.lang.String feedURL,
330                    java.lang.String entryURL,
331                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
332                    throws com.liferay.portal.kernel.exception.PortalException,
333                            com.liferay.portal.kernel.exception.SystemException {
334                    try {
335                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
336                                            "getCategoryMessagesRSS",
337                                            _getCategoryMessagesRSSParameterTypes7);
338    
339                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
340                                            categoryId, status, max, type, version, displayStyle,
341                                            feedURL, entryURL, themeDisplay);
342    
343                            Object returnObj = null;
344    
345                            try {
346                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
347                            }
348                            catch (Exception e) {
349                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
350                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
351                                    }
352    
353                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
354                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
355                                    }
356    
357                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
358                            }
359    
360                            return (java.lang.String)returnObj;
361                    }
362                    catch (com.liferay.portal.kernel.exception.SystemException se) {
363                            _log.error(se, se);
364    
365                            throw se;
366                    }
367            }
368    
369            public static java.lang.String getCompanyMessagesRSS(
370                    HttpPrincipal httpPrincipal, long companyId, int status, int max,
371                    java.lang.String type, double version, java.lang.String displayStyle,
372                    java.lang.String feedURL, java.lang.String entryURL,
373                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException {
376                    try {
377                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
378                                            "getCompanyMessagesRSS",
379                                            _getCompanyMessagesRSSParameterTypes8);
380    
381                            MethodHandler methodHandler = new MethodHandler(methodKey,
382                                            companyId, status, max, type, version, displayStyle,
383                                            feedURL, entryURL, themeDisplay);
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.PortalException) {
392                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
393                                    }
394    
395                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
396                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
397                                    }
398    
399                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
400                            }
401    
402                            return (java.lang.String)returnObj;
403                    }
404                    catch (com.liferay.portal.kernel.exception.SystemException se) {
405                            _log.error(se, se);
406    
407                            throw se;
408                    }
409            }
410    
411            public static int getGroupMessagesCount(HttpPrincipal httpPrincipal,
412                    long groupId, int status)
413                    throws com.liferay.portal.kernel.exception.SystemException {
414                    try {
415                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
416                                            "getGroupMessagesCount",
417                                            _getGroupMessagesCountParameterTypes9);
418    
419                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
420                                            status);
421    
422                            Object returnObj = null;
423    
424                            try {
425                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
426                            }
427                            catch (Exception e) {
428                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
429                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
430                                    }
431    
432                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
433                            }
434    
435                            return ((Integer)returnObj).intValue();
436                    }
437                    catch (com.liferay.portal.kernel.exception.SystemException se) {
438                            _log.error(se, se);
439    
440                            throw se;
441                    }
442            }
443    
444            public static java.lang.String getGroupMessagesRSS(
445                    HttpPrincipal httpPrincipal, long groupId, int status, int max,
446                    java.lang.String type, double version, java.lang.String displayStyle,
447                    java.lang.String feedURL, java.lang.String entryURL,
448                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
449                    throws com.liferay.portal.kernel.exception.PortalException,
450                            com.liferay.portal.kernel.exception.SystemException {
451                    try {
452                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
453                                            "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes10);
454    
455                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
456                                            status, max, type, version, displayStyle, feedURL,
457                                            entryURL, themeDisplay);
458    
459                            Object returnObj = null;
460    
461                            try {
462                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
463                            }
464                            catch (Exception e) {
465                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
466                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
467                                    }
468    
469                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
470                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
471                                    }
472    
473                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
474                            }
475    
476                            return (java.lang.String)returnObj;
477                    }
478                    catch (com.liferay.portal.kernel.exception.SystemException se) {
479                            _log.error(se, se);
480    
481                            throw se;
482                    }
483            }
484    
485            public static java.lang.String getGroupMessagesRSS(
486                    HttpPrincipal httpPrincipal, long groupId, long userId, int status,
487                    int max, java.lang.String type, double version,
488                    java.lang.String displayStyle, java.lang.String feedURL,
489                    java.lang.String entryURL,
490                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
491                    throws com.liferay.portal.kernel.exception.PortalException,
492                            com.liferay.portal.kernel.exception.SystemException {
493                    try {
494                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
495                                            "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes11);
496    
497                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
498                                            userId, status, max, type, version, displayStyle, feedURL,
499                                            entryURL, themeDisplay);
500    
501                            Object returnObj = null;
502    
503                            try {
504                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
505                            }
506                            catch (Exception e) {
507                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
508                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
509                                    }
510    
511                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
512                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
513                                    }
514    
515                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
516                            }
517    
518                            return (java.lang.String)returnObj;
519                    }
520                    catch (com.liferay.portal.kernel.exception.SystemException se) {
521                            _log.error(se, se);
522    
523                            throw se;
524                    }
525            }
526    
527            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
528                    HttpPrincipal httpPrincipal, long messageId)
529                    throws com.liferay.portal.kernel.exception.PortalException,
530                            com.liferay.portal.kernel.exception.SystemException {
531                    try {
532                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
533                                            "getMessage", _getMessageParameterTypes12);
534    
535                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
536    
537                            Object returnObj = null;
538    
539                            try {
540                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
541                            }
542                            catch (Exception e) {
543                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
544                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
545                                    }
546    
547                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
548                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
549                                    }
550    
551                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
552                            }
553    
554                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
555                    }
556                    catch (com.liferay.portal.kernel.exception.SystemException se) {
557                            _log.error(se, se);
558    
559                            throw se;
560                    }
561            }
562    
563            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
564                    HttpPrincipal httpPrincipal, long messageId, int status,
565                    java.lang.String threadView, boolean includePrevAndNext)
566                    throws com.liferay.portal.kernel.exception.PortalException,
567                            com.liferay.portal.kernel.exception.SystemException {
568                    try {
569                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
570                                            "getMessageDisplay", _getMessageDisplayParameterTypes13);
571    
572                            MethodHandler methodHandler = new MethodHandler(methodKey,
573                                            messageId, status, threadView, includePrevAndNext);
574    
575                            Object returnObj = null;
576    
577                            try {
578                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
579                            }
580                            catch (Exception e) {
581                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
582                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
583                                    }
584    
585                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
586                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
587                                    }
588    
589                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
590                            }
591    
592                            return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
593                    }
594                    catch (com.liferay.portal.kernel.exception.SystemException se) {
595                            _log.error(se, se);
596    
597                            throw se;
598                    }
599            }
600    
601            public static int getThreadAnswersCount(HttpPrincipal httpPrincipal,
602                    long groupId, long categoryId, long threadId)
603                    throws com.liferay.portal.kernel.exception.SystemException {
604                    try {
605                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
606                                            "getThreadAnswersCount",
607                                            _getThreadAnswersCountParameterTypes14);
608    
609                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
610                                            categoryId, threadId);
611    
612                            Object returnObj = null;
613    
614                            try {
615                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
616                            }
617                            catch (Exception e) {
618                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
619                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
620                                    }
621    
622                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
623                            }
624    
625                            return ((Integer)returnObj).intValue();
626                    }
627                    catch (com.liferay.portal.kernel.exception.SystemException se) {
628                            _log.error(se, se);
629    
630                            throw se;
631                    }
632            }
633    
634            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
635                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
636                    long threadId, int status, int start, int end)
637                    throws com.liferay.portal.kernel.exception.SystemException {
638                    try {
639                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
640                                            "getThreadMessages", _getThreadMessagesParameterTypes15);
641    
642                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
643                                            categoryId, threadId, status, start, end);
644    
645                            Object returnObj = null;
646    
647                            try {
648                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
649                            }
650                            catch (Exception e) {
651                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
652                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
653                                    }
654    
655                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
656                            }
657    
658                            return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
659                    }
660                    catch (com.liferay.portal.kernel.exception.SystemException se) {
661                            _log.error(se, se);
662    
663                            throw se;
664                    }
665            }
666    
667            public static int getThreadMessagesCount(HttpPrincipal httpPrincipal,
668                    long groupId, long categoryId, long threadId, int status)
669                    throws com.liferay.portal.kernel.exception.SystemException {
670                    try {
671                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
672                                            "getThreadMessagesCount",
673                                            _getThreadMessagesCountParameterTypes16);
674    
675                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
676                                            categoryId, threadId, status);
677    
678                            Object returnObj = null;
679    
680                            try {
681                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
682                            }
683                            catch (Exception e) {
684                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
685                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
686                                    }
687    
688                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
689                            }
690    
691                            return ((Integer)returnObj).intValue();
692                    }
693                    catch (com.liferay.portal.kernel.exception.SystemException se) {
694                            _log.error(se, se);
695    
696                            throw se;
697                    }
698            }
699    
700            public static java.lang.String getThreadMessagesRSS(
701                    HttpPrincipal httpPrincipal, long threadId, int status, int max,
702                    java.lang.String type, double version, java.lang.String displayStyle,
703                    java.lang.String feedURL, java.lang.String entryURL,
704                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
705                    throws com.liferay.portal.kernel.exception.PortalException,
706                            com.liferay.portal.kernel.exception.SystemException {
707                    try {
708                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
709                                            "getThreadMessagesRSS",
710                                            _getThreadMessagesRSSParameterTypes17);
711    
712                            MethodHandler methodHandler = new MethodHandler(methodKey,
713                                            threadId, status, max, type, version, displayStyle,
714                                            feedURL, entryURL, themeDisplay);
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 (java.lang.String)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 void subscribeMessage(HttpPrincipal httpPrincipal,
743                    long messageId)
744                    throws com.liferay.portal.kernel.exception.PortalException,
745                            com.liferay.portal.kernel.exception.SystemException {
746                    try {
747                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
748                                            "subscribeMessage", _subscribeMessageParameterTypes18);
749    
750                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
751    
752                            try {
753                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
754                            }
755                            catch (Exception e) {
756                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
757                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
758                                    }
759    
760                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
761                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
762                                    }
763    
764                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
765                            }
766                    }
767                    catch (com.liferay.portal.kernel.exception.SystemException se) {
768                            _log.error(se, se);
769    
770                            throw se;
771                    }
772            }
773    
774            public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
775                    long messageId)
776                    throws com.liferay.portal.kernel.exception.PortalException,
777                            com.liferay.portal.kernel.exception.SystemException {
778                    try {
779                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
780                                            "unsubscribeMessage", _unsubscribeMessageParameterTypes19);
781    
782                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
783    
784                            try {
785                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
786                            }
787                            catch (Exception e) {
788                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
789                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
790                                    }
791    
792                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
793                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
794                                    }
795    
796                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
797                            }
798                    }
799                    catch (com.liferay.portal.kernel.exception.SystemException se) {
800                            _log.error(se, se);
801    
802                            throw se;
803                    }
804            }
805    
806            public static void updateAnswer(HttpPrincipal httpPrincipal,
807                    long messageId, boolean answer, boolean cascade)
808                    throws com.liferay.portal.kernel.exception.PortalException,
809                            com.liferay.portal.kernel.exception.SystemException {
810                    try {
811                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
812                                            "updateAnswer", _updateAnswerParameterTypes20);
813    
814                            MethodHandler methodHandler = new MethodHandler(methodKey,
815                                            messageId, answer, cascade);
816    
817                            try {
818                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
819                            }
820                            catch (Exception e) {
821                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
822                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
823                                    }
824    
825                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
826                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
827                                    }
828    
829                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
830                            }
831                    }
832                    catch (com.liferay.portal.kernel.exception.SystemException se) {
833                            _log.error(se, se);
834    
835                            throw se;
836                    }
837            }
838    
839            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
840                    HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
841                    java.lang.String permissionClassName, long permissionClassPK,
842                    long permissionOwnerId, long messageId, java.lang.String subject,
843                    java.lang.String body,
844                    com.liferay.portal.service.ServiceContext serviceContext)
845                    throws com.liferay.portal.kernel.exception.PortalException,
846                            com.liferay.portal.kernel.exception.SystemException {
847                    try {
848                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
849                                            "updateDiscussionMessage",
850                                            _updateDiscussionMessageParameterTypes21);
851    
852                            MethodHandler methodHandler = new MethodHandler(methodKey,
853                                            className, classPK, permissionClassName, permissionClassPK,
854                                            permissionOwnerId, messageId, subject, body, serviceContext);
855    
856                            Object returnObj = null;
857    
858                            try {
859                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
860                            }
861                            catch (Exception e) {
862                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
863                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
864                                    }
865    
866                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
867                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
868                                    }
869    
870                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
871                            }
872    
873                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
874                    }
875                    catch (com.liferay.portal.kernel.exception.SystemException se) {
876                            _log.error(se, se);
877    
878                            throw se;
879                    }
880            }
881    
882            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
883                    HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
884                    java.lang.String body,
885                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
886                    java.util.List<java.lang.String> existingFiles, double priority,
887                    boolean allowPingbacks,
888                    com.liferay.portal.service.ServiceContext serviceContext)
889                    throws com.liferay.portal.kernel.exception.PortalException,
890                            com.liferay.portal.kernel.exception.SystemException {
891                    try {
892                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
893                                            "updateMessage", _updateMessageParameterTypes22);
894    
895                            MethodHandler methodHandler = new MethodHandler(methodKey,
896                                            messageId, subject, body, inputStreamOVPs, existingFiles,
897                                            priority, allowPingbacks, serviceContext);
898    
899                            Object returnObj = null;
900    
901                            try {
902                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
903                            }
904                            catch (Exception e) {
905                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
906                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
907                                    }
908    
909                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
910                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
911                                    }
912    
913                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
914                            }
915    
916                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
917                    }
918                    catch (com.liferay.portal.kernel.exception.SystemException se) {
919                            _log.error(se, se);
920    
921                            throw se;
922                    }
923            }
924    
925            private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
926            private static final Class<?>[] _addDiscussionMessageParameterTypes0 = new Class[] {
927                            long.class, java.lang.String.class, long.class,
928                            java.lang.String.class, long.class, long.class, long.class,
929                            long.class, java.lang.String.class, java.lang.String.class,
930                            com.liferay.portal.service.ServiceContext.class
931                    };
932            private static final Class<?>[] _addMessageParameterTypes1 = new Class[] {
933                            long.class, long.class, long.class, long.class,
934                            java.lang.String.class, java.lang.String.class,
935                            java.lang.String.class, java.util.List.class, boolean.class,
936                            double.class, boolean.class,
937                            com.liferay.portal.service.ServiceContext.class
938                    };
939            private static final Class<?>[] _addMessageParameterTypes2 = new Class[] {
940                            long.class, long.class, java.lang.String.class,
941                            java.lang.String.class, java.lang.String.class, java.util.List.class,
942                            boolean.class, double.class, boolean.class,
943                            com.liferay.portal.service.ServiceContext.class
944                    };
945            private static final Class<?>[] _deleteDiscussionMessageParameterTypes3 = new Class[] {
946                            long.class, java.lang.String.class, long.class,
947                            java.lang.String.class, long.class, long.class, long.class
948                    };
949            private static final Class<?>[] _deleteMessageParameterTypes4 = new Class[] {
950                            long.class
951                    };
952            private static final Class<?>[] _getCategoryMessagesParameterTypes5 = new Class[] {
953                            long.class, long.class, int.class, int.class, int.class
954                    };
955            private static final Class<?>[] _getCategoryMessagesCountParameterTypes6 = new Class[] {
956                            long.class, long.class, int.class
957                    };
958            private static final Class<?>[] _getCategoryMessagesRSSParameterTypes7 = new Class[] {
959                            long.class, long.class, int.class, int.class, java.lang.String.class,
960                            double.class, java.lang.String.class, java.lang.String.class,
961                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
962                    };
963            private static final Class<?>[] _getCompanyMessagesRSSParameterTypes8 = new Class[] {
964                            long.class, int.class, int.class, java.lang.String.class,
965                            double.class, java.lang.String.class, java.lang.String.class,
966                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
967                    };
968            private static final Class<?>[] _getGroupMessagesCountParameterTypes9 = new Class[] {
969                            long.class, int.class
970                    };
971            private static final Class<?>[] _getGroupMessagesRSSParameterTypes10 = new Class[] {
972                            long.class, int.class, int.class, java.lang.String.class,
973                            double.class, java.lang.String.class, java.lang.String.class,
974                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
975                    };
976            private static final Class<?>[] _getGroupMessagesRSSParameterTypes11 = new Class[] {
977                            long.class, long.class, int.class, int.class, java.lang.String.class,
978                            double.class, java.lang.String.class, java.lang.String.class,
979                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
980                    };
981            private static final Class<?>[] _getMessageParameterTypes12 = new Class[] {
982                            long.class
983                    };
984            private static final Class<?>[] _getMessageDisplayParameterTypes13 = new Class[] {
985                            long.class, int.class, java.lang.String.class, boolean.class
986                    };
987            private static final Class<?>[] _getThreadAnswersCountParameterTypes14 = new Class[] {
988                            long.class, long.class, long.class
989                    };
990            private static final Class<?>[] _getThreadMessagesParameterTypes15 = new Class[] {
991                            long.class, long.class, long.class, int.class, int.class, int.class
992                    };
993            private static final Class<?>[] _getThreadMessagesCountParameterTypes16 = new Class[] {
994                            long.class, long.class, long.class, int.class
995                    };
996            private static final Class<?>[] _getThreadMessagesRSSParameterTypes17 = new Class[] {
997                            long.class, int.class, int.class, java.lang.String.class,
998                            double.class, java.lang.String.class, java.lang.String.class,
999                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1000                    };
1001            private static final Class<?>[] _subscribeMessageParameterTypes18 = new Class[] {
1002                            long.class
1003                    };
1004            private static final Class<?>[] _unsubscribeMessageParameterTypes19 = new Class[] {
1005                            long.class
1006                    };
1007            private static final Class<?>[] _updateAnswerParameterTypes20 = new Class[] {
1008                            long.class, boolean.class, boolean.class
1009                    };
1010            private static final Class<?>[] _updateDiscussionMessageParameterTypes21 = new Class[] {
1011                            java.lang.String.class, long.class, java.lang.String.class,
1012                            long.class, long.class, long.class, java.lang.String.class,
1013                            java.lang.String.class,
1014                            com.liferay.portal.service.ServiceContext.class
1015                    };
1016            private static final Class<?>[] _updateMessageParameterTypes22 = new Class[] {
1017                            long.class, java.lang.String.class, java.lang.String.class,
1018                            java.util.List.class, java.util.List.class, double.class,
1019                            boolean.class, com.liferay.portal.service.ServiceContext.class
1020                    };
1021    }