001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.messageboards.service.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 com.liferay.portlet.messageboards.model.MBMessage addMessage(
188                    HttpPrincipal httpPrincipal, long parentMessageId,
189                    java.lang.String subject, java.lang.String body,
190                    java.lang.String format,
191                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
192                    boolean anonymous, double priority, boolean allowPingbacks,
193                    com.liferay.portal.service.ServiceContext serviceContext)
194                    throws com.liferay.portal.kernel.exception.PortalException,
195                            com.liferay.portal.kernel.exception.SystemException {
196                    try {
197                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
198                                            "addMessage", _addMessageParameterTypes3);
199    
200                            MethodHandler methodHandler = new MethodHandler(methodKey,
201                                            parentMessageId, subject, body, format, inputStreamOVPs,
202                                            anonymous, priority, allowPingbacks, serviceContext);
203    
204                            Object returnObj = null;
205    
206                            try {
207                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
208                            }
209                            catch (Exception e) {
210                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
211                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
212                                    }
213    
214                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
215                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
216                                    }
217    
218                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
219                            }
220    
221                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
222                    }
223                    catch (com.liferay.portal.kernel.exception.SystemException se) {
224                            _log.error(se, se);
225    
226                            throw se;
227                    }
228            }
229    
230            public static void deleteDiscussionMessage(HttpPrincipal httpPrincipal,
231                    long groupId, java.lang.String className, long classPK,
232                    java.lang.String permissionClassName, long permissionClassPK,
233                    long permissionOwnerId, long messageId)
234                    throws com.liferay.portal.kernel.exception.PortalException,
235                            com.liferay.portal.kernel.exception.SystemException {
236                    try {
237                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
238                                            "deleteDiscussionMessage",
239                                            _deleteDiscussionMessageParameterTypes4);
240    
241                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
242                                            className, classPK, permissionClassName, permissionClassPK,
243                                            permissionOwnerId, messageId);
244    
245                            try {
246                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
247                            }
248                            catch (Exception e) {
249                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
250                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
251                                    }
252    
253                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
254                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
255                                    }
256    
257                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
258                            }
259                    }
260                    catch (com.liferay.portal.kernel.exception.SystemException se) {
261                            _log.error(se, se);
262    
263                            throw se;
264                    }
265            }
266    
267            public static void deleteMessage(HttpPrincipal httpPrincipal, long messageId)
268                    throws com.liferay.portal.kernel.exception.PortalException,
269                            com.liferay.portal.kernel.exception.SystemException {
270                    try {
271                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
272                                            "deleteMessage", _deleteMessageParameterTypes5);
273    
274                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
275    
276                            try {
277                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
278                            }
279                            catch (Exception e) {
280                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
281                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
282                                    }
283    
284                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
285                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
286                                    }
287    
288                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
289                            }
290                    }
291                    catch (com.liferay.portal.kernel.exception.SystemException se) {
292                            _log.error(se, se);
293    
294                            throw se;
295                    }
296            }
297    
298            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
299                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
300                    int start, int end)
301                    throws com.liferay.portal.kernel.exception.PortalException,
302                            com.liferay.portal.kernel.exception.SystemException {
303                    try {
304                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
305                                            "getCategoryMessages", _getCategoryMessagesParameterTypes6);
306    
307                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
308                                            categoryId, status, start, end);
309    
310                            Object returnObj = null;
311    
312                            try {
313                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
314                            }
315                            catch (Exception e) {
316                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
317                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
318                                    }
319    
320                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
321                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
322                                    }
323    
324                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
325                            }
326    
327                            return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
328                    }
329                    catch (com.liferay.portal.kernel.exception.SystemException se) {
330                            _log.error(se, se);
331    
332                            throw se;
333                    }
334            }
335    
336            public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
337                    long groupId, long categoryId, int status)
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    try {
340                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
341                                            "getCategoryMessagesCount",
342                                            _getCategoryMessagesCountParameterTypes7);
343    
344                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
345                                            categoryId, status);
346    
347                            Object returnObj = null;
348    
349                            try {
350                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
351                            }
352                            catch (Exception e) {
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 ((Integer)returnObj).intValue();
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 getCategoryMessagesRSS(
370                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
371                    int max, java.lang.String type, double version,
372                    java.lang.String displayStyle, java.lang.String feedURL,
373                    java.lang.String entryURL,
374                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
375                    throws com.liferay.portal.kernel.exception.PortalException,
376                            com.liferay.portal.kernel.exception.SystemException {
377                    try {
378                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
379                                            "getCategoryMessagesRSS",
380                                            _getCategoryMessagesRSSParameterTypes8);
381    
382                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
383                                            categoryId, status, max, type, version, displayStyle,
384                                            feedURL, entryURL, themeDisplay);
385    
386                            Object returnObj = null;
387    
388                            try {
389                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
390                            }
391                            catch (Exception e) {
392                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
393                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
394                                    }
395    
396                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
397                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
398                                    }
399    
400                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
401                            }
402    
403                            return (java.lang.String)returnObj;
404                    }
405                    catch (com.liferay.portal.kernel.exception.SystemException se) {
406                            _log.error(se, se);
407    
408                            throw se;
409                    }
410            }
411    
412            public static java.lang.String getCompanyMessagesRSS(
413                    HttpPrincipal httpPrincipal, long companyId, int status, int max,
414                    java.lang.String type, double version, java.lang.String displayStyle,
415                    java.lang.String feedURL, java.lang.String entryURL,
416                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
417                    throws com.liferay.portal.kernel.exception.PortalException,
418                            com.liferay.portal.kernel.exception.SystemException {
419                    try {
420                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
421                                            "getCompanyMessagesRSS",
422                                            _getCompanyMessagesRSSParameterTypes9);
423    
424                            MethodHandler methodHandler = new MethodHandler(methodKey,
425                                            companyId, status, max, type, version, displayStyle,
426                                            feedURL, entryURL, themeDisplay);
427    
428                            Object returnObj = null;
429    
430                            try {
431                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
432                            }
433                            catch (Exception e) {
434                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
435                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
436                                    }
437    
438                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
439                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
440                                    }
441    
442                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
443                            }
444    
445                            return (java.lang.String)returnObj;
446                    }
447                    catch (com.liferay.portal.kernel.exception.SystemException se) {
448                            _log.error(se, se);
449    
450                            throw se;
451                    }
452            }
453    
454            public static int getGroupMessagesCount(HttpPrincipal httpPrincipal,
455                    long groupId, int status)
456                    throws com.liferay.portal.kernel.exception.SystemException {
457                    try {
458                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
459                                            "getGroupMessagesCount",
460                                            _getGroupMessagesCountParameterTypes10);
461    
462                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
463                                            status);
464    
465                            Object returnObj = null;
466    
467                            try {
468                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
469                            }
470                            catch (Exception e) {
471                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
472                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
473                                    }
474    
475                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
476                            }
477    
478                            return ((Integer)returnObj).intValue();
479                    }
480                    catch (com.liferay.portal.kernel.exception.SystemException se) {
481                            _log.error(se, se);
482    
483                            throw se;
484                    }
485            }
486    
487            public static java.lang.String getGroupMessagesRSS(
488                    HttpPrincipal httpPrincipal, long groupId, int status, int max,
489                    java.lang.String type, double version, java.lang.String displayStyle,
490                    java.lang.String feedURL, java.lang.String entryURL,
491                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
492                    throws com.liferay.portal.kernel.exception.PortalException,
493                            com.liferay.portal.kernel.exception.SystemException {
494                    try {
495                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
496                                            "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes11);
497    
498                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
499                                            status, max, type, version, displayStyle, feedURL,
500                                            entryURL, themeDisplay);
501    
502                            Object returnObj = null;
503    
504                            try {
505                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
506                            }
507                            catch (Exception e) {
508                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
509                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
510                                    }
511    
512                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
513                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
514                                    }
515    
516                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
517                            }
518    
519                            return (java.lang.String)returnObj;
520                    }
521                    catch (com.liferay.portal.kernel.exception.SystemException se) {
522                            _log.error(se, se);
523    
524                            throw se;
525                    }
526            }
527    
528            public static java.lang.String getGroupMessagesRSS(
529                    HttpPrincipal httpPrincipal, long groupId, long userId, int status,
530                    int max, java.lang.String type, double version,
531                    java.lang.String displayStyle, java.lang.String feedURL,
532                    java.lang.String entryURL,
533                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
534                    throws com.liferay.portal.kernel.exception.PortalException,
535                            com.liferay.portal.kernel.exception.SystemException {
536                    try {
537                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
538                                            "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes12);
539    
540                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
541                                            userId, status, max, type, version, displayStyle, feedURL,
542                                            entryURL, themeDisplay);
543    
544                            Object returnObj = null;
545    
546                            try {
547                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
548                            }
549                            catch (Exception e) {
550                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
551                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
552                                    }
553    
554                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
555                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
556                                    }
557    
558                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
559                            }
560    
561                            return (java.lang.String)returnObj;
562                    }
563                    catch (com.liferay.portal.kernel.exception.SystemException se) {
564                            _log.error(se, se);
565    
566                            throw se;
567                    }
568            }
569    
570            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
571                    HttpPrincipal httpPrincipal, long messageId)
572                    throws com.liferay.portal.kernel.exception.PortalException,
573                            com.liferay.portal.kernel.exception.SystemException {
574                    try {
575                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
576                                            "getMessage", _getMessageParameterTypes13);
577    
578                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
579    
580                            Object returnObj = null;
581    
582                            try {
583                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
584                            }
585                            catch (Exception e) {
586                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
587                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
588                                    }
589    
590                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
591                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
592                                    }
593    
594                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
595                            }
596    
597                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
598                    }
599                    catch (com.liferay.portal.kernel.exception.SystemException se) {
600                            _log.error(se, se);
601    
602                            throw se;
603                    }
604            }
605    
606            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
607                    HttpPrincipal httpPrincipal, long messageId, int status,
608                    java.lang.String threadView, boolean includePrevAndNext)
609                    throws com.liferay.portal.kernel.exception.PortalException,
610                            com.liferay.portal.kernel.exception.SystemException {
611                    try {
612                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
613                                            "getMessageDisplay", _getMessageDisplayParameterTypes14);
614    
615                            MethodHandler methodHandler = new MethodHandler(methodKey,
616                                            messageId, status, threadView, includePrevAndNext);
617    
618                            Object returnObj = null;
619    
620                            try {
621                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
622                            }
623                            catch (Exception e) {
624                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
625                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
626                                    }
627    
628                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
629                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
630                                    }
631    
632                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
633                            }
634    
635                            return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
636                    }
637                    catch (com.liferay.portal.kernel.exception.SystemException se) {
638                            _log.error(se, se);
639    
640                            throw se;
641                    }
642            }
643    
644            public static int getThreadAnswersCount(HttpPrincipal httpPrincipal,
645                    long groupId, long categoryId, long threadId)
646                    throws com.liferay.portal.kernel.exception.SystemException {
647                    try {
648                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
649                                            "getThreadAnswersCount",
650                                            _getThreadAnswersCountParameterTypes15);
651    
652                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
653                                            categoryId, threadId);
654    
655                            Object returnObj = null;
656    
657                            try {
658                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
659                            }
660                            catch (Exception e) {
661                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
662                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
663                                    }
664    
665                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
666                            }
667    
668                            return ((Integer)returnObj).intValue();
669                    }
670                    catch (com.liferay.portal.kernel.exception.SystemException se) {
671                            _log.error(se, se);
672    
673                            throw se;
674                    }
675            }
676    
677            public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
678                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
679                    long threadId, int status, int start, int end)
680                    throws com.liferay.portal.kernel.exception.SystemException {
681                    try {
682                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
683                                            "getThreadMessages", _getThreadMessagesParameterTypes16);
684    
685                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
686                                            categoryId, threadId, status, start, end);
687    
688                            Object returnObj = null;
689    
690                            try {
691                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
692                            }
693                            catch (Exception e) {
694                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
695                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
696                                    }
697    
698                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
699                            }
700    
701                            return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
702                    }
703                    catch (com.liferay.portal.kernel.exception.SystemException se) {
704                            _log.error(se, se);
705    
706                            throw se;
707                    }
708            }
709    
710            public static int getThreadMessagesCount(HttpPrincipal httpPrincipal,
711                    long groupId, long categoryId, long threadId, int status)
712                    throws com.liferay.portal.kernel.exception.SystemException {
713                    try {
714                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
715                                            "getThreadMessagesCount",
716                                            _getThreadMessagesCountParameterTypes17);
717    
718                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
719                                            categoryId, threadId, status);
720    
721                            Object returnObj = null;
722    
723                            try {
724                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
725                            }
726                            catch (Exception e) {
727                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
728                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
729                                    }
730    
731                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
732                            }
733    
734                            return ((Integer)returnObj).intValue();
735                    }
736                    catch (com.liferay.portal.kernel.exception.SystemException se) {
737                            _log.error(se, se);
738    
739                            throw se;
740                    }
741            }
742    
743            public static java.lang.String getThreadMessagesRSS(
744                    HttpPrincipal httpPrincipal, long threadId, int status, int max,
745                    java.lang.String type, double version, java.lang.String displayStyle,
746                    java.lang.String feedURL, java.lang.String entryURL,
747                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
748                    throws com.liferay.portal.kernel.exception.PortalException,
749                            com.liferay.portal.kernel.exception.SystemException {
750                    try {
751                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
752                                            "getThreadMessagesRSS",
753                                            _getThreadMessagesRSSParameterTypes18);
754    
755                            MethodHandler methodHandler = new MethodHandler(methodKey,
756                                            threadId, status, max, type, version, displayStyle,
757                                            feedURL, entryURL, themeDisplay);
758    
759                            Object returnObj = null;
760    
761                            try {
762                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
763                            }
764                            catch (Exception e) {
765                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
766                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
767                                    }
768    
769                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
770                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
771                                    }
772    
773                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
774                            }
775    
776                            return (java.lang.String)returnObj;
777                    }
778                    catch (com.liferay.portal.kernel.exception.SystemException se) {
779                            _log.error(se, se);
780    
781                            throw se;
782                    }
783            }
784    
785            public static void subscribeMessage(HttpPrincipal httpPrincipal,
786                    long messageId)
787                    throws com.liferay.portal.kernel.exception.PortalException,
788                            com.liferay.portal.kernel.exception.SystemException {
789                    try {
790                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
791                                            "subscribeMessage", _subscribeMessageParameterTypes19);
792    
793                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
794    
795                            try {
796                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
797                            }
798                            catch (Exception e) {
799                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
800                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
801                                    }
802    
803                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
804                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
805                                    }
806    
807                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
808                            }
809                    }
810                    catch (com.liferay.portal.kernel.exception.SystemException se) {
811                            _log.error(se, se);
812    
813                            throw se;
814                    }
815            }
816    
817            public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
818                    long messageId)
819                    throws com.liferay.portal.kernel.exception.PortalException,
820                            com.liferay.portal.kernel.exception.SystemException {
821                    try {
822                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
823                                            "unsubscribeMessage", _unsubscribeMessageParameterTypes20);
824    
825                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
826    
827                            try {
828                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
829                            }
830                            catch (Exception e) {
831                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
832                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
833                                    }
834    
835                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
836                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
837                                    }
838    
839                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
840                            }
841                    }
842                    catch (com.liferay.portal.kernel.exception.SystemException se) {
843                            _log.error(se, se);
844    
845                            throw se;
846                    }
847            }
848    
849            public static void updateAnswer(HttpPrincipal httpPrincipal,
850                    long messageId, boolean answer, boolean cascade)
851                    throws com.liferay.portal.kernel.exception.PortalException,
852                            com.liferay.portal.kernel.exception.SystemException {
853                    try {
854                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
855                                            "updateAnswer", _updateAnswerParameterTypes21);
856    
857                            MethodHandler methodHandler = new MethodHandler(methodKey,
858                                            messageId, answer, cascade);
859    
860                            try {
861                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
862                            }
863                            catch (Exception e) {
864                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
865                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
866                                    }
867    
868                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
869                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
870                                    }
871    
872                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
873                            }
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 updateDiscussionMessage(
883                    HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
884                    java.lang.String permissionClassName, long permissionClassPK,
885                    long permissionOwnerId, long messageId, java.lang.String subject,
886                    java.lang.String body,
887                    com.liferay.portal.service.ServiceContext serviceContext)
888                    throws com.liferay.portal.kernel.exception.PortalException,
889                            com.liferay.portal.kernel.exception.SystemException {
890                    try {
891                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
892                                            "updateDiscussionMessage",
893                                            _updateDiscussionMessageParameterTypes22);
894    
895                            MethodHandler methodHandler = new MethodHandler(methodKey,
896                                            className, classPK, permissionClassName, permissionClassPK,
897                                            permissionOwnerId, messageId, subject, body, 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            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
926                    HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
927                    java.lang.String body,
928                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
929                    java.util.List<java.lang.String> existingFiles, double priority,
930                    boolean allowPingbacks,
931                    com.liferay.portal.service.ServiceContext serviceContext)
932                    throws com.liferay.portal.kernel.exception.PortalException,
933                            com.liferay.portal.kernel.exception.SystemException {
934                    try {
935                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
936                                            "updateMessage", _updateMessageParameterTypes23);
937    
938                            MethodHandler methodHandler = new MethodHandler(methodKey,
939                                            messageId, subject, body, inputStreamOVPs, existingFiles,
940                                            priority, allowPingbacks, serviceContext);
941    
942                            Object returnObj = null;
943    
944                            try {
945                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
946                            }
947                            catch (Exception e) {
948                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
949                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
950                                    }
951    
952                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
953                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
954                                    }
955    
956                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
957                            }
958    
959                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
960                    }
961                    catch (com.liferay.portal.kernel.exception.SystemException se) {
962                            _log.error(se, se);
963    
964                            throw se;
965                    }
966            }
967    
968            private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
969            private static final Class<?>[] _addDiscussionMessageParameterTypes0 = new Class[] {
970                            long.class, java.lang.String.class, long.class,
971                            java.lang.String.class, long.class, long.class, long.class,
972                            long.class, java.lang.String.class, java.lang.String.class,
973                            com.liferay.portal.service.ServiceContext.class
974                    };
975            private static final Class<?>[] _addMessageParameterTypes1 = new Class[] {
976                            long.class, long.class, long.class, long.class,
977                            java.lang.String.class, java.lang.String.class,
978                            java.lang.String.class, java.util.List.class, boolean.class,
979                            double.class, boolean.class,
980                            com.liferay.portal.service.ServiceContext.class
981                    };
982            private static final Class<?>[] _addMessageParameterTypes2 = new Class[] {
983                            long.class, long.class, java.lang.String.class,
984                            java.lang.String.class, java.lang.String.class, java.util.List.class,
985                            boolean.class, double.class, boolean.class,
986                            com.liferay.portal.service.ServiceContext.class
987                    };
988            private static final Class<?>[] _addMessageParameterTypes3 = new Class[] {
989                            long.class, java.lang.String.class, java.lang.String.class,
990                            java.lang.String.class, java.util.List.class, boolean.class,
991                            double.class, boolean.class,
992                            com.liferay.portal.service.ServiceContext.class
993                    };
994            private static final Class<?>[] _deleteDiscussionMessageParameterTypes4 = new Class[] {
995                            long.class, java.lang.String.class, long.class,
996                            java.lang.String.class, long.class, long.class, long.class
997                    };
998            private static final Class<?>[] _deleteMessageParameterTypes5 = new Class[] {
999                            long.class
1000                    };
1001            private static final Class<?>[] _getCategoryMessagesParameterTypes6 = new Class[] {
1002                            long.class, long.class, int.class, int.class, int.class
1003                    };
1004            private static final Class<?>[] _getCategoryMessagesCountParameterTypes7 = new Class[] {
1005                            long.class, long.class, int.class
1006                    };
1007            private static final Class<?>[] _getCategoryMessagesRSSParameterTypes8 = new Class[] {
1008                            long.class, long.class, int.class, int.class, java.lang.String.class,
1009                            double.class, java.lang.String.class, java.lang.String.class,
1010                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1011                    };
1012            private static final Class<?>[] _getCompanyMessagesRSSParameterTypes9 = new Class[] {
1013                            long.class, int.class, int.class, java.lang.String.class,
1014                            double.class, java.lang.String.class, java.lang.String.class,
1015                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1016                    };
1017            private static final Class<?>[] _getGroupMessagesCountParameterTypes10 = new Class[] {
1018                            long.class, int.class
1019                    };
1020            private static final Class<?>[] _getGroupMessagesRSSParameterTypes11 = new Class[] {
1021                            long.class, int.class, int.class, java.lang.String.class,
1022                            double.class, java.lang.String.class, java.lang.String.class,
1023                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1024                    };
1025            private static final Class<?>[] _getGroupMessagesRSSParameterTypes12 = new Class[] {
1026                            long.class, long.class, int.class, int.class, java.lang.String.class,
1027                            double.class, java.lang.String.class, java.lang.String.class,
1028                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1029                    };
1030            private static final Class<?>[] _getMessageParameterTypes13 = new Class[] {
1031                            long.class
1032                    };
1033            private static final Class<?>[] _getMessageDisplayParameterTypes14 = new Class[] {
1034                            long.class, int.class, java.lang.String.class, boolean.class
1035                    };
1036            private static final Class<?>[] _getThreadAnswersCountParameterTypes15 = new Class[] {
1037                            long.class, long.class, long.class
1038                    };
1039            private static final Class<?>[] _getThreadMessagesParameterTypes16 = new Class[] {
1040                            long.class, long.class, long.class, int.class, int.class, int.class
1041                    };
1042            private static final Class<?>[] _getThreadMessagesCountParameterTypes17 = new Class[] {
1043                            long.class, long.class, long.class, int.class
1044                    };
1045            private static final Class<?>[] _getThreadMessagesRSSParameterTypes18 = new Class[] {
1046                            long.class, int.class, int.class, java.lang.String.class,
1047                            double.class, java.lang.String.class, java.lang.String.class,
1048                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1049                    };
1050            private static final Class<?>[] _subscribeMessageParameterTypes19 = new Class[] {
1051                            long.class
1052                    };
1053            private static final Class<?>[] _unsubscribeMessageParameterTypes20 = new Class[] {
1054                            long.class
1055                    };
1056            private static final Class<?>[] _updateAnswerParameterTypes21 = new Class[] {
1057                            long.class, boolean.class, boolean.class
1058                    };
1059            private static final Class<?>[] _updateDiscussionMessageParameterTypes22 = new Class[] {
1060                            java.lang.String.class, long.class, java.lang.String.class,
1061                            long.class, long.class, long.class, java.lang.String.class,
1062                            java.lang.String.class,
1063                            com.liferay.portal.service.ServiceContext.class
1064                    };
1065            private static final Class<?>[] _updateMessageParameterTypes23 = new Class[] {
1066                            long.class, java.lang.String.class, java.lang.String.class,
1067                            java.util.List.class, java.util.List.class, double.class,
1068                            boolean.class, com.liferay.portal.service.ServiceContext.class
1069                    };
1070    }