1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.messageboards.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.kernel.util.MethodHandler;
20  import com.liferay.portal.kernel.util.MethodKey;
21  import com.liferay.portal.security.auth.HttpPrincipal;
22  import com.liferay.portal.service.http.TunnelUtil;
23  
24  import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
25  
26  /**
27   * <a href="MBMessageServiceHttp.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides a HTTP utility for the
36   * {@link com.liferay.portlet.messageboards.service.MBMessageServiceUtil} service utility. The
37   * static methods of this class calls the same methods of the service utility.
38   * However, the signatures are different because it requires an additional
39   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
40   * </p>
41   *
42   * <p>
43   * The benefits of using the HTTP utility is that it is fast and allows for
44   * tunneling without the cost of serializing to text. The drawback is that it
45   * only works with Java.
46   * </p>
47   *
48   * <p>
49   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
50   * configure security.
51   * </p>
52   *
53   * <p>
54   * The HTTP utility is only generated for remote services.
55   * </p>
56   *
57   * @author    Brian Wing Shun Chan
58   * @see       MBMessageServiceSoap
59   * @see       com.liferay.portal.security.auth.HttpPrincipal
60   * @see       com.liferay.portlet.messageboards.service.MBMessageServiceUtil
61   * @generated
62   */
63  public class MBMessageServiceHttp {
64      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
65          HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
66          long ownerId, long threadId, long parentMessageId,
67          java.lang.String subject, java.lang.String body,
68          com.liferay.portal.service.ServiceContext serviceContext)
69          throws com.liferay.portal.PortalException,
70              com.liferay.portal.SystemException {
71          try {
72              MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
73                      "addDiscussionMessage", _addDiscussionMessageParameterTypes0);
74  
75              MethodHandler methodHandler = new MethodHandler(methodKey,
76                      className, classPK, ownerId, threadId, parentMessageId,
77                      subject, body, serviceContext);
78  
79              Object returnObj = null;
80  
81              try {
82                  returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
83              }
84              catch (Exception e) {
85                  if (e instanceof com.liferay.portal.PortalException) {
86                      throw (com.liferay.portal.PortalException)e;
87                  }
88  
89                  if (e instanceof com.liferay.portal.SystemException) {
90                      throw (com.liferay.portal.SystemException)e;
91                  }
92  
93                  throw new com.liferay.portal.SystemException(e);
94              }
95  
96              return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
97          }
98          catch (com.liferay.portal.SystemException se) {
99              _log.error(se, se);
100 
101             throw se;
102         }
103     }
104 
105     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
106         HttpPrincipal httpPrincipal, long categoryId, long threadId,
107         long parentMessageId, java.lang.String subject, java.lang.String body,
108         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
109         boolean anonymous, double priority,
110         com.liferay.portal.service.ServiceContext serviceContext)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException {
113         try {
114             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
115                     "addMessage", _addMessageParameterTypes1);
116 
117             MethodHandler methodHandler = new MethodHandler(methodKey,
118                     categoryId, threadId, parentMessageId, subject, body,
119                     files, anonymous, priority, serviceContext);
120 
121             Object returnObj = null;
122 
123             try {
124                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
125             }
126             catch (Exception e) {
127                 if (e instanceof com.liferay.portal.PortalException) {
128                     throw (com.liferay.portal.PortalException)e;
129                 }
130 
131                 if (e instanceof com.liferay.portal.SystemException) {
132                     throw (com.liferay.portal.SystemException)e;
133                 }
134 
135                 throw new com.liferay.portal.SystemException(e);
136             }
137 
138             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
139         }
140         catch (com.liferay.portal.SystemException se) {
141             _log.error(se, se);
142 
143             throw se;
144         }
145     }
146 
147     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
148         HttpPrincipal httpPrincipal, long categoryId, java.lang.String subject,
149         java.lang.String body,
150         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
151         boolean anonymous, double priority,
152         com.liferay.portal.service.ServiceContext serviceContext)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException {
155         try {
156             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
157                     "addMessage", _addMessageParameterTypes2);
158 
159             MethodHandler methodHandler = new MethodHandler(methodKey,
160                     categoryId, subject, body, files, anonymous, priority,
161                     serviceContext);
162 
163             Object returnObj = null;
164 
165             try {
166                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
167             }
168             catch (Exception e) {
169                 if (e instanceof com.liferay.portal.PortalException) {
170                     throw (com.liferay.portal.PortalException)e;
171                 }
172 
173                 if (e instanceof com.liferay.portal.SystemException) {
174                     throw (com.liferay.portal.SystemException)e;
175                 }
176 
177                 throw new com.liferay.portal.SystemException(e);
178             }
179 
180             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
181         }
182         catch (com.liferay.portal.SystemException se) {
183             _log.error(se, se);
184 
185             throw se;
186         }
187     }
188 
189     public static void deleteDiscussionMessage(HttpPrincipal httpPrincipal,
190         long groupId, java.lang.String className, long classPK, long ownerId,
191         long messageId)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException {
194         try {
195             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
196                     "deleteDiscussionMessage",
197                     _deleteDiscussionMessageParameterTypes3);
198 
199             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
200                     className, classPK, ownerId, messageId);
201 
202             try {
203                 TunnelUtil.invoke(httpPrincipal, methodHandler);
204             }
205             catch (Exception e) {
206                 if (e instanceof com.liferay.portal.PortalException) {
207                     throw (com.liferay.portal.PortalException)e;
208                 }
209 
210                 if (e instanceof com.liferay.portal.SystemException) {
211                     throw (com.liferay.portal.SystemException)e;
212                 }
213 
214                 throw new com.liferay.portal.SystemException(e);
215             }
216         }
217         catch (com.liferay.portal.SystemException se) {
218             _log.error(se, se);
219 
220             throw se;
221         }
222     }
223 
224     public static void deleteMessage(HttpPrincipal httpPrincipal, long messageId)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         try {
228             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
229                     "deleteMessage", _deleteMessageParameterTypes4);
230 
231             MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
232 
233             try {
234                 TunnelUtil.invoke(httpPrincipal, methodHandler);
235             }
236             catch (Exception e) {
237                 if (e instanceof com.liferay.portal.PortalException) {
238                     throw (com.liferay.portal.PortalException)e;
239                 }
240 
241                 if (e instanceof com.liferay.portal.SystemException) {
242                     throw (com.liferay.portal.SystemException)e;
243                 }
244 
245                 throw new com.liferay.portal.SystemException(e);
246             }
247         }
248         catch (com.liferay.portal.SystemException se) {
249             _log.error(se, se);
250 
251             throw se;
252         }
253     }
254 
255     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
256         HttpPrincipal httpPrincipal, long categoryId, int start, int end)
257         throws com.liferay.portal.PortalException,
258             com.liferay.portal.SystemException {
259         try {
260             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
261                     "getCategoryMessages", _getCategoryMessagesParameterTypes5);
262 
263             MethodHandler methodHandler = new MethodHandler(methodKey,
264                     categoryId, start, end);
265 
266             Object returnObj = null;
267 
268             try {
269                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
270             }
271             catch (Exception e) {
272                 if (e instanceof com.liferay.portal.PortalException) {
273                     throw (com.liferay.portal.PortalException)e;
274                 }
275 
276                 if (e instanceof com.liferay.portal.SystemException) {
277                     throw (com.liferay.portal.SystemException)e;
278                 }
279 
280                 throw new com.liferay.portal.SystemException(e);
281             }
282 
283             return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
284         }
285         catch (com.liferay.portal.SystemException se) {
286             _log.error(se, se);
287 
288             throw se;
289         }
290     }
291 
292     public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
293         long categoryId) throws com.liferay.portal.SystemException {
294         try {
295             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
296                     "getCategoryMessagesCount",
297                     _getCategoryMessagesCountParameterTypes6);
298 
299             MethodHandler methodHandler = new MethodHandler(methodKey,
300                     categoryId);
301 
302             Object returnObj = null;
303 
304             try {
305                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
306             }
307             catch (Exception e) {
308                 if (e instanceof com.liferay.portal.SystemException) {
309                     throw (com.liferay.portal.SystemException)e;
310                 }
311 
312                 throw new com.liferay.portal.SystemException(e);
313             }
314 
315             return ((Integer)returnObj).intValue();
316         }
317         catch (com.liferay.portal.SystemException se) {
318             _log.error(se, se);
319 
320             throw se;
321         }
322     }
323 
324     public static java.lang.String getCategoryMessagesRSS(
325         HttpPrincipal httpPrincipal, long categoryId, int max,
326         java.lang.String type, double version, java.lang.String displayStyle,
327         java.lang.String feedURL, java.lang.String entryURL,
328         com.liferay.portal.theme.ThemeDisplay themeDisplay)
329         throws com.liferay.portal.PortalException,
330             com.liferay.portal.SystemException {
331         try {
332             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
333                     "getCategoryMessagesRSS",
334                     _getCategoryMessagesRSSParameterTypes7);
335 
336             MethodHandler methodHandler = new MethodHandler(methodKey,
337                     categoryId, max, type, version, displayStyle, feedURL,
338                     entryURL, themeDisplay);
339 
340             Object returnObj = null;
341 
342             try {
343                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
344             }
345             catch (Exception e) {
346                 if (e instanceof com.liferay.portal.PortalException) {
347                     throw (com.liferay.portal.PortalException)e;
348                 }
349 
350                 if (e instanceof com.liferay.portal.SystemException) {
351                     throw (com.liferay.portal.SystemException)e;
352                 }
353 
354                 throw new com.liferay.portal.SystemException(e);
355             }
356 
357             return (java.lang.String)returnObj;
358         }
359         catch (com.liferay.portal.SystemException se) {
360             _log.error(se, se);
361 
362             throw se;
363         }
364     }
365 
366     public static java.lang.String getCompanyMessagesRSS(
367         HttpPrincipal httpPrincipal, long companyId, int max,
368         java.lang.String type, double version, java.lang.String displayStyle,
369         java.lang.String feedURL, java.lang.String entryURL,
370         com.liferay.portal.theme.ThemeDisplay themeDisplay)
371         throws com.liferay.portal.PortalException,
372             com.liferay.portal.SystemException {
373         try {
374             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
375                     "getCompanyMessagesRSS",
376                     _getCompanyMessagesRSSParameterTypes8);
377 
378             MethodHandler methodHandler = new MethodHandler(methodKey,
379                     companyId, max, type, version, displayStyle, feedURL,
380                     entryURL, themeDisplay);
381 
382             Object returnObj = null;
383 
384             try {
385                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
386             }
387             catch (Exception e) {
388                 if (e instanceof com.liferay.portal.PortalException) {
389                     throw (com.liferay.portal.PortalException)e;
390                 }
391 
392                 if (e instanceof com.liferay.portal.SystemException) {
393                     throw (com.liferay.portal.SystemException)e;
394                 }
395 
396                 throw new com.liferay.portal.SystemException(e);
397             }
398 
399             return (java.lang.String)returnObj;
400         }
401         catch (com.liferay.portal.SystemException se) {
402             _log.error(se, se);
403 
404             throw se;
405         }
406     }
407 
408     public static java.lang.String getGroupMessagesRSS(
409         HttpPrincipal httpPrincipal, long groupId, int max,
410         java.lang.String type, double version, java.lang.String displayStyle,
411         java.lang.String feedURL, java.lang.String entryURL,
412         com.liferay.portal.theme.ThemeDisplay themeDisplay)
413         throws com.liferay.portal.PortalException,
414             com.liferay.portal.SystemException {
415         try {
416             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
417                     "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes9);
418 
419             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
420                     max, type, version, displayStyle, feedURL, entryURL,
421                     themeDisplay);
422 
423             Object returnObj = null;
424 
425             try {
426                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
427             }
428             catch (Exception e) {
429                 if (e instanceof com.liferay.portal.PortalException) {
430                     throw (com.liferay.portal.PortalException)e;
431                 }
432 
433                 if (e instanceof com.liferay.portal.SystemException) {
434                     throw (com.liferay.portal.SystemException)e;
435                 }
436 
437                 throw new com.liferay.portal.SystemException(e);
438             }
439 
440             return (java.lang.String)returnObj;
441         }
442         catch (com.liferay.portal.SystemException se) {
443             _log.error(se, se);
444 
445             throw se;
446         }
447     }
448 
449     public static java.lang.String getGroupMessagesRSS(
450         HttpPrincipal httpPrincipal, long groupId, long userId, int max,
451         java.lang.String type, double version, java.lang.String displayStyle,
452         java.lang.String feedURL, java.lang.String entryURL,
453         com.liferay.portal.theme.ThemeDisplay themeDisplay)
454         throws com.liferay.portal.PortalException,
455             com.liferay.portal.SystemException {
456         try {
457             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
458                     "getGroupMessagesRSS", _getGroupMessagesRSSParameterTypes10);
459 
460             MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
461                     userId, max, type, version, displayStyle, feedURL,
462                     entryURL, themeDisplay);
463 
464             Object returnObj = null;
465 
466             try {
467                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
468             }
469             catch (Exception e) {
470                 if (e instanceof com.liferay.portal.PortalException) {
471                     throw (com.liferay.portal.PortalException)e;
472                 }
473 
474                 if (e instanceof com.liferay.portal.SystemException) {
475                     throw (com.liferay.portal.SystemException)e;
476                 }
477 
478                 throw new com.liferay.portal.SystemException(e);
479             }
480 
481             return (java.lang.String)returnObj;
482         }
483         catch (com.liferay.portal.SystemException se) {
484             _log.error(se, se);
485 
486             throw se;
487         }
488     }
489 
490     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
491         HttpPrincipal httpPrincipal, long messageId)
492         throws com.liferay.portal.PortalException,
493             com.liferay.portal.SystemException {
494         try {
495             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
496                     "getMessage", _getMessageParameterTypes11);
497 
498             MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
499 
500             Object returnObj = null;
501 
502             try {
503                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
504             }
505             catch (Exception e) {
506                 if (e instanceof com.liferay.portal.PortalException) {
507                     throw (com.liferay.portal.PortalException)e;
508                 }
509 
510                 if (e instanceof com.liferay.portal.SystemException) {
511                     throw (com.liferay.portal.SystemException)e;
512                 }
513 
514                 throw new com.liferay.portal.SystemException(e);
515             }
516 
517             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
518         }
519         catch (com.liferay.portal.SystemException se) {
520             _log.error(se, se);
521 
522             throw se;
523         }
524     }
525 
526     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
527         HttpPrincipal httpPrincipal, long messageId, java.lang.String threadView)
528         throws com.liferay.portal.PortalException,
529             com.liferay.portal.SystemException {
530         try {
531             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
532                     "getMessageDisplay", _getMessageDisplayParameterTypes12);
533 
534             MethodHandler methodHandler = new MethodHandler(methodKey,
535                     messageId, threadView);
536 
537             Object returnObj = null;
538 
539             try {
540                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
541             }
542             catch (Exception e) {
543                 if (e instanceof com.liferay.portal.PortalException) {
544                     throw (com.liferay.portal.PortalException)e;
545                 }
546 
547                 if (e instanceof com.liferay.portal.SystemException) {
548                     throw (com.liferay.portal.SystemException)e;
549                 }
550 
551                 throw new com.liferay.portal.SystemException(e);
552             }
553 
554             return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
555         }
556         catch (com.liferay.portal.SystemException se) {
557             _log.error(se, se);
558 
559             throw se;
560         }
561     }
562 
563     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
564         HttpPrincipal httpPrincipal, long messageId,
565         java.lang.String threadView, boolean includePrevAndNext)
566         throws com.liferay.portal.PortalException,
567             com.liferay.portal.SystemException {
568         try {
569             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
570                     "getMessageDisplay", _getMessageDisplayParameterTypes13);
571 
572             MethodHandler methodHandler = new MethodHandler(methodKey,
573                     messageId, threadView, includePrevAndNext);
574 
575             Object returnObj = null;
576 
577             try {
578                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
579             }
580             catch (Exception e) {
581                 if (e instanceof com.liferay.portal.PortalException) {
582                     throw (com.liferay.portal.PortalException)e;
583                 }
584 
585                 if (e instanceof com.liferay.portal.SystemException) {
586                     throw (com.liferay.portal.SystemException)e;
587                 }
588 
589                 throw new com.liferay.portal.SystemException(e);
590             }
591 
592             return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
593         }
594         catch (com.liferay.portal.SystemException se) {
595             _log.error(se, se);
596 
597             throw se;
598         }
599     }
600 
601     public static java.lang.String getThreadMessagesRSS(
602         HttpPrincipal httpPrincipal, long threadId, int max,
603         java.lang.String type, double version, java.lang.String displayStyle,
604         java.lang.String feedURL, java.lang.String entryURL,
605         com.liferay.portal.theme.ThemeDisplay themeDisplay)
606         throws com.liferay.portal.PortalException,
607             com.liferay.portal.SystemException {
608         try {
609             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
610                     "getThreadMessagesRSS",
611                     _getThreadMessagesRSSParameterTypes14);
612 
613             MethodHandler methodHandler = new MethodHandler(methodKey,
614                     threadId, max, type, version, displayStyle, feedURL,
615                     entryURL, themeDisplay);
616 
617             Object returnObj = null;
618 
619             try {
620                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
621             }
622             catch (Exception e) {
623                 if (e instanceof com.liferay.portal.PortalException) {
624                     throw (com.liferay.portal.PortalException)e;
625                 }
626 
627                 if (e instanceof com.liferay.portal.SystemException) {
628                     throw (com.liferay.portal.SystemException)e;
629                 }
630 
631                 throw new com.liferay.portal.SystemException(e);
632             }
633 
634             return (java.lang.String)returnObj;
635         }
636         catch (com.liferay.portal.SystemException se) {
637             _log.error(se, se);
638 
639             throw se;
640         }
641     }
642 
643     public static void subscribeMessage(HttpPrincipal httpPrincipal,
644         long messageId)
645         throws com.liferay.portal.PortalException,
646             com.liferay.portal.SystemException {
647         try {
648             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
649                     "subscribeMessage", _subscribeMessageParameterTypes15);
650 
651             MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
652 
653             try {
654                 TunnelUtil.invoke(httpPrincipal, methodHandler);
655             }
656             catch (Exception e) {
657                 if (e instanceof com.liferay.portal.PortalException) {
658                     throw (com.liferay.portal.PortalException)e;
659                 }
660 
661                 if (e instanceof com.liferay.portal.SystemException) {
662                     throw (com.liferay.portal.SystemException)e;
663                 }
664 
665                 throw new com.liferay.portal.SystemException(e);
666             }
667         }
668         catch (com.liferay.portal.SystemException se) {
669             _log.error(se, se);
670 
671             throw se;
672         }
673     }
674 
675     public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
676         long messageId)
677         throws com.liferay.portal.PortalException,
678             com.liferay.portal.SystemException {
679         try {
680             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
681                     "unsubscribeMessage", _unsubscribeMessageParameterTypes16);
682 
683             MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
684 
685             try {
686                 TunnelUtil.invoke(httpPrincipal, methodHandler);
687             }
688             catch (Exception e) {
689                 if (e instanceof com.liferay.portal.PortalException) {
690                     throw (com.liferay.portal.PortalException)e;
691                 }
692 
693                 if (e instanceof com.liferay.portal.SystemException) {
694                     throw (com.liferay.portal.SystemException)e;
695                 }
696 
697                 throw new com.liferay.portal.SystemException(e);
698             }
699         }
700         catch (com.liferay.portal.SystemException se) {
701             _log.error(se, se);
702 
703             throw se;
704         }
705     }
706 
707     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
708         HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
709         long ownerId, long messageId, java.lang.String subject,
710         java.lang.String body,
711         com.liferay.portal.service.ServiceContext serviceContext)
712         throws com.liferay.portal.PortalException,
713             com.liferay.portal.SystemException {
714         try {
715             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
716                     "updateDiscussionMessage",
717                     _updateDiscussionMessageParameterTypes17);
718 
719             MethodHandler methodHandler = new MethodHandler(methodKey,
720                     className, classPK, ownerId, messageId, subject, body,
721                     serviceContext);
722 
723             Object returnObj = null;
724 
725             try {
726                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
727             }
728             catch (Exception e) {
729                 if (e instanceof com.liferay.portal.PortalException) {
730                     throw (com.liferay.portal.PortalException)e;
731                 }
732 
733                 if (e instanceof com.liferay.portal.SystemException) {
734                     throw (com.liferay.portal.SystemException)e;
735                 }
736 
737                 throw new com.liferay.portal.SystemException(e);
738             }
739 
740             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
741         }
742         catch (com.liferay.portal.SystemException se) {
743             _log.error(se, se);
744 
745             throw se;
746         }
747     }
748 
749     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
750         HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
751         java.lang.String body,
752         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
753         java.util.List<java.lang.String> existingFiles, double priority,
754         com.liferay.portal.service.ServiceContext serviceContext)
755         throws com.liferay.portal.PortalException,
756             com.liferay.portal.SystemException {
757         try {
758             MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
759                     "updateMessage", _updateMessageParameterTypes18);
760 
761             MethodHandler methodHandler = new MethodHandler(methodKey,
762                     messageId, subject, body, files, existingFiles, priority,
763                     serviceContext);
764 
765             Object returnObj = null;
766 
767             try {
768                 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
769             }
770             catch (Exception e) {
771                 if (e instanceof com.liferay.portal.PortalException) {
772                     throw (com.liferay.portal.PortalException)e;
773                 }
774 
775                 if (e instanceof com.liferay.portal.SystemException) {
776                     throw (com.liferay.portal.SystemException)e;
777                 }
778 
779                 throw new com.liferay.portal.SystemException(e);
780             }
781 
782             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
783         }
784         catch (com.liferay.portal.SystemException se) {
785             _log.error(se, se);
786 
787             throw se;
788         }
789     }
790 
791     private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
792     private static final Class<?>[] _addDiscussionMessageParameterTypes0 = new Class[] {
793             java.lang.String.class, long.class, long.class, long.class,
794             long.class, java.lang.String.class, java.lang.String.class,
795             com.liferay.portal.service.ServiceContext.class
796         };
797     private static final Class<?>[] _addMessageParameterTypes1 = new Class[] {
798             long.class, long.class, long.class, java.lang.String.class,
799             java.lang.String.class, java.util.List.class, boolean.class,
800             double.class, com.liferay.portal.service.ServiceContext.class
801         };
802     private static final Class<?>[] _addMessageParameterTypes2 = new Class[] {
803             long.class, java.lang.String.class, java.lang.String.class,
804             java.util.List.class, boolean.class, double.class,
805             com.liferay.portal.service.ServiceContext.class
806         };
807     private static final Class<?>[] _deleteDiscussionMessageParameterTypes3 = new Class[] {
808             long.class, java.lang.String.class, long.class, long.class,
809             long.class
810         };
811     private static final Class<?>[] _deleteMessageParameterTypes4 = new Class[] {
812             long.class
813         };
814     private static final Class<?>[] _getCategoryMessagesParameterTypes5 = new Class[] {
815             long.class, int.class, int.class
816         };
817     private static final Class<?>[] _getCategoryMessagesCountParameterTypes6 = new Class[] {
818             long.class
819         };
820     private static final Class<?>[] _getCategoryMessagesRSSParameterTypes7 = new Class[] {
821             long.class, int.class, java.lang.String.class, double.class,
822             java.lang.String.class, java.lang.String.class,
823             java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
824         };
825     private static final Class<?>[] _getCompanyMessagesRSSParameterTypes8 = new Class[] {
826             long.class, int.class, java.lang.String.class, double.class,
827             java.lang.String.class, java.lang.String.class,
828             java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
829         };
830     private static final Class<?>[] _getGroupMessagesRSSParameterTypes9 = new Class[] {
831             long.class, int.class, java.lang.String.class, double.class,
832             java.lang.String.class, java.lang.String.class,
833             java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
834         };
835     private static final Class<?>[] _getGroupMessagesRSSParameterTypes10 = new Class[] {
836             long.class, long.class, int.class, java.lang.String.class,
837             double.class, java.lang.String.class, java.lang.String.class,
838             java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
839         };
840     private static final Class<?>[] _getMessageParameterTypes11 = new Class[] {
841             long.class
842         };
843     private static final Class<?>[] _getMessageDisplayParameterTypes12 = new Class[] {
844             long.class, java.lang.String.class
845         };
846     private static final Class<?>[] _getMessageDisplayParameterTypes13 = new Class[] {
847             long.class, java.lang.String.class, boolean.class
848         };
849     private static final Class<?>[] _getThreadMessagesRSSParameterTypes14 = new Class[] {
850             long.class, int.class, java.lang.String.class, double.class,
851             java.lang.String.class, java.lang.String.class,
852             java.lang.String.class, com.liferay.portal.theme.ThemeDisplay.class
853         };
854     private static final Class<?>[] _subscribeMessageParameterTypes15 = new Class[] {
855             long.class
856         };
857     private static final Class<?>[] _unsubscribeMessageParameterTypes16 = new Class[] {
858             long.class
859         };
860     private static final Class<?>[] _updateDiscussionMessageParameterTypes17 = new Class[] {
861             java.lang.String.class, long.class, long.class, long.class,
862             java.lang.String.class, java.lang.String.class,
863             com.liferay.portal.service.ServiceContext.class
864         };
865     private static final Class<?>[] _updateMessageParameterTypes18 = new Class[] {
866             long.class, java.lang.String.class, java.lang.String.class,
867             java.util.List.class, java.util.List.class, double.class,
868             com.liferay.portal.service.ServiceContext.class
869         };
870 }