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