1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.messageboards.service.http;
24  
25  import com.liferay.portal.kernel.log.Log;
26  import com.liferay.portal.kernel.log.LogFactoryUtil;
27  import com.liferay.portal.kernel.util.BooleanWrapper;
28  import com.liferay.portal.kernel.util.DoubleWrapper;
29  import com.liferay.portal.kernel.util.IntegerWrapper;
30  import com.liferay.portal.kernel.util.LongWrapper;
31  import com.liferay.portal.kernel.util.MethodWrapper;
32  import com.liferay.portal.kernel.util.NullWrapper;
33  import com.liferay.portal.security.auth.HttpPrincipal;
34  import com.liferay.portal.service.http.TunnelUtil;
35  
36  import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
37  
38  /**
39   * <a href="MBMessageServiceHttp.java.html"><b><i>View Source</i></b></a>
40   *
41   * <p>
42   * ServiceBuilder generated this class. Modifications in this class will be
43   * overwritten the next time is generated.
44   * </p>
45   *
46   * <p>
47   * This class provides a HTTP utility for the
48   * <code>com.liferay.portlet.messageboards.service.MBMessageServiceUtil</code> service
49   * utility. The static methods of this class calls the same methods of the
50   * service utility. However, the signatures are different because it requires an
51   * additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
52   * parameter.
53   * </p>
54   *
55   * <p>
56   * The benefits of using the HTTP utility is that it is fast and allows for
57   * tunneling without the cost of serializing to text. The drawback is that it
58   * only works with Java.
59   * </p>
60   *
61   * <p>
62   * Set the property <code>tunnel.servlet.hosts.allowed</code> in
63   * portal.properties to configure security.
64   * </p>
65   *
66   * <p>
67   * The HTTP utility is only generated for remote services.
68   * </p>
69   *
70   * @author Brian Wing Shun Chan
71   *
72   * @see com.liferay.portal.security.auth.HttpPrincipal
73   * @see com.liferay.portlet.messageboards.service.MBMessageServiceUtil
74   * @see com.liferay.portlet.messageboards.service.http.MBMessageServiceSoap
75   *
76   */
77  public class MBMessageServiceHttp {
78      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
79          HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
80          long classPK, long threadId, long parentMessageId,
81          java.lang.String subject, java.lang.String body,
82          com.liferay.portal.theme.ThemeDisplay themeDisplay)
83          throws com.liferay.portal.PortalException,
84              com.liferay.portal.SystemException {
85          try {
86              Object paramObj0 = new LongWrapper(groupId);
87  
88              Object paramObj1 = className;
89  
90              if (className == null) {
91                  paramObj1 = new NullWrapper("java.lang.String");
92              }
93  
94              Object paramObj2 = new LongWrapper(classPK);
95  
96              Object paramObj3 = new LongWrapper(threadId);
97  
98              Object paramObj4 = new LongWrapper(parentMessageId);
99  
100             Object paramObj5 = subject;
101 
102             if (subject == null) {
103                 paramObj5 = new NullWrapper("java.lang.String");
104             }
105 
106             Object paramObj6 = body;
107 
108             if (body == null) {
109                 paramObj6 = new NullWrapper("java.lang.String");
110             }
111 
112             Object paramObj7 = themeDisplay;
113 
114             if (themeDisplay == null) {
115                 paramObj7 = new NullWrapper(
116                         "com.liferay.portal.theme.ThemeDisplay");
117             }
118 
119             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
120                     "addDiscussionMessage",
121                     new Object[] {
122                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
123                         paramObj5, paramObj6, paramObj7
124                     });
125 
126             Object returnObj = null;
127 
128             try {
129                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
130             }
131             catch (Exception e) {
132                 if (e instanceof com.liferay.portal.PortalException) {
133                     throw (com.liferay.portal.PortalException)e;
134                 }
135 
136                 if (e instanceof com.liferay.portal.SystemException) {
137                     throw (com.liferay.portal.SystemException)e;
138                 }
139 
140                 throw new com.liferay.portal.SystemException(e);
141             }
142 
143             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
144         }
145         catch (com.liferay.portal.SystemException se) {
146             _log.error(se, se);
147 
148             throw se;
149         }
150     }
151 
152     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
153         HttpPrincipal httpPrincipal, long categoryId, java.lang.String subject,
154         java.lang.String body,
155         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
156         boolean anonymous, double priority, java.lang.String[] tagsEntries,
157         boolean addCommunityPermissions, boolean addGuestPermissions)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         try {
161             Object paramObj0 = new LongWrapper(categoryId);
162 
163             Object paramObj1 = subject;
164 
165             if (subject == null) {
166                 paramObj1 = new NullWrapper("java.lang.String");
167             }
168 
169             Object paramObj2 = body;
170 
171             if (body == null) {
172                 paramObj2 = new NullWrapper("java.lang.String");
173             }
174 
175             Object paramObj3 = files;
176 
177             if (files == null) {
178                 paramObj3 = new NullWrapper("java.util.List");
179             }
180 
181             Object paramObj4 = new BooleanWrapper(anonymous);
182 
183             Object paramObj5 = new DoubleWrapper(priority);
184 
185             Object paramObj6 = tagsEntries;
186 
187             if (tagsEntries == null) {
188                 paramObj6 = new NullWrapper("[Ljava.lang.String;");
189             }
190 
191             Object paramObj7 = new BooleanWrapper(addCommunityPermissions);
192 
193             Object paramObj8 = new BooleanWrapper(addGuestPermissions);
194 
195             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
196                     "addMessage",
197                     new Object[] {
198                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
199                         paramObj5, paramObj6, paramObj7, paramObj8
200                     });
201 
202             Object returnObj = null;
203 
204             try {
205                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
206             }
207             catch (Exception e) {
208                 if (e instanceof com.liferay.portal.PortalException) {
209                     throw (com.liferay.portal.PortalException)e;
210                 }
211 
212                 if (e instanceof com.liferay.portal.SystemException) {
213                     throw (com.liferay.portal.SystemException)e;
214                 }
215 
216                 throw new com.liferay.portal.SystemException(e);
217             }
218 
219             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
220         }
221         catch (com.liferay.portal.SystemException se) {
222             _log.error(se, se);
223 
224             throw se;
225         }
226     }
227 
228     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
229         HttpPrincipal httpPrincipal, long categoryId, java.lang.String subject,
230         java.lang.String body,
231         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
232         boolean anonymous, double priority, java.lang.String[] tagsEntries,
233         java.lang.String[] communityPermissions,
234         java.lang.String[] guestPermissions)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException {
237         try {
238             Object paramObj0 = new LongWrapper(categoryId);
239 
240             Object paramObj1 = subject;
241 
242             if (subject == null) {
243                 paramObj1 = new NullWrapper("java.lang.String");
244             }
245 
246             Object paramObj2 = body;
247 
248             if (body == null) {
249                 paramObj2 = new NullWrapper("java.lang.String");
250             }
251 
252             Object paramObj3 = files;
253 
254             if (files == null) {
255                 paramObj3 = new NullWrapper("java.util.List");
256             }
257 
258             Object paramObj4 = new BooleanWrapper(anonymous);
259 
260             Object paramObj5 = new DoubleWrapper(priority);
261 
262             Object paramObj6 = tagsEntries;
263 
264             if (tagsEntries == null) {
265                 paramObj6 = new NullWrapper("[Ljava.lang.String;");
266             }
267 
268             Object paramObj7 = communityPermissions;
269 
270             if (communityPermissions == null) {
271                 paramObj7 = new NullWrapper("[Ljava.lang.String;");
272             }
273 
274             Object paramObj8 = guestPermissions;
275 
276             if (guestPermissions == null) {
277                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
278             }
279 
280             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
281                     "addMessage",
282                     new Object[] {
283                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
284                         paramObj5, paramObj6, paramObj7, paramObj8
285                     });
286 
287             Object returnObj = null;
288 
289             try {
290                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
291             }
292             catch (Exception e) {
293                 if (e instanceof com.liferay.portal.PortalException) {
294                     throw (com.liferay.portal.PortalException)e;
295                 }
296 
297                 if (e instanceof com.liferay.portal.SystemException) {
298                     throw (com.liferay.portal.SystemException)e;
299                 }
300 
301                 throw new com.liferay.portal.SystemException(e);
302             }
303 
304             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
305         }
306         catch (com.liferay.portal.SystemException se) {
307             _log.error(se, se);
308 
309             throw se;
310         }
311     }
312 
313     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
314         HttpPrincipal httpPrincipal, long categoryId, java.lang.String subject,
315         java.lang.String body,
316         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
317         boolean anonymous, double priority, java.lang.String[] tagsEntries,
318         javax.portlet.PortletPreferences prefs,
319         boolean addCommunityPermissions, boolean addGuestPermissions,
320         com.liferay.portal.theme.ThemeDisplay themeDisplay)
321         throws com.liferay.portal.PortalException,
322             com.liferay.portal.SystemException {
323         try {
324             Object paramObj0 = new LongWrapper(categoryId);
325 
326             Object paramObj1 = subject;
327 
328             if (subject == null) {
329                 paramObj1 = new NullWrapper("java.lang.String");
330             }
331 
332             Object paramObj2 = body;
333 
334             if (body == null) {
335                 paramObj2 = new NullWrapper("java.lang.String");
336             }
337 
338             Object paramObj3 = files;
339 
340             if (files == null) {
341                 paramObj3 = new NullWrapper("java.util.List");
342             }
343 
344             Object paramObj4 = new BooleanWrapper(anonymous);
345 
346             Object paramObj5 = new DoubleWrapper(priority);
347 
348             Object paramObj6 = tagsEntries;
349 
350             if (tagsEntries == null) {
351                 paramObj6 = new NullWrapper("[Ljava.lang.String;");
352             }
353 
354             Object paramObj7 = prefs;
355 
356             if (prefs == null) {
357                 paramObj7 = new NullWrapper("javax.portlet.PortletPreferences");
358             }
359 
360             Object paramObj8 = new BooleanWrapper(addCommunityPermissions);
361 
362             Object paramObj9 = new BooleanWrapper(addGuestPermissions);
363 
364             Object paramObj10 = themeDisplay;
365 
366             if (themeDisplay == null) {
367                 paramObj10 = new NullWrapper(
368                         "com.liferay.portal.theme.ThemeDisplay");
369             }
370 
371             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
372                     "addMessage",
373                     new Object[] {
374                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
375                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
376                         paramObj10
377                     });
378 
379             Object returnObj = null;
380 
381             try {
382                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
383             }
384             catch (Exception e) {
385                 if (e instanceof com.liferay.portal.PortalException) {
386                     throw (com.liferay.portal.PortalException)e;
387                 }
388 
389                 if (e instanceof com.liferay.portal.SystemException) {
390                     throw (com.liferay.portal.SystemException)e;
391                 }
392 
393                 throw new com.liferay.portal.SystemException(e);
394             }
395 
396             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
397         }
398         catch (com.liferay.portal.SystemException se) {
399             _log.error(se, se);
400 
401             throw se;
402         }
403     }
404 
405     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
406         HttpPrincipal httpPrincipal, long categoryId, java.lang.String subject,
407         java.lang.String body,
408         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
409         boolean anonymous, double priority, java.lang.String[] tagsEntries,
410         javax.portlet.PortletPreferences prefs,
411         java.lang.String[] communityPermissions,
412         java.lang.String[] guestPermissions,
413         com.liferay.portal.theme.ThemeDisplay themeDisplay)
414         throws com.liferay.portal.PortalException,
415             com.liferay.portal.SystemException {
416         try {
417             Object paramObj0 = new LongWrapper(categoryId);
418 
419             Object paramObj1 = subject;
420 
421             if (subject == null) {
422                 paramObj1 = new NullWrapper("java.lang.String");
423             }
424 
425             Object paramObj2 = body;
426 
427             if (body == null) {
428                 paramObj2 = new NullWrapper("java.lang.String");
429             }
430 
431             Object paramObj3 = files;
432 
433             if (files == null) {
434                 paramObj3 = new NullWrapper("java.util.List");
435             }
436 
437             Object paramObj4 = new BooleanWrapper(anonymous);
438 
439             Object paramObj5 = new DoubleWrapper(priority);
440 
441             Object paramObj6 = tagsEntries;
442 
443             if (tagsEntries == null) {
444                 paramObj6 = new NullWrapper("[Ljava.lang.String;");
445             }
446 
447             Object paramObj7 = prefs;
448 
449             if (prefs == null) {
450                 paramObj7 = new NullWrapper("javax.portlet.PortletPreferences");
451             }
452 
453             Object paramObj8 = communityPermissions;
454 
455             if (communityPermissions == null) {
456                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
457             }
458 
459             Object paramObj9 = guestPermissions;
460 
461             if (guestPermissions == null) {
462                 paramObj9 = new NullWrapper("[Ljava.lang.String;");
463             }
464 
465             Object paramObj10 = themeDisplay;
466 
467             if (themeDisplay == null) {
468                 paramObj10 = new NullWrapper(
469                         "com.liferay.portal.theme.ThemeDisplay");
470             }
471 
472             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
473                     "addMessage",
474                     new Object[] {
475                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
476                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
477                         paramObj10
478                     });
479 
480             Object returnObj = null;
481 
482             try {
483                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
484             }
485             catch (Exception e) {
486                 if (e instanceof com.liferay.portal.PortalException) {
487                     throw (com.liferay.portal.PortalException)e;
488                 }
489 
490                 if (e instanceof com.liferay.portal.SystemException) {
491                     throw (com.liferay.portal.SystemException)e;
492                 }
493 
494                 throw new com.liferay.portal.SystemException(e);
495             }
496 
497             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
498         }
499         catch (com.liferay.portal.SystemException se) {
500             _log.error(se, se);
501 
502             throw se;
503         }
504     }
505 
506     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
507         HttpPrincipal httpPrincipal, long categoryId, long threadId,
508         long parentMessageId, java.lang.String subject, java.lang.String body,
509         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
510         boolean anonymous, double priority, java.lang.String[] tagsEntries,
511         boolean addCommunityPermissions, boolean addGuestPermissions)
512         throws com.liferay.portal.PortalException,
513             com.liferay.portal.SystemException {
514         try {
515             Object paramObj0 = new LongWrapper(categoryId);
516 
517             Object paramObj1 = new LongWrapper(threadId);
518 
519             Object paramObj2 = new LongWrapper(parentMessageId);
520 
521             Object paramObj3 = subject;
522 
523             if (subject == null) {
524                 paramObj3 = new NullWrapper("java.lang.String");
525             }
526 
527             Object paramObj4 = body;
528 
529             if (body == null) {
530                 paramObj4 = new NullWrapper("java.lang.String");
531             }
532 
533             Object paramObj5 = files;
534 
535             if (files == null) {
536                 paramObj5 = new NullWrapper("java.util.List");
537             }
538 
539             Object paramObj6 = new BooleanWrapper(anonymous);
540 
541             Object paramObj7 = new DoubleWrapper(priority);
542 
543             Object paramObj8 = tagsEntries;
544 
545             if (tagsEntries == null) {
546                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
547             }
548 
549             Object paramObj9 = new BooleanWrapper(addCommunityPermissions);
550 
551             Object paramObj10 = new BooleanWrapper(addGuestPermissions);
552 
553             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
554                     "addMessage",
555                     new Object[] {
556                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
557                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
558                         paramObj10
559                     });
560 
561             Object returnObj = null;
562 
563             try {
564                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
565             }
566             catch (Exception e) {
567                 if (e instanceof com.liferay.portal.PortalException) {
568                     throw (com.liferay.portal.PortalException)e;
569                 }
570 
571                 if (e instanceof com.liferay.portal.SystemException) {
572                     throw (com.liferay.portal.SystemException)e;
573                 }
574 
575                 throw new com.liferay.portal.SystemException(e);
576             }
577 
578             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
579         }
580         catch (com.liferay.portal.SystemException se) {
581             _log.error(se, se);
582 
583             throw se;
584         }
585     }
586 
587     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
588         HttpPrincipal httpPrincipal, long categoryId, long threadId,
589         long parentMessageId, java.lang.String subject, java.lang.String body,
590         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
591         boolean anonymous, double priority, java.lang.String[] tagsEntries,
592         java.lang.String[] communityPermissions,
593         java.lang.String[] guestPermissions)
594         throws com.liferay.portal.PortalException,
595             com.liferay.portal.SystemException {
596         try {
597             Object paramObj0 = new LongWrapper(categoryId);
598 
599             Object paramObj1 = new LongWrapper(threadId);
600 
601             Object paramObj2 = new LongWrapper(parentMessageId);
602 
603             Object paramObj3 = subject;
604 
605             if (subject == null) {
606                 paramObj3 = new NullWrapper("java.lang.String");
607             }
608 
609             Object paramObj4 = body;
610 
611             if (body == null) {
612                 paramObj4 = new NullWrapper("java.lang.String");
613             }
614 
615             Object paramObj5 = files;
616 
617             if (files == null) {
618                 paramObj5 = new NullWrapper("java.util.List");
619             }
620 
621             Object paramObj6 = new BooleanWrapper(anonymous);
622 
623             Object paramObj7 = new DoubleWrapper(priority);
624 
625             Object paramObj8 = tagsEntries;
626 
627             if (tagsEntries == null) {
628                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
629             }
630 
631             Object paramObj9 = communityPermissions;
632 
633             if (communityPermissions == null) {
634                 paramObj9 = new NullWrapper("[Ljava.lang.String;");
635             }
636 
637             Object paramObj10 = guestPermissions;
638 
639             if (guestPermissions == null) {
640                 paramObj10 = new NullWrapper("[Ljava.lang.String;");
641             }
642 
643             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
644                     "addMessage",
645                     new Object[] {
646                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
647                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
648                         paramObj10
649                     });
650 
651             Object returnObj = null;
652 
653             try {
654                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
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             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
669         }
670         catch (com.liferay.portal.SystemException se) {
671             _log.error(se, se);
672 
673             throw se;
674         }
675     }
676 
677     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
678         HttpPrincipal httpPrincipal, long categoryId, long threadId,
679         long parentMessageId, java.lang.String subject, java.lang.String body,
680         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
681         boolean anonymous, double priority, java.lang.String[] tagsEntries,
682         javax.portlet.PortletPreferences prefs,
683         boolean addCommunityPermissions, boolean addGuestPermissions,
684         com.liferay.portal.theme.ThemeDisplay themeDisplay)
685         throws com.liferay.portal.PortalException,
686             com.liferay.portal.SystemException {
687         try {
688             Object paramObj0 = new LongWrapper(categoryId);
689 
690             Object paramObj1 = new LongWrapper(threadId);
691 
692             Object paramObj2 = new LongWrapper(parentMessageId);
693 
694             Object paramObj3 = subject;
695 
696             if (subject == null) {
697                 paramObj3 = new NullWrapper("java.lang.String");
698             }
699 
700             Object paramObj4 = body;
701 
702             if (body == null) {
703                 paramObj4 = new NullWrapper("java.lang.String");
704             }
705 
706             Object paramObj5 = files;
707 
708             if (files == null) {
709                 paramObj5 = new NullWrapper("java.util.List");
710             }
711 
712             Object paramObj6 = new BooleanWrapper(anonymous);
713 
714             Object paramObj7 = new DoubleWrapper(priority);
715 
716             Object paramObj8 = tagsEntries;
717 
718             if (tagsEntries == null) {
719                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
720             }
721 
722             Object paramObj9 = prefs;
723 
724             if (prefs == null) {
725                 paramObj9 = new NullWrapper("javax.portlet.PortletPreferences");
726             }
727 
728             Object paramObj10 = new BooleanWrapper(addCommunityPermissions);
729 
730             Object paramObj11 = new BooleanWrapper(addGuestPermissions);
731 
732             Object paramObj12 = themeDisplay;
733 
734             if (themeDisplay == null) {
735                 paramObj12 = new NullWrapper(
736                         "com.liferay.portal.theme.ThemeDisplay");
737             }
738 
739             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
740                     "addMessage",
741                     new Object[] {
742                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
743                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
744                         paramObj10, paramObj11, paramObj12
745                     });
746 
747             Object returnObj = null;
748 
749             try {
750                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
751             }
752             catch (Exception e) {
753                 if (e instanceof com.liferay.portal.PortalException) {
754                     throw (com.liferay.portal.PortalException)e;
755                 }
756 
757                 if (e instanceof com.liferay.portal.SystemException) {
758                     throw (com.liferay.portal.SystemException)e;
759                 }
760 
761                 throw new com.liferay.portal.SystemException(e);
762             }
763 
764             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
765         }
766         catch (com.liferay.portal.SystemException se) {
767             _log.error(se, se);
768 
769             throw se;
770         }
771     }
772 
773     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
774         HttpPrincipal httpPrincipal, long categoryId, long threadId,
775         long parentMessageId, java.lang.String subject, java.lang.String body,
776         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
777         boolean anonymous, double priority, java.lang.String[] tagsEntries,
778         javax.portlet.PortletPreferences prefs,
779         java.lang.String[] communityPermissions,
780         java.lang.String[] guestPermissions,
781         com.liferay.portal.theme.ThemeDisplay themeDisplay)
782         throws com.liferay.portal.PortalException,
783             com.liferay.portal.SystemException {
784         try {
785             Object paramObj0 = new LongWrapper(categoryId);
786 
787             Object paramObj1 = new LongWrapper(threadId);
788 
789             Object paramObj2 = new LongWrapper(parentMessageId);
790 
791             Object paramObj3 = subject;
792 
793             if (subject == null) {
794                 paramObj3 = new NullWrapper("java.lang.String");
795             }
796 
797             Object paramObj4 = body;
798 
799             if (body == null) {
800                 paramObj4 = new NullWrapper("java.lang.String");
801             }
802 
803             Object paramObj5 = files;
804 
805             if (files == null) {
806                 paramObj5 = new NullWrapper("java.util.List");
807             }
808 
809             Object paramObj6 = new BooleanWrapper(anonymous);
810 
811             Object paramObj7 = new DoubleWrapper(priority);
812 
813             Object paramObj8 = tagsEntries;
814 
815             if (tagsEntries == null) {
816                 paramObj8 = new NullWrapper("[Ljava.lang.String;");
817             }
818 
819             Object paramObj9 = prefs;
820 
821             if (prefs == null) {
822                 paramObj9 = new NullWrapper("javax.portlet.PortletPreferences");
823             }
824 
825             Object paramObj10 = communityPermissions;
826 
827             if (communityPermissions == null) {
828                 paramObj10 = new NullWrapper("[Ljava.lang.String;");
829             }
830 
831             Object paramObj11 = guestPermissions;
832 
833             if (guestPermissions == null) {
834                 paramObj11 = new NullWrapper("[Ljava.lang.String;");
835             }
836 
837             Object paramObj12 = themeDisplay;
838 
839             if (themeDisplay == null) {
840                 paramObj12 = new NullWrapper(
841                         "com.liferay.portal.theme.ThemeDisplay");
842             }
843 
844             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
845                     "addMessage",
846                     new Object[] {
847                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
848                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
849                         paramObj10, paramObj11, paramObj12
850                     });
851 
852             Object returnObj = null;
853 
854             try {
855                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
856             }
857             catch (Exception e) {
858                 if (e instanceof com.liferay.portal.PortalException) {
859                     throw (com.liferay.portal.PortalException)e;
860                 }
861 
862                 if (e instanceof com.liferay.portal.SystemException) {
863                     throw (com.liferay.portal.SystemException)e;
864                 }
865 
866                 throw new com.liferay.portal.SystemException(e);
867             }
868 
869             return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
870         }
871         catch (com.liferay.portal.SystemException se) {
872             _log.error(se, se);
873 
874             throw se;
875         }
876     }
877 
878     public static void deleteDiscussionMessage(HttpPrincipal httpPrincipal,
879         long groupId, java.lang.String className, long classPK, long messageId)
880         throws com.liferay.portal.PortalException,
881             com.liferay.portal.SystemException {
882         try {
883             Object paramObj0 = new LongWrapper(groupId);
884 
885             Object paramObj1 = className;
886 
887             if (className == null) {
888                 paramObj1 = new NullWrapper("java.lang.String");
889             }
890 
891             Object paramObj2 = new LongWrapper(classPK);
892 
893             Object paramObj3 = new LongWrapper(messageId);
894 
895             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
896                     "deleteDiscussionMessage",
897                     new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
898 
899             try {
900                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
901             }
902             catch (Exception e) {
903                 if (e instanceof com.liferay.portal.PortalException) {
904                     throw (com.liferay.portal.PortalException)e;
905                 }
906 
907                 if (e instanceof com.liferay.portal.SystemException) {
908                     throw (com.liferay.portal.SystemException)e;
909                 }
910 
911                 throw new com.liferay.portal.SystemException(e);
912             }
913         }
914         catch (com.liferay.portal.SystemException se) {
915             _log.error(se, se);
916 
917             throw se;
918         }
919     }
920 
921     public static void deleteMessage(HttpPrincipal httpPrincipal, long messageId)
922         throws com.liferay.portal.PortalException,
923             com.liferay.portal.SystemException {
924         try {
925             Object paramObj0 = new LongWrapper(messageId);
926 
927             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
928                     "deleteMessage", new Object[] { paramObj0 });
929 
930             try {
931                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
932             }
933             catch (Exception e) {
934                 if (e instanceof com.liferay.portal.PortalException) {
935                     throw (com.liferay.portal.PortalException)e;
936                 }
937 
938                 if (e instanceof com.liferay.portal.SystemException) {
939                     throw (com.liferay.portal.SystemException)e;
940                 }
941 
942                 throw new com.liferay.portal.SystemException(e);
943             }
944         }
945         catch (com.liferay.portal.SystemException se) {
946             _log.error(se, se);
947 
948             throw se;
949         }
950     }
951 
952     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
953         HttpPrincipal httpPrincipal, long categoryId, int start, int end)
954         throws com.liferay.portal.PortalException,
955             com.liferay.portal.SystemException {
956         try {
957             Object paramObj0 = new LongWrapper(categoryId);
958 
959             Object paramObj1 = new IntegerWrapper(start);
960 
961             Object paramObj2 = new IntegerWrapper(end);
962 
963             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
964                     "getCategoryMessages",
965                     new Object[] { paramObj0, paramObj1, paramObj2 });
966 
967             Object returnObj = null;
968 
969             try {
970                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
971             }
972             catch (Exception e) {
973                 if (e instanceof com.liferay.portal.PortalException) {
974                     throw (com.liferay.portal.PortalException)e;
975                 }
976 
977                 if (e instanceof com.liferay.portal.SystemException) {
978                     throw (com.liferay.portal.SystemException)e;
979                 }
980 
981                 throw new com.liferay.portal.SystemException(e);
982             }
983 
984             return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
985         }
986         catch (com.liferay.portal.SystemException se) {
987             _log.error(se, se);
988 
989             throw se;
990         }
991     }
992 
993     public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
994         long categoryId) throws com.liferay.portal.SystemException {
995         try {
996             Object paramObj0 = new LongWrapper(categoryId);
997 
998             MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
999                     "getCategoryMessagesCount", new Object[] { paramObj0 });
1000
1001            Object returnObj = null;
1002
1003            try {
1004                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1005            }
1006            catch (Exception e) {
1007                if (e instanceof com.liferay.portal.SystemException) {
1008                    throw (com.liferay.portal.SystemException)e;
1009                }
1010
1011                throw new com.liferay.portal.SystemException(e);
1012            }
1013
1014            return ((Integer)returnObj).intValue();
1015        }
1016        catch (com.liferay.portal.SystemException se) {
1017            _log.error(se, se);
1018
1019            throw se;
1020        }
1021    }
1022
1023    public static java.lang.String getCategoryMessagesRSS(
1024        HttpPrincipal httpPrincipal, long categoryId, int max,
1025        java.lang.String type, double version, java.lang.String displayStyle,
1026        java.lang.String feedURL, java.lang.String entryURL,
1027        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1028        throws com.liferay.portal.PortalException,
1029            com.liferay.portal.SystemException {
1030        try {
1031            Object paramObj0 = new LongWrapper(categoryId);
1032
1033            Object paramObj1 = new IntegerWrapper(max);
1034
1035            Object paramObj2 = type;
1036
1037            if (type == null) {
1038                paramObj2 = new NullWrapper("java.lang.String");
1039            }
1040
1041            Object paramObj3 = new DoubleWrapper(version);
1042
1043            Object paramObj4 = displayStyle;
1044
1045            if (displayStyle == null) {
1046                paramObj4 = new NullWrapper("java.lang.String");
1047            }
1048
1049            Object paramObj5 = feedURL;
1050
1051            if (feedURL == null) {
1052                paramObj5 = new NullWrapper("java.lang.String");
1053            }
1054
1055            Object paramObj6 = entryURL;
1056
1057            if (entryURL == null) {
1058                paramObj6 = new NullWrapper("java.lang.String");
1059            }
1060
1061            Object paramObj7 = themeDisplay;
1062
1063            if (themeDisplay == null) {
1064                paramObj7 = new NullWrapper(
1065                        "com.liferay.portal.theme.ThemeDisplay");
1066            }
1067
1068            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1069                    "getCategoryMessagesRSS",
1070                    new Object[] {
1071                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1072                        paramObj5, paramObj6, paramObj7
1073                    });
1074
1075            Object returnObj = null;
1076
1077            try {
1078                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1079            }
1080            catch (Exception e) {
1081                if (e instanceof com.liferay.portal.PortalException) {
1082                    throw (com.liferay.portal.PortalException)e;
1083                }
1084
1085                if (e instanceof com.liferay.portal.SystemException) {
1086                    throw (com.liferay.portal.SystemException)e;
1087                }
1088
1089                throw new com.liferay.portal.SystemException(e);
1090            }
1091
1092            return (java.lang.String)returnObj;
1093        }
1094        catch (com.liferay.portal.SystemException se) {
1095            _log.error(se, se);
1096
1097            throw se;
1098        }
1099    }
1100
1101    public static java.lang.String getCompanyMessagesRSS(
1102        HttpPrincipal httpPrincipal, long companyId, int max,
1103        java.lang.String type, double version, java.lang.String displayStyle,
1104        java.lang.String feedURL, java.lang.String entryURL,
1105        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1106        throws com.liferay.portal.PortalException,
1107            com.liferay.portal.SystemException {
1108        try {
1109            Object paramObj0 = new LongWrapper(companyId);
1110
1111            Object paramObj1 = new IntegerWrapper(max);
1112
1113            Object paramObj2 = type;
1114
1115            if (type == null) {
1116                paramObj2 = new NullWrapper("java.lang.String");
1117            }
1118
1119            Object paramObj3 = new DoubleWrapper(version);
1120
1121            Object paramObj4 = displayStyle;
1122
1123            if (displayStyle == null) {
1124                paramObj4 = new NullWrapper("java.lang.String");
1125            }
1126
1127            Object paramObj5 = feedURL;
1128
1129            if (feedURL == null) {
1130                paramObj5 = new NullWrapper("java.lang.String");
1131            }
1132
1133            Object paramObj6 = entryURL;
1134
1135            if (entryURL == null) {
1136                paramObj6 = new NullWrapper("java.lang.String");
1137            }
1138
1139            Object paramObj7 = themeDisplay;
1140
1141            if (themeDisplay == null) {
1142                paramObj7 = new NullWrapper(
1143                        "com.liferay.portal.theme.ThemeDisplay");
1144            }
1145
1146            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1147                    "getCompanyMessagesRSS",
1148                    new Object[] {
1149                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1150                        paramObj5, paramObj6, paramObj7
1151                    });
1152
1153            Object returnObj = null;
1154
1155            try {
1156                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1157            }
1158            catch (Exception e) {
1159                if (e instanceof com.liferay.portal.PortalException) {
1160                    throw (com.liferay.portal.PortalException)e;
1161                }
1162
1163                if (e instanceof com.liferay.portal.SystemException) {
1164                    throw (com.liferay.portal.SystemException)e;
1165                }
1166
1167                throw new com.liferay.portal.SystemException(e);
1168            }
1169
1170            return (java.lang.String)returnObj;
1171        }
1172        catch (com.liferay.portal.SystemException se) {
1173            _log.error(se, se);
1174
1175            throw se;
1176        }
1177    }
1178
1179    public static java.lang.String getGroupMessagesRSS(
1180        HttpPrincipal httpPrincipal, long groupId, int max,
1181        java.lang.String type, double version, java.lang.String displayStyle,
1182        java.lang.String feedURL, java.lang.String entryURL,
1183        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1184        throws com.liferay.portal.PortalException,
1185            com.liferay.portal.SystemException {
1186        try {
1187            Object paramObj0 = new LongWrapper(groupId);
1188
1189            Object paramObj1 = new IntegerWrapper(max);
1190
1191            Object paramObj2 = type;
1192
1193            if (type == null) {
1194                paramObj2 = new NullWrapper("java.lang.String");
1195            }
1196
1197            Object paramObj3 = new DoubleWrapper(version);
1198
1199            Object paramObj4 = displayStyle;
1200
1201            if (displayStyle == null) {
1202                paramObj4 = new NullWrapper("java.lang.String");
1203            }
1204
1205            Object paramObj5 = feedURL;
1206
1207            if (feedURL == null) {
1208                paramObj5 = new NullWrapper("java.lang.String");
1209            }
1210
1211            Object paramObj6 = entryURL;
1212
1213            if (entryURL == null) {
1214                paramObj6 = new NullWrapper("java.lang.String");
1215            }
1216
1217            Object paramObj7 = themeDisplay;
1218
1219            if (themeDisplay == null) {
1220                paramObj7 = new NullWrapper(
1221                        "com.liferay.portal.theme.ThemeDisplay");
1222            }
1223
1224            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1225                    "getGroupMessagesRSS",
1226                    new Object[] {
1227                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1228                        paramObj5, paramObj6, paramObj7
1229                    });
1230
1231            Object returnObj = null;
1232
1233            try {
1234                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1235            }
1236            catch (Exception e) {
1237                if (e instanceof com.liferay.portal.PortalException) {
1238                    throw (com.liferay.portal.PortalException)e;
1239                }
1240
1241                if (e instanceof com.liferay.portal.SystemException) {
1242                    throw (com.liferay.portal.SystemException)e;
1243                }
1244
1245                throw new com.liferay.portal.SystemException(e);
1246            }
1247
1248            return (java.lang.String)returnObj;
1249        }
1250        catch (com.liferay.portal.SystemException se) {
1251            _log.error(se, se);
1252
1253            throw se;
1254        }
1255    }
1256
1257    public static java.lang.String getGroupMessagesRSS(
1258        HttpPrincipal httpPrincipal, long groupId, long userId, int max,
1259        java.lang.String type, double version, java.lang.String displayStyle,
1260        java.lang.String feedURL, java.lang.String entryURL,
1261        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1262        throws com.liferay.portal.PortalException,
1263            com.liferay.portal.SystemException {
1264        try {
1265            Object paramObj0 = new LongWrapper(groupId);
1266
1267            Object paramObj1 = new LongWrapper(userId);
1268
1269            Object paramObj2 = new IntegerWrapper(max);
1270
1271            Object paramObj3 = type;
1272
1273            if (type == null) {
1274                paramObj3 = new NullWrapper("java.lang.String");
1275            }
1276
1277            Object paramObj4 = new DoubleWrapper(version);
1278
1279            Object paramObj5 = displayStyle;
1280
1281            if (displayStyle == null) {
1282                paramObj5 = new NullWrapper("java.lang.String");
1283            }
1284
1285            Object paramObj6 = feedURL;
1286
1287            if (feedURL == null) {
1288                paramObj6 = new NullWrapper("java.lang.String");
1289            }
1290
1291            Object paramObj7 = entryURL;
1292
1293            if (entryURL == null) {
1294                paramObj7 = new NullWrapper("java.lang.String");
1295            }
1296
1297            Object paramObj8 = themeDisplay;
1298
1299            if (themeDisplay == null) {
1300                paramObj8 = new NullWrapper(
1301                        "com.liferay.portal.theme.ThemeDisplay");
1302            }
1303
1304            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1305                    "getGroupMessagesRSS",
1306                    new Object[] {
1307                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1308                        paramObj5, paramObj6, paramObj7, paramObj8
1309                    });
1310
1311            Object returnObj = null;
1312
1313            try {
1314                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1315            }
1316            catch (Exception e) {
1317                if (e instanceof com.liferay.portal.PortalException) {
1318                    throw (com.liferay.portal.PortalException)e;
1319                }
1320
1321                if (e instanceof com.liferay.portal.SystemException) {
1322                    throw (com.liferay.portal.SystemException)e;
1323                }
1324
1325                throw new com.liferay.portal.SystemException(e);
1326            }
1327
1328            return (java.lang.String)returnObj;
1329        }
1330        catch (com.liferay.portal.SystemException se) {
1331            _log.error(se, se);
1332
1333            throw se;
1334        }
1335    }
1336
1337    public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
1338        HttpPrincipal httpPrincipal, long messageId)
1339        throws com.liferay.portal.PortalException,
1340            com.liferay.portal.SystemException {
1341        try {
1342            Object paramObj0 = new LongWrapper(messageId);
1343
1344            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1345                    "getMessage", new Object[] { paramObj0 });
1346
1347            Object returnObj = null;
1348
1349            try {
1350                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1351            }
1352            catch (Exception e) {
1353                if (e instanceof com.liferay.portal.PortalException) {
1354                    throw (com.liferay.portal.PortalException)e;
1355                }
1356
1357                if (e instanceof com.liferay.portal.SystemException) {
1358                    throw (com.liferay.portal.SystemException)e;
1359                }
1360
1361                throw new com.liferay.portal.SystemException(e);
1362            }
1363
1364            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1365        }
1366        catch (com.liferay.portal.SystemException se) {
1367            _log.error(se, se);
1368
1369            throw se;
1370        }
1371    }
1372
1373    public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
1374        HttpPrincipal httpPrincipal, long messageId)
1375        throws com.liferay.portal.PortalException,
1376            com.liferay.portal.SystemException {
1377        try {
1378            Object paramObj0 = new LongWrapper(messageId);
1379
1380            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1381                    "getMessageDisplay", new Object[] { paramObj0 });
1382
1383            Object returnObj = null;
1384
1385            try {
1386                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1387            }
1388            catch (Exception e) {
1389                if (e instanceof com.liferay.portal.PortalException) {
1390                    throw (com.liferay.portal.PortalException)e;
1391                }
1392
1393                if (e instanceof com.liferay.portal.SystemException) {
1394                    throw (com.liferay.portal.SystemException)e;
1395                }
1396
1397                throw new com.liferay.portal.SystemException(e);
1398            }
1399
1400            return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
1401        }
1402        catch (com.liferay.portal.SystemException se) {
1403            _log.error(se, se);
1404
1405            throw se;
1406        }
1407    }
1408
1409    public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
1410        HttpPrincipal httpPrincipal, long messageId, java.lang.String threadView)
1411        throws com.liferay.portal.PortalException,
1412            com.liferay.portal.SystemException {
1413        try {
1414            Object paramObj0 = new LongWrapper(messageId);
1415
1416            Object paramObj1 = threadView;
1417
1418            if (threadView == null) {
1419                paramObj1 = new NullWrapper("java.lang.String");
1420            }
1421
1422            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1423                    "getMessageDisplay", new Object[] { paramObj0, paramObj1 });
1424
1425            Object returnObj = null;
1426
1427            try {
1428                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1429            }
1430            catch (Exception e) {
1431                if (e instanceof com.liferay.portal.PortalException) {
1432                    throw (com.liferay.portal.PortalException)e;
1433                }
1434
1435                if (e instanceof com.liferay.portal.SystemException) {
1436                    throw (com.liferay.portal.SystemException)e;
1437                }
1438
1439                throw new com.liferay.portal.SystemException(e);
1440            }
1441
1442            return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
1443        }
1444        catch (com.liferay.portal.SystemException se) {
1445            _log.error(se, se);
1446
1447            throw se;
1448        }
1449    }
1450
1451    public static java.lang.String getThreadMessagesRSS(
1452        HttpPrincipal httpPrincipal, long threadId, int max,
1453        java.lang.String type, double version, java.lang.String displayStyle,
1454        java.lang.String feedURL, java.lang.String entryURL,
1455        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1456        throws com.liferay.portal.PortalException,
1457            com.liferay.portal.SystemException {
1458        try {
1459            Object paramObj0 = new LongWrapper(threadId);
1460
1461            Object paramObj1 = new IntegerWrapper(max);
1462
1463            Object paramObj2 = type;
1464
1465            if (type == null) {
1466                paramObj2 = new NullWrapper("java.lang.String");
1467            }
1468
1469            Object paramObj3 = new DoubleWrapper(version);
1470
1471            Object paramObj4 = displayStyle;
1472
1473            if (displayStyle == null) {
1474                paramObj4 = new NullWrapper("java.lang.String");
1475            }
1476
1477            Object paramObj5 = feedURL;
1478
1479            if (feedURL == null) {
1480                paramObj5 = new NullWrapper("java.lang.String");
1481            }
1482
1483            Object paramObj6 = entryURL;
1484
1485            if (entryURL == null) {
1486                paramObj6 = new NullWrapper("java.lang.String");
1487            }
1488
1489            Object paramObj7 = themeDisplay;
1490
1491            if (themeDisplay == null) {
1492                paramObj7 = new NullWrapper(
1493                        "com.liferay.portal.theme.ThemeDisplay");
1494            }
1495
1496            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1497                    "getThreadMessagesRSS",
1498                    new Object[] {
1499                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1500                        paramObj5, paramObj6, paramObj7
1501                    });
1502
1503            Object returnObj = null;
1504
1505            try {
1506                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1507            }
1508            catch (Exception e) {
1509                if (e instanceof com.liferay.portal.PortalException) {
1510                    throw (com.liferay.portal.PortalException)e;
1511                }
1512
1513                if (e instanceof com.liferay.portal.SystemException) {
1514                    throw (com.liferay.portal.SystemException)e;
1515                }
1516
1517                throw new com.liferay.portal.SystemException(e);
1518            }
1519
1520            return (java.lang.String)returnObj;
1521        }
1522        catch (com.liferay.portal.SystemException se) {
1523            _log.error(se, se);
1524
1525            throw se;
1526        }
1527    }
1528
1529    public static void subscribeMessage(HttpPrincipal httpPrincipal,
1530        long messageId)
1531        throws com.liferay.portal.PortalException,
1532            com.liferay.portal.SystemException {
1533        try {
1534            Object paramObj0 = new LongWrapper(messageId);
1535
1536            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1537                    "subscribeMessage", new Object[] { paramObj0 });
1538
1539            try {
1540                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1541            }
1542            catch (Exception e) {
1543                if (e instanceof com.liferay.portal.PortalException) {
1544                    throw (com.liferay.portal.PortalException)e;
1545                }
1546
1547                if (e instanceof com.liferay.portal.SystemException) {
1548                    throw (com.liferay.portal.SystemException)e;
1549                }
1550
1551                throw new com.liferay.portal.SystemException(e);
1552            }
1553        }
1554        catch (com.liferay.portal.SystemException se) {
1555            _log.error(se, se);
1556
1557            throw se;
1558        }
1559    }
1560
1561    public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
1562        long messageId)
1563        throws com.liferay.portal.PortalException,
1564            com.liferay.portal.SystemException {
1565        try {
1566            Object paramObj0 = new LongWrapper(messageId);
1567
1568            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1569                    "unsubscribeMessage", new Object[] { paramObj0 });
1570
1571            try {
1572                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1573            }
1574            catch (Exception e) {
1575                if (e instanceof com.liferay.portal.PortalException) {
1576                    throw (com.liferay.portal.PortalException)e;
1577                }
1578
1579                if (e instanceof com.liferay.portal.SystemException) {
1580                    throw (com.liferay.portal.SystemException)e;
1581                }
1582
1583                throw new com.liferay.portal.SystemException(e);
1584            }
1585        }
1586        catch (com.liferay.portal.SystemException se) {
1587            _log.error(se, se);
1588
1589            throw se;
1590        }
1591    }
1592
1593    public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
1594        HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
1595        long classPK, long messageId, java.lang.String subject,
1596        java.lang.String body)
1597        throws com.liferay.portal.PortalException,
1598            com.liferay.portal.SystemException {
1599        try {
1600            Object paramObj0 = new LongWrapper(groupId);
1601
1602            Object paramObj1 = className;
1603
1604            if (className == null) {
1605                paramObj1 = new NullWrapper("java.lang.String");
1606            }
1607
1608            Object paramObj2 = new LongWrapper(classPK);
1609
1610            Object paramObj3 = new LongWrapper(messageId);
1611
1612            Object paramObj4 = subject;
1613
1614            if (subject == null) {
1615                paramObj4 = new NullWrapper("java.lang.String");
1616            }
1617
1618            Object paramObj5 = body;
1619
1620            if (body == null) {
1621                paramObj5 = new NullWrapper("java.lang.String");
1622            }
1623
1624            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1625                    "updateDiscussionMessage",
1626                    new Object[] {
1627                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1628                        paramObj5
1629                    });
1630
1631            Object returnObj = null;
1632
1633            try {
1634                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1635            }
1636            catch (Exception e) {
1637                if (e instanceof com.liferay.portal.PortalException) {
1638                    throw (com.liferay.portal.PortalException)e;
1639                }
1640
1641                if (e instanceof com.liferay.portal.SystemException) {
1642                    throw (com.liferay.portal.SystemException)e;
1643                }
1644
1645                throw new com.liferay.portal.SystemException(e);
1646            }
1647
1648            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1649        }
1650        catch (com.liferay.portal.SystemException se) {
1651            _log.error(se, se);
1652
1653            throw se;
1654        }
1655    }
1656
1657    public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
1658        HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
1659        java.lang.String body,
1660        java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
1661        java.util.List<String> existingFiles, double priority,
1662        java.lang.String[] tagsEntries)
1663        throws com.liferay.portal.PortalException,
1664            com.liferay.portal.SystemException {
1665        try {
1666            Object paramObj0 = new LongWrapper(messageId);
1667
1668            Object paramObj1 = subject;
1669
1670            if (subject == null) {
1671                paramObj1 = new NullWrapper("java.lang.String");
1672            }
1673
1674            Object paramObj2 = body;
1675
1676            if (body == null) {
1677                paramObj2 = new NullWrapper("java.lang.String");
1678            }
1679
1680            Object paramObj3 = files;
1681
1682            if (files == null) {
1683                paramObj3 = new NullWrapper("java.util.List");
1684            }
1685
1686            Object paramObj4 = existingFiles;
1687
1688            if (existingFiles == null) {
1689                paramObj4 = new NullWrapper("java.util.List");
1690            }
1691
1692            Object paramObj5 = new DoubleWrapper(priority);
1693
1694            Object paramObj6 = tagsEntries;
1695
1696            if (tagsEntries == null) {
1697                paramObj6 = new NullWrapper("[Ljava.lang.String;");
1698            }
1699
1700            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1701                    "updateMessage",
1702                    new Object[] {
1703                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1704                        paramObj5, paramObj6
1705                    });
1706
1707            Object returnObj = null;
1708
1709            try {
1710                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1711            }
1712            catch (Exception e) {
1713                if (e instanceof com.liferay.portal.PortalException) {
1714                    throw (com.liferay.portal.PortalException)e;
1715                }
1716
1717                if (e instanceof com.liferay.portal.SystemException) {
1718                    throw (com.liferay.portal.SystemException)e;
1719                }
1720
1721                throw new com.liferay.portal.SystemException(e);
1722            }
1723
1724            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1725        }
1726        catch (com.liferay.portal.SystemException se) {
1727            _log.error(se, se);
1728
1729            throw se;
1730        }
1731    }
1732
1733    public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
1734        HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
1735        java.lang.String body,
1736        java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
1737        java.util.List<String> existingFiles, double priority,
1738        java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
1739        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1740        throws com.liferay.portal.PortalException,
1741            com.liferay.portal.SystemException {
1742        try {
1743            Object paramObj0 = new LongWrapper(messageId);
1744
1745            Object paramObj1 = subject;
1746
1747            if (subject == null) {
1748                paramObj1 = new NullWrapper("java.lang.String");
1749            }
1750
1751            Object paramObj2 = body;
1752
1753            if (body == null) {
1754                paramObj2 = new NullWrapper("java.lang.String");
1755            }
1756
1757            Object paramObj3 = files;
1758
1759            if (files == null) {
1760                paramObj3 = new NullWrapper("java.util.List");
1761            }
1762
1763            Object paramObj4 = existingFiles;
1764
1765            if (existingFiles == null) {
1766                paramObj4 = new NullWrapper("java.util.List");
1767            }
1768
1769            Object paramObj5 = new DoubleWrapper(priority);
1770
1771            Object paramObj6 = tagsEntries;
1772
1773            if (tagsEntries == null) {
1774                paramObj6 = new NullWrapper("[Ljava.lang.String;");
1775            }
1776
1777            Object paramObj7 = prefs;
1778
1779            if (prefs == null) {
1780                paramObj7 = new NullWrapper("javax.portlet.PortletPreferences");
1781            }
1782
1783            Object paramObj8 = themeDisplay;
1784
1785            if (themeDisplay == null) {
1786                paramObj8 = new NullWrapper(
1787                        "com.liferay.portal.theme.ThemeDisplay");
1788            }
1789
1790            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1791                    "updateMessage",
1792                    new Object[] {
1793                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1794                        paramObj5, paramObj6, paramObj7, paramObj8
1795                    });
1796
1797            Object returnObj = null;
1798
1799            try {
1800                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1801            }
1802            catch (Exception e) {
1803                if (e instanceof com.liferay.portal.PortalException) {
1804                    throw (com.liferay.portal.PortalException)e;
1805                }
1806
1807                if (e instanceof com.liferay.portal.SystemException) {
1808                    throw (com.liferay.portal.SystemException)e;
1809                }
1810
1811                throw new com.liferay.portal.SystemException(e);
1812            }
1813
1814            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1815        }
1816        catch (com.liferay.portal.SystemException se) {
1817            _log.error(se, se);
1818
1819            throw se;
1820        }
1821    }
1822
1823    private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
1824}