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