1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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.BooleanWrapper;
20  import com.liferay.portal.kernel.util.DoubleWrapper;
21  import com.liferay.portal.kernel.util.IntegerWrapper;
22  import com.liferay.portal.kernel.util.LongWrapper;
23  import com.liferay.portal.kernel.util.MethodWrapper;
24  import com.liferay.portal.kernel.util.NullWrapper;
25  import com.liferay.portal.security.auth.HttpPrincipal;
26  import com.liferay.portal.service.http.TunnelUtil;
27  
28  import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
29  
30  /**
31   * <a href="MBMessageServiceHttp.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class provides a HTTP utility for the
40   * {@link com.liferay.portlet.messageboards.service.MBMessageServiceUtil} service utility. The
41   * static methods of this class calls the same methods of the service utility.
42   * However, the signatures are different because it requires an additional
43   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
44   * </p>
45   *
46   * <p>
47   * The benefits of using the HTTP utility is that it is fast and allows for
48   * tunneling without the cost of serializing to text. The drawback is that it
49   * only works with Java.
50   * </p>
51   *
52   * <p>
53   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
54   * configure security.
55   * </p>
56   *
57   * <p>
58   * The HTTP utility is only generated for remote services.
59   * </p>
60   *
61   * @author    Brian Wing Shun Chan
62   * @see       MBMessageServiceSoap
63   * @see       com.liferay.portal.security.auth.HttpPrincipal
64   * @see       com.liferay.portlet.messageboards.service.MBMessageServiceUtil
65   * @generated
66   */
67  public class MBMessageServiceHttp {
68      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
69          HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
70          java.lang.String permissionClassName, long permissionClassPK,
71          long threadId, long parentMessageId, java.lang.String subject,
72          java.lang.String body,
73          com.liferay.portal.service.ServiceContext serviceContext)
74          throws com.liferay.portal.kernel.exception.PortalException,
75              com.liferay.portal.kernel.exception.SystemException {
76          try {
77              Object paramObj0 = className;
78  
79              if (className == null) {
80                  paramObj0 = new NullWrapper("java.lang.String");
81              }
82  
83              Object paramObj1 = new LongWrapper(classPK);
84  
85              Object paramObj2 = permissionClassName;
86  
87              if (permissionClassName == null) {
88                  paramObj2 = new NullWrapper("java.lang.String");
89              }
90  
91              Object paramObj3 = new LongWrapper(permissionClassPK);
92  
93              Object paramObj4 = new LongWrapper(threadId);
94  
95              Object paramObj5 = new LongWrapper(parentMessageId);
96  
97              Object paramObj6 = subject;
98  
99              if (subject == null) {
100                 paramObj6 = new NullWrapper("java.lang.String");
101             }
102 
103             Object paramObj7 = body;
104 
105             if (body == null) {
106                 paramObj7 = new NullWrapper("java.lang.String");
107             }
108 
109             Object paramObj8 = serviceContext;
110 
111             if (serviceContext == null) {
112                 paramObj8 = new NullWrapper(
113                         "com.liferay.portal.service.ServiceContext");
114             }
115 
116             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
117                     "addDiscussionMessage",
118                     new Object[] {
119                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
120                         paramObj5, paramObj6, paramObj7, paramObj8
121                     });
122 
123             Object returnObj = null;
124 
125             try {
126                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
127             }
128             catch (Exception e) {
129                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
130                     throw (com.liferay.portal.kernel.exception.PortalException)e;
131                 }
132 
133                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
134                     throw (com.liferay.portal.kernel.exception.SystemException)e;
135                 }
136 
137                 throw new com.liferay.portal.kernel.exception.SystemException(e);
138             }
139 
140             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
141         }
142         catch (com.liferay.portal.kernel.exception.SystemException se) {
143             _log.error(se, se);
144 
145             throw se;
146         }
147     }
148 
149     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
150         HttpPrincipal httpPrincipal, long groupId, long categoryId,
151         java.lang.String subject, java.lang.String body,
152         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
153         boolean anonymous, double priority, boolean allowPingbacks,
154         com.liferay.portal.service.ServiceContext serviceContext)
155         throws com.liferay.portal.kernel.exception.PortalException,
156             com.liferay.portal.kernel.exception.SystemException {
157         try {
158             Object paramObj0 = new LongWrapper(groupId);
159 
160             Object paramObj1 = new LongWrapper(categoryId);
161 
162             Object paramObj2 = subject;
163 
164             if (subject == null) {
165                 paramObj2 = new NullWrapper("java.lang.String");
166             }
167 
168             Object paramObj3 = body;
169 
170             if (body == null) {
171                 paramObj3 = new NullWrapper("java.lang.String");
172             }
173 
174             Object paramObj4 = files;
175 
176             if (files == null) {
177                 paramObj4 = new NullWrapper("java.util.List");
178             }
179 
180             Object paramObj5 = new BooleanWrapper(anonymous);
181 
182             Object paramObj6 = new DoubleWrapper(priority);
183 
184             Object paramObj7 = new BooleanWrapper(allowPingbacks);
185 
186             Object paramObj8 = serviceContext;
187 
188             if (serviceContext == null) {
189                 paramObj8 = new NullWrapper(
190                         "com.liferay.portal.service.ServiceContext");
191             }
192 
193             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
194                     "addMessage",
195                     new Object[] {
196                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
197                         paramObj5, paramObj6, paramObj7, paramObj8
198                     });
199 
200             Object returnObj = null;
201 
202             try {
203                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
204             }
205             catch (Exception e) {
206                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
207                     throw (com.liferay.portal.kernel.exception.PortalException)e;
208                 }
209 
210                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
211                     throw (com.liferay.portal.kernel.exception.SystemException)e;
212                 }
213 
214                 throw new com.liferay.portal.kernel.exception.SystemException(e);
215             }
216 
217             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
218         }
219         catch (com.liferay.portal.kernel.exception.SystemException se) {
220             _log.error(se, se);
221 
222             throw se;
223         }
224     }
225 
226     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
227         HttpPrincipal httpPrincipal, long groupId, long categoryId,
228         long threadId, long parentMessageId, java.lang.String subject,
229         java.lang.String body,
230         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
231         boolean anonymous, double priority, boolean allowPingbacks,
232         com.liferay.portal.service.ServiceContext serviceContext)
233         throws com.liferay.portal.kernel.exception.PortalException,
234             com.liferay.portal.kernel.exception.SystemException {
235         try {
236             Object paramObj0 = new LongWrapper(groupId);
237 
238             Object paramObj1 = new LongWrapper(categoryId);
239 
240             Object paramObj2 = new LongWrapper(threadId);
241 
242             Object paramObj3 = new LongWrapper(parentMessageId);
243 
244             Object paramObj4 = subject;
245 
246             if (subject == null) {
247                 paramObj4 = new NullWrapper("java.lang.String");
248             }
249 
250             Object paramObj5 = body;
251 
252             if (body == null) {
253                 paramObj5 = new NullWrapper("java.lang.String");
254             }
255 
256             Object paramObj6 = files;
257 
258             if (files == null) {
259                 paramObj6 = new NullWrapper("java.util.List");
260             }
261 
262             Object paramObj7 = new BooleanWrapper(anonymous);
263 
264             Object paramObj8 = new DoubleWrapper(priority);
265 
266             Object paramObj9 = new BooleanWrapper(allowPingbacks);
267 
268             Object paramObj10 = serviceContext;
269 
270             if (serviceContext == null) {
271                 paramObj10 = new NullWrapper(
272                         "com.liferay.portal.service.ServiceContext");
273             }
274 
275             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
276                     "addMessage",
277                     new Object[] {
278                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
279                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
280                         paramObj10
281                     });
282 
283             Object returnObj = null;
284 
285             try {
286                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
287             }
288             catch (Exception e) {
289                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
290                     throw (com.liferay.portal.kernel.exception.PortalException)e;
291                 }
292 
293                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
294                     throw (com.liferay.portal.kernel.exception.SystemException)e;
295                 }
296 
297                 throw new com.liferay.portal.kernel.exception.SystemException(e);
298             }
299 
300             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
301         }
302         catch (com.liferay.portal.kernel.exception.SystemException se) {
303             _log.error(se, se);
304 
305             throw se;
306         }
307     }
308 
309     public static void deleteDiscussionMessage(HttpPrincipal httpPrincipal,
310         long groupId, java.lang.String className, long classPK,
311         java.lang.String permissionClassName, long permissionClassPK,
312         long messageId)
313         throws com.liferay.portal.kernel.exception.PortalException,
314             com.liferay.portal.kernel.exception.SystemException {
315         try {
316             Object paramObj0 = new LongWrapper(groupId);
317 
318             Object paramObj1 = className;
319 
320             if (className == null) {
321                 paramObj1 = new NullWrapper("java.lang.String");
322             }
323 
324             Object paramObj2 = new LongWrapper(classPK);
325 
326             Object paramObj3 = permissionClassName;
327 
328             if (permissionClassName == null) {
329                 paramObj3 = new NullWrapper("java.lang.String");
330             }
331 
332             Object paramObj4 = new LongWrapper(permissionClassPK);
333 
334             Object paramObj5 = new LongWrapper(messageId);
335 
336             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
337                     "deleteDiscussionMessage",
338                     new Object[] {
339                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
340                         paramObj5
341                     });
342 
343             try {
344                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
345             }
346             catch (Exception e) {
347                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
348                     throw (com.liferay.portal.kernel.exception.PortalException)e;
349                 }
350 
351                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
352                     throw (com.liferay.portal.kernel.exception.SystemException)e;
353                 }
354 
355                 throw new com.liferay.portal.kernel.exception.SystemException(e);
356             }
357         }
358         catch (com.liferay.portal.kernel.exception.SystemException se) {
359             _log.error(se, se);
360 
361             throw se;
362         }
363     }
364 
365     public static void deleteMessage(HttpPrincipal httpPrincipal, long messageId)
366         throws com.liferay.portal.kernel.exception.PortalException,
367             com.liferay.portal.kernel.exception.SystemException {
368         try {
369             Object paramObj0 = new LongWrapper(messageId);
370 
371             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
372                     "deleteMessage", new Object[] { paramObj0 });
373 
374             try {
375                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
376             }
377             catch (Exception e) {
378                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
379                     throw (com.liferay.portal.kernel.exception.PortalException)e;
380                 }
381 
382                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
383                     throw (com.liferay.portal.kernel.exception.SystemException)e;
384                 }
385 
386                 throw new com.liferay.portal.kernel.exception.SystemException(e);
387             }
388         }
389         catch (com.liferay.portal.kernel.exception.SystemException se) {
390             _log.error(se, se);
391 
392             throw se;
393         }
394     }
395 
396     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
397         HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
398         int start, int end)
399         throws com.liferay.portal.kernel.exception.PortalException,
400             com.liferay.portal.kernel.exception.SystemException {
401         try {
402             Object paramObj0 = new LongWrapper(groupId);
403 
404             Object paramObj1 = new LongWrapper(categoryId);
405 
406             Object paramObj2 = new IntegerWrapper(status);
407 
408             Object paramObj3 = new IntegerWrapper(start);
409 
410             Object paramObj4 = new IntegerWrapper(end);
411 
412             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
413                     "getCategoryMessages",
414                     new Object[] {
415                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
416                     });
417 
418             Object returnObj = null;
419 
420             try {
421                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
422             }
423             catch (Exception e) {
424                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
425                     throw (com.liferay.portal.kernel.exception.PortalException)e;
426                 }
427 
428                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
429                     throw (com.liferay.portal.kernel.exception.SystemException)e;
430                 }
431 
432                 throw new com.liferay.portal.kernel.exception.SystemException(e);
433             }
434 
435             return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
436         }
437         catch (com.liferay.portal.kernel.exception.SystemException se) {
438             _log.error(se, se);
439 
440             throw se;
441         }
442     }
443 
444     public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
445         long groupId, long categoryId, int status)
446         throws com.liferay.portal.kernel.exception.SystemException {
447         try {
448             Object paramObj0 = new LongWrapper(groupId);
449 
450             Object paramObj1 = new LongWrapper(categoryId);
451 
452             Object paramObj2 = new IntegerWrapper(status);
453 
454             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
455                     "getCategoryMessagesCount",
456                     new Object[] { paramObj0, paramObj1, paramObj2 });
457 
458             Object returnObj = null;
459 
460             try {
461                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
462             }
463             catch (Exception e) {
464                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
465                     throw (com.liferay.portal.kernel.exception.SystemException)e;
466                 }
467 
468                 throw new com.liferay.portal.kernel.exception.SystemException(e);
469             }
470 
471             return ((Integer)returnObj).intValue();
472         }
473         catch (com.liferay.portal.kernel.exception.SystemException se) {
474             _log.error(se, se);
475 
476             throw se;
477         }
478     }
479 
480     public static java.lang.String getCategoryMessagesRSS(
481         HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
482         int max, java.lang.String type, double version,
483         java.lang.String displayStyle, java.lang.String feedURL,
484         java.lang.String entryURL,
485         com.liferay.portal.theme.ThemeDisplay themeDisplay)
486         throws com.liferay.portal.kernel.exception.PortalException,
487             com.liferay.portal.kernel.exception.SystemException {
488         try {
489             Object paramObj0 = new LongWrapper(groupId);
490 
491             Object paramObj1 = new LongWrapper(categoryId);
492 
493             Object paramObj2 = new IntegerWrapper(status);
494 
495             Object paramObj3 = new IntegerWrapper(max);
496 
497             Object paramObj4 = type;
498 
499             if (type == null) {
500                 paramObj4 = new NullWrapper("java.lang.String");
501             }
502 
503             Object paramObj5 = new DoubleWrapper(version);
504 
505             Object paramObj6 = displayStyle;
506 
507             if (displayStyle == null) {
508                 paramObj6 = new NullWrapper("java.lang.String");
509             }
510 
511             Object paramObj7 = feedURL;
512 
513             if (feedURL == null) {
514                 paramObj7 = new NullWrapper("java.lang.String");
515             }
516 
517             Object paramObj8 = entryURL;
518 
519             if (entryURL == null) {
520                 paramObj8 = new NullWrapper("java.lang.String");
521             }
522 
523             Object paramObj9 = themeDisplay;
524 
525             if (themeDisplay == null) {
526                 paramObj9 = new NullWrapper(
527                         "com.liferay.portal.theme.ThemeDisplay");
528             }
529 
530             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
531                     "getCategoryMessagesRSS",
532                     new Object[] {
533                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
534                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
535                     });
536 
537             Object returnObj = null;
538 
539             try {
540                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
541             }
542             catch (Exception e) {
543                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
544                     throw (com.liferay.portal.kernel.exception.PortalException)e;
545                 }
546 
547                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
548                     throw (com.liferay.portal.kernel.exception.SystemException)e;
549                 }
550 
551                 throw new com.liferay.portal.kernel.exception.SystemException(e);
552             }
553 
554             return (java.lang.String)returnObj;
555         }
556         catch (com.liferay.portal.kernel.exception.SystemException se) {
557             _log.error(se, se);
558 
559             throw se;
560         }
561     }
562 
563     public static java.lang.String getCompanyMessagesRSS(
564         HttpPrincipal httpPrincipal, long companyId, int status, int max,
565         java.lang.String type, double version, java.lang.String displayStyle,
566         java.lang.String feedURL, java.lang.String entryURL,
567         com.liferay.portal.theme.ThemeDisplay themeDisplay)
568         throws com.liferay.portal.kernel.exception.PortalException,
569             com.liferay.portal.kernel.exception.SystemException {
570         try {
571             Object paramObj0 = new LongWrapper(companyId);
572 
573             Object paramObj1 = new IntegerWrapper(status);
574 
575             Object paramObj2 = new IntegerWrapper(max);
576 
577             Object paramObj3 = type;
578 
579             if (type == null) {
580                 paramObj3 = new NullWrapper("java.lang.String");
581             }
582 
583             Object paramObj4 = new DoubleWrapper(version);
584 
585             Object paramObj5 = displayStyle;
586 
587             if (displayStyle == null) {
588                 paramObj5 = new NullWrapper("java.lang.String");
589             }
590 
591             Object paramObj6 = feedURL;
592 
593             if (feedURL == null) {
594                 paramObj6 = new NullWrapper("java.lang.String");
595             }
596 
597             Object paramObj7 = entryURL;
598 
599             if (entryURL == null) {
600                 paramObj7 = new NullWrapper("java.lang.String");
601             }
602 
603             Object paramObj8 = themeDisplay;
604 
605             if (themeDisplay == null) {
606                 paramObj8 = new NullWrapper(
607                         "com.liferay.portal.theme.ThemeDisplay");
608             }
609 
610             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
611                     "getCompanyMessagesRSS",
612                     new Object[] {
613                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
614                         paramObj5, paramObj6, paramObj7, paramObj8
615                     });
616 
617             Object returnObj = null;
618 
619             try {
620                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
621             }
622             catch (Exception e) {
623                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
624                     throw (com.liferay.portal.kernel.exception.PortalException)e;
625                 }
626 
627                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
628                     throw (com.liferay.portal.kernel.exception.SystemException)e;
629                 }
630 
631                 throw new com.liferay.portal.kernel.exception.SystemException(e);
632             }
633 
634             return (java.lang.String)returnObj;
635         }
636         catch (com.liferay.portal.kernel.exception.SystemException se) {
637             _log.error(se, se);
638 
639             throw se;
640         }
641     }
642 
643     public static java.lang.String getGroupMessagesRSS(
644         HttpPrincipal httpPrincipal, long groupId, int status, int max,
645         java.lang.String type, double version, java.lang.String displayStyle,
646         java.lang.String feedURL, java.lang.String entryURL,
647         com.liferay.portal.theme.ThemeDisplay themeDisplay)
648         throws com.liferay.portal.kernel.exception.PortalException,
649             com.liferay.portal.kernel.exception.SystemException {
650         try {
651             Object paramObj0 = new LongWrapper(groupId);
652 
653             Object paramObj1 = new IntegerWrapper(status);
654 
655             Object paramObj2 = new IntegerWrapper(max);
656 
657             Object paramObj3 = type;
658 
659             if (type == null) {
660                 paramObj3 = new NullWrapper("java.lang.String");
661             }
662 
663             Object paramObj4 = new DoubleWrapper(version);
664 
665             Object paramObj5 = displayStyle;
666 
667             if (displayStyle == null) {
668                 paramObj5 = new NullWrapper("java.lang.String");
669             }
670 
671             Object paramObj6 = feedURL;
672 
673             if (feedURL == null) {
674                 paramObj6 = new NullWrapper("java.lang.String");
675             }
676 
677             Object paramObj7 = entryURL;
678 
679             if (entryURL == null) {
680                 paramObj7 = new NullWrapper("java.lang.String");
681             }
682 
683             Object paramObj8 = themeDisplay;
684 
685             if (themeDisplay == null) {
686                 paramObj8 = new NullWrapper(
687                         "com.liferay.portal.theme.ThemeDisplay");
688             }
689 
690             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
691                     "getGroupMessagesRSS",
692                     new Object[] {
693                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
694                         paramObj5, paramObj6, paramObj7, paramObj8
695                     });
696 
697             Object returnObj = null;
698 
699             try {
700                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
701             }
702             catch (Exception e) {
703                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
704                     throw (com.liferay.portal.kernel.exception.PortalException)e;
705                 }
706 
707                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
708                     throw (com.liferay.portal.kernel.exception.SystemException)e;
709                 }
710 
711                 throw new com.liferay.portal.kernel.exception.SystemException(e);
712             }
713 
714             return (java.lang.String)returnObj;
715         }
716         catch (com.liferay.portal.kernel.exception.SystemException se) {
717             _log.error(se, se);
718 
719             throw se;
720         }
721     }
722 
723     public static java.lang.String getGroupMessagesRSS(
724         HttpPrincipal httpPrincipal, long groupId, long userId, int status,
725         int max, java.lang.String type, double version,
726         java.lang.String displayStyle, java.lang.String feedURL,
727         java.lang.String entryURL,
728         com.liferay.portal.theme.ThemeDisplay themeDisplay)
729         throws com.liferay.portal.kernel.exception.PortalException,
730             com.liferay.portal.kernel.exception.SystemException {
731         try {
732             Object paramObj0 = new LongWrapper(groupId);
733 
734             Object paramObj1 = new LongWrapper(userId);
735 
736             Object paramObj2 = new IntegerWrapper(status);
737 
738             Object paramObj3 = new IntegerWrapper(max);
739 
740             Object paramObj4 = type;
741 
742             if (type == null) {
743                 paramObj4 = new NullWrapper("java.lang.String");
744             }
745 
746             Object paramObj5 = new DoubleWrapper(version);
747 
748             Object paramObj6 = displayStyle;
749 
750             if (displayStyle == null) {
751                 paramObj6 = new NullWrapper("java.lang.String");
752             }
753 
754             Object paramObj7 = feedURL;
755 
756             if (feedURL == null) {
757                 paramObj7 = new NullWrapper("java.lang.String");
758             }
759 
760             Object paramObj8 = entryURL;
761 
762             if (entryURL == null) {
763                 paramObj8 = new NullWrapper("java.lang.String");
764             }
765 
766             Object paramObj9 = themeDisplay;
767 
768             if (themeDisplay == null) {
769                 paramObj9 = new NullWrapper(
770                         "com.liferay.portal.theme.ThemeDisplay");
771             }
772 
773             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
774                     "getGroupMessagesRSS",
775                     new Object[] {
776                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
777                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9
778                     });
779 
780             Object returnObj = null;
781 
782             try {
783                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
784             }
785             catch (Exception e) {
786                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
787                     throw (com.liferay.portal.kernel.exception.PortalException)e;
788                 }
789 
790                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
791                     throw (com.liferay.portal.kernel.exception.SystemException)e;
792                 }
793 
794                 throw new com.liferay.portal.kernel.exception.SystemException(e);
795             }
796 
797             return (java.lang.String)returnObj;
798         }
799         catch (com.liferay.portal.kernel.exception.SystemException se) {
800             _log.error(se, se);
801 
802             throw se;
803         }
804     }
805 
806     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
807         HttpPrincipal httpPrincipal, long messageId)
808         throws com.liferay.portal.kernel.exception.PortalException,
809             com.liferay.portal.kernel.exception.SystemException {
810         try {
811             Object paramObj0 = new LongWrapper(messageId);
812 
813             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
814                     "getMessage", new Object[] { paramObj0 });
815 
816             Object returnObj = null;
817 
818             try {
819                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
820             }
821             catch (Exception e) {
822                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
823                     throw (com.liferay.portal.kernel.exception.PortalException)e;
824                 }
825 
826                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
827                     throw (com.liferay.portal.kernel.exception.SystemException)e;
828                 }
829 
830                 throw new com.liferay.portal.kernel.exception.SystemException(e);
831             }
832 
833             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
834         }
835         catch (com.liferay.portal.kernel.exception.SystemException se) {
836             _log.error(se, se);
837 
838             throw se;
839         }
840     }
841 
842     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
843         HttpPrincipal httpPrincipal, long messageId, int status,
844         java.lang.String threadView)
845         throws com.liferay.portal.kernel.exception.PortalException,
846             com.liferay.portal.kernel.exception.SystemException {
847         try {
848             Object paramObj0 = new LongWrapper(messageId);
849 
850             Object paramObj1 = new IntegerWrapper(status);
851 
852             Object paramObj2 = threadView;
853 
854             if (threadView == null) {
855                 paramObj2 = new NullWrapper("java.lang.String");
856             }
857 
858             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
859                     "getMessageDisplay",
860                     new Object[] { paramObj0, paramObj1, paramObj2 });
861 
862             Object returnObj = null;
863 
864             try {
865                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
866             }
867             catch (Exception e) {
868                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
869                     throw (com.liferay.portal.kernel.exception.PortalException)e;
870                 }
871 
872                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
873                     throw (com.liferay.portal.kernel.exception.SystemException)e;
874                 }
875 
876                 throw new com.liferay.portal.kernel.exception.SystemException(e);
877             }
878 
879             return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
880         }
881         catch (com.liferay.portal.kernel.exception.SystemException se) {
882             _log.error(se, se);
883 
884             throw se;
885         }
886     }
887 
888     public static java.lang.String getThreadMessagesRSS(
889         HttpPrincipal httpPrincipal, long threadId, int status, int max,
890         java.lang.String type, double version, java.lang.String displayStyle,
891         java.lang.String feedURL, java.lang.String entryURL,
892         com.liferay.portal.theme.ThemeDisplay themeDisplay)
893         throws com.liferay.portal.kernel.exception.PortalException,
894             com.liferay.portal.kernel.exception.SystemException {
895         try {
896             Object paramObj0 = new LongWrapper(threadId);
897 
898             Object paramObj1 = new IntegerWrapper(status);
899 
900             Object paramObj2 = new IntegerWrapper(max);
901 
902             Object paramObj3 = type;
903 
904             if (type == null) {
905                 paramObj3 = new NullWrapper("java.lang.String");
906             }
907 
908             Object paramObj4 = new DoubleWrapper(version);
909 
910             Object paramObj5 = displayStyle;
911 
912             if (displayStyle == null) {
913                 paramObj5 = new NullWrapper("java.lang.String");
914             }
915 
916             Object paramObj6 = feedURL;
917 
918             if (feedURL == null) {
919                 paramObj6 = new NullWrapper("java.lang.String");
920             }
921 
922             Object paramObj7 = entryURL;
923 
924             if (entryURL == null) {
925                 paramObj7 = new NullWrapper("java.lang.String");
926             }
927 
928             Object paramObj8 = themeDisplay;
929 
930             if (themeDisplay == null) {
931                 paramObj8 = new NullWrapper(
932                         "com.liferay.portal.theme.ThemeDisplay");
933             }
934 
935             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
936                     "getThreadMessagesRSS",
937                     new Object[] {
938                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
939                         paramObj5, paramObj6, paramObj7, paramObj8
940                     });
941 
942             Object returnObj = null;
943 
944             try {
945                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
946             }
947             catch (Exception e) {
948                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
949                     throw (com.liferay.portal.kernel.exception.PortalException)e;
950                 }
951 
952                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
953                     throw (com.liferay.portal.kernel.exception.SystemException)e;
954                 }
955 
956                 throw new com.liferay.portal.kernel.exception.SystemException(e);
957             }
958 
959             return (java.lang.String)returnObj;
960         }
961         catch (com.liferay.portal.kernel.exception.SystemException se) {
962             _log.error(se, se);
963 
964             throw se;
965         }
966     }
967 
968     public static void subscribeMessage(HttpPrincipal httpPrincipal,
969         long messageId)
970         throws com.liferay.portal.kernel.exception.PortalException,
971             com.liferay.portal.kernel.exception.SystemException {
972         try {
973             Object paramObj0 = new LongWrapper(messageId);
974 
975             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
976                     "subscribeMessage", new Object[] { paramObj0 });
977 
978             try {
979                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
980             }
981             catch (Exception e) {
982                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
983                     throw (com.liferay.portal.kernel.exception.PortalException)e;
984                 }
985 
986                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
987                     throw (com.liferay.portal.kernel.exception.SystemException)e;
988                 }
989 
990                 throw new com.liferay.portal.kernel.exception.SystemException(e);
991             }
992         }
993         catch (com.liferay.portal.kernel.exception.SystemException se) {
994             _log.error(se, se);
995 
996             throw se;
997         }
998     }
999 
1000    public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
1001        long messageId)
1002        throws com.liferay.portal.kernel.exception.PortalException,
1003            com.liferay.portal.kernel.exception.SystemException {
1004        try {
1005            Object paramObj0 = new LongWrapper(messageId);
1006
1007            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1008                    "unsubscribeMessage", new Object[] { paramObj0 });
1009
1010            try {
1011                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1012            }
1013            catch (Exception e) {
1014                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1015                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1016                }
1017
1018                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1019                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1020                }
1021
1022                throw new com.liferay.portal.kernel.exception.SystemException(e);
1023            }
1024        }
1025        catch (com.liferay.portal.kernel.exception.SystemException se) {
1026            _log.error(se, se);
1027
1028            throw se;
1029        }
1030    }
1031
1032    public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
1033        HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
1034        java.lang.String permissionClassName, long permissionClassPK,
1035        long messageId, java.lang.String subject, java.lang.String body,
1036        com.liferay.portal.service.ServiceContext serviceContext)
1037        throws com.liferay.portal.kernel.exception.PortalException,
1038            com.liferay.portal.kernel.exception.SystemException {
1039        try {
1040            Object paramObj0 = className;
1041
1042            if (className == null) {
1043                paramObj0 = new NullWrapper("java.lang.String");
1044            }
1045
1046            Object paramObj1 = new LongWrapper(classPK);
1047
1048            Object paramObj2 = permissionClassName;
1049
1050            if (permissionClassName == null) {
1051                paramObj2 = new NullWrapper("java.lang.String");
1052            }
1053
1054            Object paramObj3 = new LongWrapper(permissionClassPK);
1055
1056            Object paramObj4 = new LongWrapper(messageId);
1057
1058            Object paramObj5 = subject;
1059
1060            if (subject == null) {
1061                paramObj5 = new NullWrapper("java.lang.String");
1062            }
1063
1064            Object paramObj6 = body;
1065
1066            if (body == null) {
1067                paramObj6 = new NullWrapper("java.lang.String");
1068            }
1069
1070            Object paramObj7 = serviceContext;
1071
1072            if (serviceContext == null) {
1073                paramObj7 = new NullWrapper(
1074                        "com.liferay.portal.service.ServiceContext");
1075            }
1076
1077            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1078                    "updateDiscussionMessage",
1079                    new Object[] {
1080                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1081                        paramObj5, paramObj6, paramObj7
1082                    });
1083
1084            Object returnObj = null;
1085
1086            try {
1087                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1088            }
1089            catch (Exception e) {
1090                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1091                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1092                }
1093
1094                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1095                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1096                }
1097
1098                throw new com.liferay.portal.kernel.exception.SystemException(e);
1099            }
1100
1101            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1102        }
1103        catch (com.liferay.portal.kernel.exception.SystemException se) {
1104            _log.error(se, se);
1105
1106            throw se;
1107        }
1108    }
1109
1110    public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
1111        HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
1112        java.lang.String body,
1113        java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
1114        java.util.List<String> existingFiles, double priority,
1115        boolean allowPingbacks,
1116        com.liferay.portal.service.ServiceContext serviceContext)
1117        throws com.liferay.portal.kernel.exception.PortalException,
1118            com.liferay.portal.kernel.exception.SystemException {
1119        try {
1120            Object paramObj0 = new LongWrapper(messageId);
1121
1122            Object paramObj1 = subject;
1123
1124            if (subject == null) {
1125                paramObj1 = new NullWrapper("java.lang.String");
1126            }
1127
1128            Object paramObj2 = body;
1129
1130            if (body == null) {
1131                paramObj2 = new NullWrapper("java.lang.String");
1132            }
1133
1134            Object paramObj3 = files;
1135
1136            if (files == null) {
1137                paramObj3 = new NullWrapper("java.util.List");
1138            }
1139
1140            Object paramObj4 = existingFiles;
1141
1142            if (existingFiles == null) {
1143                paramObj4 = new NullWrapper("java.util.List");
1144            }
1145
1146            Object paramObj5 = new DoubleWrapper(priority);
1147
1148            Object paramObj6 = new BooleanWrapper(allowPingbacks);
1149
1150            Object paramObj7 = serviceContext;
1151
1152            if (serviceContext == null) {
1153                paramObj7 = new NullWrapper(
1154                        "com.liferay.portal.service.ServiceContext");
1155            }
1156
1157            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1158                    "updateMessage",
1159                    new Object[] {
1160                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1161                        paramObj5, paramObj6, paramObj7
1162                    });
1163
1164            Object returnObj = null;
1165
1166            try {
1167                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1168            }
1169            catch (Exception e) {
1170                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1171                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1172                }
1173
1174                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1175                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1176                }
1177
1178                throw new com.liferay.portal.kernel.exception.SystemException(e);
1179            }
1180
1181            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1182        }
1183        catch (com.liferay.portal.kernel.exception.SystemException se) {
1184            _log.error(se, se);
1185
1186            throw se;
1187        }
1188    }
1189
1190    private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
1191}