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