001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.MethodHandler;
020    import com.liferay.portal.kernel.util.MethodKey;
021    import com.liferay.portal.security.auth.HttpPrincipal;
022    import com.liferay.portal.service.http.TunnelUtil;
023    
024    import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
025    
026    /**
027     * <p>
028     * This class provides a HTTP utility for the
029     * {@link com.liferay.portlet.messageboards.service.MBMessageServiceUtil} service utility. The
030     * static methods of this class calls the same methods of the service utility.
031     * However, the signatures are different because it requires an additional
032     * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
033     * </p>
034     *
035     * <p>
036     * The benefits of using the HTTP utility is that it is fast and allows for
037     * tunneling without the cost of serializing to text. The drawback is that it
038     * only works with Java.
039     * </p>
040     *
041     * <p>
042     * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
043     * configure security.
044     * </p>
045     *
046     * <p>
047     * The HTTP utility is only generated for remote services.
048     * </p>
049     *
050     * @author    Brian Wing Shun Chan
051     * @see       MBMessageServiceSoap
052     * @see       com.liferay.portal.security.auth.HttpPrincipal
053     * @see       com.liferay.portlet.messageboards.service.MBMessageServiceUtil
054     * @generated
055     */
056    public class MBMessageServiceHttp {
057            public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
058                    HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
059                    long classPK, java.lang.String permissionClassName,
060                    long permissionClassPK, long permissionOwnerId, long threadId,
061                    long parentMessageId, java.lang.String subject, java.lang.String body,
062                    com.liferay.portal.service.ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    try {
066                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
067                                            "addDiscussionMessage", _addDiscussionMessageParameterTypes0);
068    
069                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
070                                            className, classPK, permissionClassName, permissionClassPK,
071                                            permissionOwnerId, threadId, parentMessageId, subject,
072                                            body, serviceContext);
073    
074                            Object returnObj = null;
075    
076                            try {
077                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
078                            }
079                            catch (Exception e) {
080                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
081                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
082                                    }
083    
084                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
085                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
086                                    }
087    
088                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
089                            }
090    
091                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
092                    }
093                    catch (com.liferay.portal.kernel.exception.SystemException se) {
094                            _log.error(se, se);
095    
096                            throw se;
097                    }
098            }
099    
100            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
101                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
102                    long threadId, long parentMessageId, java.lang.String subject,
103                    java.lang.String body, java.lang.String format,
104                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
105                    boolean anonymous, double priority, boolean allowPingbacks,
106                    com.liferay.portal.service.ServiceContext serviceContext)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException {
109                    try {
110                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
111                                            "addMessage", _addMessageParameterTypes1);
112    
113                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
114                                            categoryId, threadId, parentMessageId, subject, body,
115                                            format, inputStreamOVPs, anonymous, priority,
116                                            allowPingbacks, serviceContext);
117    
118                            Object returnObj = null;
119    
120                            try {
121                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
122                            }
123                            catch (Exception e) {
124                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
125                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
126                                    }
127    
128                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
129                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
130                                    }
131    
132                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
133                            }
134    
135                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
136                    }
137                    catch (com.liferay.portal.kernel.exception.SystemException se) {
138                            _log.error(se, se);
139    
140                            throw se;
141                    }
142            }
143    
144            public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
145                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
146                    java.lang.String subject, java.lang.String body,
147                    java.lang.String format,
148                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
149                    boolean anonymous, double priority, boolean allowPingbacks,
150                    com.liferay.portal.service.ServiceContext serviceContext)
151                    throws com.liferay.portal.kernel.exception.PortalException,
152                            com.liferay.portal.kernel.exception.SystemException {
153                    try {
154                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
155                                            "addMessage", _addMessageParameterTypes2);
156    
157                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
158                                            categoryId, subject, body, format, inputStreamOVPs,
159                                            anonymous, priority, allowPingbacks, serviceContext);
160    
161                            Object returnObj = null;
162    
163                            try {
164                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
165                            }
166                            catch (Exception e) {
167                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
168                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
169                                    }
170    
171                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
172                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
173                                    }
174    
175                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
176                            }
177    
178                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
179                    }
180                    catch (com.liferay.portal.kernel.exception.SystemException se) {
181                            _log.error(se, se);
182    
183                            throw se;
184                    }
185            }
186    
187            public static 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 void deleteMessageAttachments(HttpPrincipal httpPrincipal,
299                    long messageId)
300                    throws com.liferay.portal.kernel.exception.PortalException,
301                            com.liferay.portal.kernel.exception.SystemException {
302                    try {
303                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
304                                            "deleteMessageAttachments",
305                                            _deleteMessageAttachmentsParameterTypes6);
306    
307                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
308    
309                            try {
310                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
311                            }
312                            catch (Exception e) {
313                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
314                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
315                                    }
316    
317                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
318                                            throw (com.liferay.portal.kernel.exception.SystemException)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                            com.liferay.portal.kernel.exception.SystemException {
336                    try {
337                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
338                                            "getCategoryMessages", _getCategoryMessagesParameterTypes7);
339    
340                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
341                                            categoryId, status, start, end);
342    
343                            Object returnObj = null;
344    
345                            try {
346                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
347                            }
348                            catch (Exception e) {
349                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
350                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
351                                    }
352    
353                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
354                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
355                                    }
356    
357                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
358                            }
359    
360                            return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
361                    }
362                    catch (com.liferay.portal.kernel.exception.SystemException se) {
363                            _log.error(se, se);
364    
365                            throw se;
366                    }
367            }
368    
369            public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
370                    long groupId, long categoryId, int status)
371                    throws com.liferay.portal.kernel.exception.SystemException {
372                    try {
373                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
374                                            "getCategoryMessagesCount",
375                                            _getCategoryMessagesCountParameterTypes8);
376    
377                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
378                                            categoryId, status);
379    
380                            Object returnObj = null;
381    
382                            try {
383                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
384                            }
385                            catch (Exception e) {
386                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
387                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
388                                    }
389    
390                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
391                            }
392    
393                            return ((Integer)returnObj).intValue();
394                    }
395                    catch (com.liferay.portal.kernel.exception.SystemException se) {
396                            _log.error(se, se);
397    
398                            throw se;
399                    }
400            }
401    
402            public static java.lang.String getCategoryMessagesRSS(
403                    HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
404                    int max, java.lang.String type, double version,
405                    java.lang.String displayStyle, java.lang.String feedURL,
406                    java.lang.String entryURL,
407                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
408                    throws com.liferay.portal.kernel.exception.PortalException,
409                            com.liferay.portal.kernel.exception.SystemException {
410                    try {
411                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
412                                            "getCategoryMessagesRSS",
413                                            _getCategoryMessagesRSSParameterTypes9);
414    
415                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
416                                            categoryId, status, max, type, version, displayStyle,
417                                            feedURL, entryURL, themeDisplay);
418    
419                            Object returnObj = null;
420    
421                            try {
422                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
423                            }
424                            catch (Exception e) {
425                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
426                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
427                                    }
428    
429                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
430                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
431                                    }
432    
433                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
434                            }
435    
436                            return (java.lang.String)returnObj;
437                    }
438                    catch (com.liferay.portal.kernel.exception.SystemException se) {
439                            _log.error(se, se);
440    
441                            throw se;
442                    }
443            }
444    
445            public static java.lang.String getCompanyMessagesRSS(
446                    HttpPrincipal httpPrincipal, long companyId, int status, int max,
447                    java.lang.String type, double version, java.lang.String displayStyle,
448                    java.lang.String feedURL, java.lang.String entryURL,
449                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
450                    throws com.liferay.portal.kernel.exception.PortalException,
451                            com.liferay.portal.kernel.exception.SystemException {
452                    try {
453                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
454                                            "getCompanyMessagesRSS",
455                                            _getCompanyMessagesRSSParameterTypes10);
456    
457                            MethodHandler methodHandler = new MethodHandler(methodKey,
458                                            companyId, status, max, type, version, displayStyle,
459                                            feedURL, entryURL, themeDisplay);
460    
461                            Object returnObj = null;
462    
463                            try {
464                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
465                            }
466                            catch (Exception e) {
467                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
468                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
469                                    }
470    
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 (java.lang.String)returnObj;
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 int getGroupMessagesCount(HttpPrincipal httpPrincipal,
488                    long groupId, int status)
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    try {
491                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
492                                            "getGroupMessagesCount",
493                                            _getGroupMessagesCountParameterTypes11);
494    
495                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
496                                            status);
497    
498                            Object returnObj = null;
499    
500                            try {
501                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
502                            }
503                            catch (Exception e) {
504                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
505                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
506                                    }
507    
508                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
509                            }
510    
511                            return ((Integer)returnObj).intValue();
512                    }
513                    catch (com.liferay.portal.kernel.exception.SystemException se) {
514                            _log.error(se, se);
515    
516                            throw se;
517                    }
518            }
519    
520            public static java.lang.String getGroupMessagesRSS(
521                    HttpPrincipal httpPrincipal, long groupId, int status, int max,
522                    java.lang.String type, double version, java.lang.String displayStyle,
523                    java.lang.String feedURL, java.lang.String entryURL,
524                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
525                    throws com.liferay.portal.kernel.exception.PortalException,
526                            com.liferay.portal.kernel.exception.SystemException {
527                    try {
528                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
529                                            "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes12);
530    
531                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
532                                            status, max, type, version, displayStyle, feedURL,
533                                            entryURL, themeDisplay);
534    
535                            Object returnObj = null;
536    
537                            try {
538                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
539                            }
540                            catch (Exception e) {
541                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
542                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
543                                    }
544    
545                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
546                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
547                                    }
548    
549                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
550                            }
551    
552                            return (java.lang.String)returnObj;
553                    }
554                    catch (com.liferay.portal.kernel.exception.SystemException se) {
555                            _log.error(se, se);
556    
557                            throw se;
558                    }
559            }
560    
561            public static java.lang.String getGroupMessagesRSS(
562                    HttpPrincipal httpPrincipal, long groupId, long userId, int status,
563                    int max, java.lang.String type, double version,
564                    java.lang.String displayStyle, java.lang.String feedURL,
565                    java.lang.String entryURL,
566                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
567                    throws com.liferay.portal.kernel.exception.PortalException,
568                            com.liferay.portal.kernel.exception.SystemException {
569                    try {
570                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
571                                            "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes13);
572    
573                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
574                                            userId, status, max, type, version, displayStyle, feedURL,
575                                            entryURL, themeDisplay);
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                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
588                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
589                                    }
590    
591                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
592                            }
593    
594                            return (java.lang.String)returnObj;
595                    }
596                    catch (com.liferay.portal.kernel.exception.SystemException se) {
597                            _log.error(se, se);
598    
599                            throw se;
600                    }
601            }
602    
603            public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
604                    HttpPrincipal httpPrincipal, long messageId)
605                    throws com.liferay.portal.kernel.exception.PortalException,
606                            com.liferay.portal.kernel.exception.SystemException {
607                    try {
608                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
609                                            "getMessage", _getMessageParameterTypes14);
610    
611                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
612    
613                            Object returnObj = null;
614    
615                            try {
616                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
617                            }
618                            catch (Exception e) {
619                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
620                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
621                                    }
622    
623                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
624                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
625                                    }
626    
627                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
628                            }
629    
630                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
631                    }
632                    catch (com.liferay.portal.kernel.exception.SystemException se) {
633                            _log.error(se, se);
634    
635                            throw se;
636                    }
637            }
638    
639            public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
640                    HttpPrincipal httpPrincipal, long messageId, int status,
641                    java.lang.String threadView, boolean includePrevAndNext)
642                    throws com.liferay.portal.kernel.exception.PortalException,
643                            com.liferay.portal.kernel.exception.SystemException {
644                    try {
645                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
646                                            "getMessageDisplay", _getMessageDisplayParameterTypes15);
647    
648                            MethodHandler methodHandler = new MethodHandler(methodKey,
649                                            messageId, status, threadView, includePrevAndNext);
650    
651                            Object returnObj = null;
652    
653                            try {
654                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
655                            }
656                            catch (Exception e) {
657                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
658                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
659                                    }
660    
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 (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
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 int getThreadAnswersCount(HttpPrincipal httpPrincipal,
678                    long groupId, long categoryId, long threadId)
679                    throws com.liferay.portal.kernel.exception.SystemException {
680                    try {
681                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
682                                            "getThreadAnswersCount",
683                                            _getThreadAnswersCountParameterTypes16);
684    
685                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
686                                            categoryId, threadId);
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 ((Integer)returnObj).intValue();
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 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
711                    HttpPrincipal httpPrincipal, long groupId, long categoryId,
712                    long threadId, int status, int start, int end)
713                    throws com.liferay.portal.kernel.exception.SystemException {
714                    try {
715                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
716                                            "getThreadMessages", _getThreadMessagesParameterTypes17);
717    
718                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
719                                            categoryId, threadId, status, start, end);
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 (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
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 int getThreadMessagesCount(HttpPrincipal httpPrincipal,
744                    long groupId, long categoryId, long threadId, int status)
745                    throws com.liferay.portal.kernel.exception.SystemException {
746                    try {
747                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
748                                            "getThreadMessagesCount",
749                                            _getThreadMessagesCountParameterTypes18);
750    
751                            MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
752                                            categoryId, threadId, status);
753    
754                            Object returnObj = null;
755    
756                            try {
757                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
758                            }
759                            catch (Exception e) {
760                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
761                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
762                                    }
763    
764                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
765                            }
766    
767                            return ((Integer)returnObj).intValue();
768                    }
769                    catch (com.liferay.portal.kernel.exception.SystemException se) {
770                            _log.error(se, se);
771    
772                            throw se;
773                    }
774            }
775    
776            public static java.lang.String getThreadMessagesRSS(
777                    HttpPrincipal httpPrincipal, long threadId, int status, int max,
778                    java.lang.String type, double version, java.lang.String displayStyle,
779                    java.lang.String feedURL, java.lang.String entryURL,
780                    com.liferay.portal.theme.ThemeDisplay themeDisplay)
781                    throws com.liferay.portal.kernel.exception.PortalException,
782                            com.liferay.portal.kernel.exception.SystemException {
783                    try {
784                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
785                                            "getThreadMessagesRSS",
786                                            _getThreadMessagesRSSParameterTypes19);
787    
788                            MethodHandler methodHandler = new MethodHandler(methodKey,
789                                            threadId, status, max, type, version, displayStyle,
790                                            feedURL, entryURL, themeDisplay);
791    
792                            Object returnObj = null;
793    
794                            try {
795                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
796                            }
797                            catch (Exception e) {
798                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
799                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
800                                    }
801    
802                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
803                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
804                                    }
805    
806                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
807                            }
808    
809                            return (java.lang.String)returnObj;
810                    }
811                    catch (com.liferay.portal.kernel.exception.SystemException se) {
812                            _log.error(se, se);
813    
814                            throw se;
815                    }
816            }
817    
818            public static void subscribeMessage(HttpPrincipal httpPrincipal,
819                    long messageId)
820                    throws com.liferay.portal.kernel.exception.PortalException,
821                            com.liferay.portal.kernel.exception.SystemException {
822                    try {
823                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
824                                            "subscribeMessage", _subscribeMessageParameterTypes20);
825    
826                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
827    
828                            try {
829                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
830                            }
831                            catch (Exception e) {
832                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
833                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
834                                    }
835    
836                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
837                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
838                                    }
839    
840                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
841                            }
842                    }
843                    catch (com.liferay.portal.kernel.exception.SystemException se) {
844                            _log.error(se, se);
845    
846                            throw se;
847                    }
848            }
849    
850            public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
851                    long messageId)
852                    throws com.liferay.portal.kernel.exception.PortalException,
853                            com.liferay.portal.kernel.exception.SystemException {
854                    try {
855                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
856                                            "unsubscribeMessage", _unsubscribeMessageParameterTypes21);
857    
858                            MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
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 void updateAnswer(HttpPrincipal httpPrincipal,
883                    long messageId, boolean answer, boolean cascade)
884                    throws com.liferay.portal.kernel.exception.PortalException,
885                            com.liferay.portal.kernel.exception.SystemException {
886                    try {
887                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
888                                            "updateAnswer", _updateAnswerParameterTypes22);
889    
890                            MethodHandler methodHandler = new MethodHandler(methodKey,
891                                            messageId, answer, cascade);
892    
893                            try {
894                                    TunnelUtil.invoke(httpPrincipal, methodHandler);
895                            }
896                            catch (Exception e) {
897                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
898                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
899                                    }
900    
901                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
902                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
903                                    }
904    
905                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
906                            }
907                    }
908                    catch (com.liferay.portal.kernel.exception.SystemException se) {
909                            _log.error(se, se);
910    
911                            throw se;
912                    }
913            }
914    
915            public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
916                    HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
917                    java.lang.String permissionClassName, long permissionClassPK,
918                    long permissionOwnerId, long messageId, java.lang.String subject,
919                    java.lang.String body,
920                    com.liferay.portal.service.ServiceContext serviceContext)
921                    throws com.liferay.portal.kernel.exception.PortalException,
922                            com.liferay.portal.kernel.exception.SystemException {
923                    try {
924                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
925                                            "updateDiscussionMessage",
926                                            _updateDiscussionMessageParameterTypes23);
927    
928                            MethodHandler methodHandler = new MethodHandler(methodKey,
929                                            className, classPK, permissionClassName, permissionClassPK,
930                                            permissionOwnerId, messageId, subject, body, serviceContext);
931    
932                            Object returnObj = null;
933    
934                            try {
935                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
936                            }
937                            catch (Exception e) {
938                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
939                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
940                                    }
941    
942                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
943                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
944                                    }
945    
946                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
947                            }
948    
949                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
950                    }
951                    catch (com.liferay.portal.kernel.exception.SystemException se) {
952                            _log.error(se, se);
953    
954                            throw se;
955                    }
956            }
957    
958            public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
959                    HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
960                    java.lang.String body,
961                    java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
962                    java.util.List<java.lang.String> existingFiles, double priority,
963                    boolean allowPingbacks,
964                    com.liferay.portal.service.ServiceContext serviceContext)
965                    throws com.liferay.portal.kernel.exception.PortalException,
966                            com.liferay.portal.kernel.exception.SystemException {
967                    try {
968                            MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
969                                            "updateMessage", _updateMessageParameterTypes24);
970    
971                            MethodHandler methodHandler = new MethodHandler(methodKey,
972                                            messageId, subject, body, inputStreamOVPs, existingFiles,
973                                            priority, allowPingbacks, serviceContext);
974    
975                            Object returnObj = null;
976    
977                            try {
978                                    returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
979                            }
980                            catch (Exception e) {
981                                    if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
982                                            throw (com.liferay.portal.kernel.exception.PortalException)e;
983                                    }
984    
985                                    if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
986                                            throw (com.liferay.portal.kernel.exception.SystemException)e;
987                                    }
988    
989                                    throw new com.liferay.portal.kernel.exception.SystemException(e);
990                            }
991    
992                            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
993                    }
994                    catch (com.liferay.portal.kernel.exception.SystemException se) {
995                            _log.error(se, se);
996    
997                            throw se;
998                    }
999            }
1000    
1001            private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
1002            private static final Class<?>[] _addDiscussionMessageParameterTypes0 = new Class[] {
1003                            long.class, java.lang.String.class, long.class,
1004                            java.lang.String.class, long.class, long.class, long.class,
1005                            long.class, java.lang.String.class, java.lang.String.class,
1006                            com.liferay.portal.service.ServiceContext.class
1007                    };
1008            private static final Class<?>[] _addMessageParameterTypes1 = new Class[] {
1009                            long.class, long.class, long.class, long.class,
1010                            java.lang.String.class, java.lang.String.class,
1011                            java.lang.String.class, java.util.List.class, boolean.class,
1012                            double.class, boolean.class,
1013                            com.liferay.portal.service.ServiceContext.class
1014                    };
1015            private static final Class<?>[] _addMessageParameterTypes2 = new Class[] {
1016                            long.class, long.class, java.lang.String.class,
1017                            java.lang.String.class, java.lang.String.class, java.util.List.class,
1018                            boolean.class, double.class, boolean.class,
1019                            com.liferay.portal.service.ServiceContext.class
1020                    };
1021            private static final Class<?>[] _addMessageParameterTypes3 = new Class[] {
1022                            long.class, java.lang.String.class, java.lang.String.class,
1023                            java.lang.String.class, java.util.List.class, boolean.class,
1024                            double.class, boolean.class,
1025                            com.liferay.portal.service.ServiceContext.class
1026                    };
1027            private static final Class<?>[] _deleteDiscussionMessageParameterTypes4 = new Class[] {
1028                            long.class, java.lang.String.class, long.class,
1029                            java.lang.String.class, long.class, long.class, long.class
1030                    };
1031            private static final Class<?>[] _deleteMessageParameterTypes5 = new Class[] {
1032                            long.class
1033                    };
1034            private static final Class<?>[] _deleteMessageAttachmentsParameterTypes6 = new Class[] {
1035                            long.class
1036                    };
1037            private static final Class<?>[] _getCategoryMessagesParameterTypes7 = new Class[] {
1038                            long.class, long.class, int.class, int.class, int.class
1039                    };
1040            private static final Class<?>[] _getCategoryMessagesCountParameterTypes8 = new Class[] {
1041                            long.class, long.class, int.class
1042                    };
1043            private static final Class<?>[] _getCategoryMessagesRSSParameterTypes9 = new Class[] {
1044                            long.class, long.class, int.class, int.class, java.lang.String.class,
1045                            double.class, java.lang.String.class, java.lang.String.class,
1046                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1047                    };
1048            private static final Class<?>[] _getCompanyMessagesRSSParameterTypes10 = new Class[] {
1049                            long.class, int.class, int.class, java.lang.String.class,
1050                            double.class, java.lang.String.class, java.lang.String.class,
1051                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1052                    };
1053            private static final Class<?>[] _getGroupMessagesCountParameterTypes11 = new Class[] {
1054                            long.class, int.class
1055                    };
1056            private static final Class<?>[] _getGroupMessagesRSSParameterTypes12 = new Class[] {
1057                            long.class, int.class, int.class, java.lang.String.class,
1058                            double.class, java.lang.String.class, java.lang.String.class,
1059                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1060                    };
1061            private static final Class<?>[] _getGroupMessagesRSSParameterTypes13 = new Class[] {
1062                            long.class, long.class, int.class, int.class, java.lang.String.class,
1063                            double.class, java.lang.String.class, java.lang.String.class,
1064                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1065                    };
1066            private static final Class<?>[] _getMessageParameterTypes14 = new Class[] {
1067                            long.class
1068                    };
1069            private static final Class<?>[] _getMessageDisplayParameterTypes15 = new Class[] {
1070                            long.class, int.class, java.lang.String.class, boolean.class
1071                    };
1072            private static final Class<?>[] _getThreadAnswersCountParameterTypes16 = new Class[] {
1073                            long.class, long.class, long.class
1074                    };
1075            private static final Class<?>[] _getThreadMessagesParameterTypes17 = new Class[] {
1076                            long.class, long.class, long.class, int.class, int.class, int.class
1077                    };
1078            private static final Class<?>[] _getThreadMessagesCountParameterTypes18 = new Class[] {
1079                            long.class, long.class, long.class, int.class
1080                    };
1081            private static final Class<?>[] _getThreadMessagesRSSParameterTypes19 = new Class[] {
1082                            long.class, int.class, int.class, java.lang.String.class,
1083                            double.class, java.lang.String.class, java.lang.String.class,
1084                            java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
1085                    };
1086            private static final Class<?>[] _subscribeMessageParameterTypes20 = new Class[] {
1087                            long.class
1088                    };
1089            private static final Class<?>[] _unsubscribeMessageParameterTypes21 = new Class[] {
1090                            long.class
1091                    };
1092            private static final Class<?>[] _updateAnswerParameterTypes22 = new Class[] {
1093                            long.class, boolean.class, boolean.class
1094                    };
1095            private static final Class<?>[] _updateDiscussionMessageParameterTypes23 = new Class[] {
1096                            java.lang.String.class, long.class, java.lang.String.class,
1097                            long.class, long.class, long.class, java.lang.String.class,
1098                            java.lang.String.class,
1099                            com.liferay.portal.service.ServiceContext.class
1100                    };
1101            private static final Class<?>[] _updateMessageParameterTypes24 = new Class[] {
1102                            long.class, java.lang.String.class, java.lang.String.class,
1103                            java.util.List.class, java.util.List.class, double.class,
1104                            boolean.class, com.liferay.portal.service.ServiceContext.class
1105                    };
1106    }