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