1   /**
2    * Copyright (c) 2000-2008 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 java.lang.String getThreadMessagesRSS(
1410        HttpPrincipal httpPrincipal, long threadId, int max,
1411        java.lang.String type, double version, java.lang.String displayStyle,
1412        java.lang.String feedURL, java.lang.String entryURL,
1413        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1414        throws com.liferay.portal.PortalException,
1415            com.liferay.portal.SystemException {
1416        try {
1417            Object paramObj0 = new LongWrapper(threadId);
1418
1419            Object paramObj1 = new IntegerWrapper(max);
1420
1421            Object paramObj2 = type;
1422
1423            if (type == null) {
1424                paramObj2 = new NullWrapper("java.lang.String");
1425            }
1426
1427            Object paramObj3 = new DoubleWrapper(version);
1428
1429            Object paramObj4 = displayStyle;
1430
1431            if (displayStyle == null) {
1432                paramObj4 = new NullWrapper("java.lang.String");
1433            }
1434
1435            Object paramObj5 = feedURL;
1436
1437            if (feedURL == null) {
1438                paramObj5 = new NullWrapper("java.lang.String");
1439            }
1440
1441            Object paramObj6 = entryURL;
1442
1443            if (entryURL == null) {
1444                paramObj6 = new NullWrapper("java.lang.String");
1445            }
1446
1447            Object paramObj7 = themeDisplay;
1448
1449            if (themeDisplay == null) {
1450                paramObj7 = new NullWrapper(
1451                        "com.liferay.portal.theme.ThemeDisplay");
1452            }
1453
1454            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1455                    "getThreadMessagesRSS",
1456                    new Object[] {
1457                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1458                        paramObj5, paramObj6, paramObj7
1459                    });
1460
1461            Object returnObj = null;
1462
1463            try {
1464                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1465            }
1466            catch (Exception e) {
1467                if (e instanceof com.liferay.portal.PortalException) {
1468                    throw (com.liferay.portal.PortalException)e;
1469                }
1470
1471                if (e instanceof com.liferay.portal.SystemException) {
1472                    throw (com.liferay.portal.SystemException)e;
1473                }
1474
1475                throw new com.liferay.portal.SystemException(e);
1476            }
1477
1478            return (java.lang.String)returnObj;
1479        }
1480        catch (com.liferay.portal.SystemException se) {
1481            _log.error(se, se);
1482
1483            throw se;
1484        }
1485    }
1486
1487    public static void subscribeMessage(HttpPrincipal httpPrincipal,
1488        long messageId)
1489        throws com.liferay.portal.PortalException,
1490            com.liferay.portal.SystemException {
1491        try {
1492            Object paramObj0 = new LongWrapper(messageId);
1493
1494            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1495                    "subscribeMessage", new Object[] { paramObj0 });
1496
1497            try {
1498                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1499            }
1500            catch (Exception e) {
1501                if (e instanceof com.liferay.portal.PortalException) {
1502                    throw (com.liferay.portal.PortalException)e;
1503                }
1504
1505                if (e instanceof com.liferay.portal.SystemException) {
1506                    throw (com.liferay.portal.SystemException)e;
1507                }
1508
1509                throw new com.liferay.portal.SystemException(e);
1510            }
1511        }
1512        catch (com.liferay.portal.SystemException se) {
1513            _log.error(se, se);
1514
1515            throw se;
1516        }
1517    }
1518
1519    public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
1520        long messageId)
1521        throws com.liferay.portal.PortalException,
1522            com.liferay.portal.SystemException {
1523        try {
1524            Object paramObj0 = new LongWrapper(messageId);
1525
1526            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1527                    "unsubscribeMessage", new Object[] { paramObj0 });
1528
1529            try {
1530                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1531            }
1532            catch (Exception e) {
1533                if (e instanceof com.liferay.portal.PortalException) {
1534                    throw (com.liferay.portal.PortalException)e;
1535                }
1536
1537                if (e instanceof com.liferay.portal.SystemException) {
1538                    throw (com.liferay.portal.SystemException)e;
1539                }
1540
1541                throw new com.liferay.portal.SystemException(e);
1542            }
1543        }
1544        catch (com.liferay.portal.SystemException se) {
1545            _log.error(se, se);
1546
1547            throw se;
1548        }
1549    }
1550
1551    public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
1552        HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
1553        long classPK, long messageId, java.lang.String subject,
1554        java.lang.String body)
1555        throws com.liferay.portal.PortalException,
1556            com.liferay.portal.SystemException {
1557        try {
1558            Object paramObj0 = new LongWrapper(groupId);
1559
1560            Object paramObj1 = className;
1561
1562            if (className == null) {
1563                paramObj1 = new NullWrapper("java.lang.String");
1564            }
1565
1566            Object paramObj2 = new LongWrapper(classPK);
1567
1568            Object paramObj3 = new LongWrapper(messageId);
1569
1570            Object paramObj4 = subject;
1571
1572            if (subject == null) {
1573                paramObj4 = new NullWrapper("java.lang.String");
1574            }
1575
1576            Object paramObj5 = body;
1577
1578            if (body == null) {
1579                paramObj5 = new NullWrapper("java.lang.String");
1580            }
1581
1582            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1583                    "updateDiscussionMessage",
1584                    new Object[] {
1585                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1586                        paramObj5
1587                    });
1588
1589            Object returnObj = null;
1590
1591            try {
1592                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1593            }
1594            catch (Exception e) {
1595                if (e instanceof com.liferay.portal.PortalException) {
1596                    throw (com.liferay.portal.PortalException)e;
1597                }
1598
1599                if (e instanceof com.liferay.portal.SystemException) {
1600                    throw (com.liferay.portal.SystemException)e;
1601                }
1602
1603                throw new com.liferay.portal.SystemException(e);
1604            }
1605
1606            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1607        }
1608        catch (com.liferay.portal.SystemException se) {
1609            _log.error(se, se);
1610
1611            throw se;
1612        }
1613    }
1614
1615    public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
1616        HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
1617        java.lang.String body,
1618        java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
1619        java.util.List<String> existingFiles, double priority,
1620        java.lang.String[] tagsEntries)
1621        throws com.liferay.portal.PortalException,
1622            com.liferay.portal.SystemException {
1623        try {
1624            Object paramObj0 = new LongWrapper(messageId);
1625
1626            Object paramObj1 = subject;
1627
1628            if (subject == null) {
1629                paramObj1 = new NullWrapper("java.lang.String");
1630            }
1631
1632            Object paramObj2 = body;
1633
1634            if (body == null) {
1635                paramObj2 = new NullWrapper("java.lang.String");
1636            }
1637
1638            Object paramObj3 = files;
1639
1640            if (files == null) {
1641                paramObj3 = new NullWrapper("java.util.List");
1642            }
1643
1644            Object paramObj4 = existingFiles;
1645
1646            if (existingFiles == null) {
1647                paramObj4 = new NullWrapper("java.util.List");
1648            }
1649
1650            Object paramObj5 = new DoubleWrapper(priority);
1651
1652            Object paramObj6 = tagsEntries;
1653
1654            if (tagsEntries == null) {
1655                paramObj6 = new NullWrapper("[Ljava.lang.String;");
1656            }
1657
1658            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1659                    "updateMessage",
1660                    new Object[] {
1661                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1662                        paramObj5, paramObj6
1663                    });
1664
1665            Object returnObj = null;
1666
1667            try {
1668                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1669            }
1670            catch (Exception e) {
1671                if (e instanceof com.liferay.portal.PortalException) {
1672                    throw (com.liferay.portal.PortalException)e;
1673                }
1674
1675                if (e instanceof com.liferay.portal.SystemException) {
1676                    throw (com.liferay.portal.SystemException)e;
1677                }
1678
1679                throw new com.liferay.portal.SystemException(e);
1680            }
1681
1682            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1683        }
1684        catch (com.liferay.portal.SystemException se) {
1685            _log.error(se, se);
1686
1687            throw se;
1688        }
1689    }
1690
1691    public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
1692        HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
1693        java.lang.String body,
1694        java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
1695        java.util.List<String> existingFiles, double priority,
1696        java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
1697        com.liferay.portal.theme.ThemeDisplay themeDisplay)
1698        throws com.liferay.portal.PortalException,
1699            com.liferay.portal.SystemException {
1700        try {
1701            Object paramObj0 = new LongWrapper(messageId);
1702
1703            Object paramObj1 = subject;
1704
1705            if (subject == null) {
1706                paramObj1 = new NullWrapper("java.lang.String");
1707            }
1708
1709            Object paramObj2 = body;
1710
1711            if (body == null) {
1712                paramObj2 = new NullWrapper("java.lang.String");
1713            }
1714
1715            Object paramObj3 = files;
1716
1717            if (files == null) {
1718                paramObj3 = new NullWrapper("java.util.List");
1719            }
1720
1721            Object paramObj4 = existingFiles;
1722
1723            if (existingFiles == null) {
1724                paramObj4 = new NullWrapper("java.util.List");
1725            }
1726
1727            Object paramObj5 = new DoubleWrapper(priority);
1728
1729            Object paramObj6 = tagsEntries;
1730
1731            if (tagsEntries == null) {
1732                paramObj6 = new NullWrapper("[Ljava.lang.String;");
1733            }
1734
1735            Object paramObj7 = prefs;
1736
1737            if (prefs == null) {
1738                paramObj7 = new NullWrapper("javax.portlet.PortletPreferences");
1739            }
1740
1741            Object paramObj8 = themeDisplay;
1742
1743            if (themeDisplay == null) {
1744                paramObj8 = new NullWrapper(
1745                        "com.liferay.portal.theme.ThemeDisplay");
1746            }
1747
1748            MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1749                    "updateMessage",
1750                    new Object[] {
1751                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1752                        paramObj5, paramObj6, paramObj7, paramObj8
1753                    });
1754
1755            Object returnObj = null;
1756
1757            try {
1758                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1759            }
1760            catch (Exception e) {
1761                if (e instanceof com.liferay.portal.PortalException) {
1762                    throw (com.liferay.portal.PortalException)e;
1763                }
1764
1765                if (e instanceof com.liferay.portal.SystemException) {
1766                    throw (com.liferay.portal.SystemException)e;
1767                }
1768
1769                throw new com.liferay.portal.SystemException(e);
1770            }
1771
1772            return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1773        }
1774        catch (com.liferay.portal.SystemException se) {
1775            _log.error(se, se);
1776
1777            throw se;
1778        }
1779    }
1780
1781    private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
1782}