1
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
77 public class MBMessageServiceHttp {
78 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
79 HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
80 long threadId, long parentMessageId, java.lang.String subject,
81 java.lang.String body,
82 com.liferay.portal.service.ServiceContext serviceContext)
83 throws com.liferay.portal.PortalException,
84 com.liferay.portal.SystemException {
85 try {
86 Object paramObj0 = className;
87
88 if (className == null) {
89 paramObj0 = new NullWrapper("java.lang.String");
90 }
91
92 Object paramObj1 = new LongWrapper(classPK);
93
94 Object paramObj2 = new LongWrapper(threadId);
95
96 Object paramObj3 = new LongWrapper(parentMessageId);
97
98 Object paramObj4 = subject;
99
100 if (subject == null) {
101 paramObj4 = new NullWrapper("java.lang.String");
102 }
103
104 Object paramObj5 = body;
105
106 if (body == null) {
107 paramObj5 = new NullWrapper("java.lang.String");
108 }
109
110 Object paramObj6 = serviceContext;
111
112 if (serviceContext == null) {
113 paramObj6 = new NullWrapper(
114 "com.liferay.portal.service.ServiceContext");
115 }
116
117 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
118 "addDiscussionMessage",
119 new Object[] {
120 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
121 paramObj5, paramObj6
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,
155 com.liferay.portal.service.ServiceContext serviceContext)
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 = serviceContext;
184
185 if (serviceContext == null) {
186 paramObj6 = new NullWrapper(
187 "com.liferay.portal.service.ServiceContext");
188 }
189
190 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
191 "addMessage",
192 new Object[] {
193 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
194 paramObj5, paramObj6
195 });
196
197 Object returnObj = null;
198
199 try {
200 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
201 }
202 catch (Exception e) {
203 if (e instanceof com.liferay.portal.PortalException) {
204 throw (com.liferay.portal.PortalException)e;
205 }
206
207 if (e instanceof com.liferay.portal.SystemException) {
208 throw (com.liferay.portal.SystemException)e;
209 }
210
211 throw new com.liferay.portal.SystemException(e);
212 }
213
214 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
215 }
216 catch (com.liferay.portal.SystemException se) {
217 _log.error(se, se);
218
219 throw se;
220 }
221 }
222
223 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
224 HttpPrincipal httpPrincipal, long categoryId, long threadId,
225 long parentMessageId, java.lang.String subject, java.lang.String body,
226 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
227 boolean anonymous, double priority,
228 com.liferay.portal.service.ServiceContext serviceContext)
229 throws com.liferay.portal.PortalException,
230 com.liferay.portal.SystemException {
231 try {
232 Object paramObj0 = new LongWrapper(categoryId);
233
234 Object paramObj1 = new LongWrapper(threadId);
235
236 Object paramObj2 = new LongWrapper(parentMessageId);
237
238 Object paramObj3 = subject;
239
240 if (subject == null) {
241 paramObj3 = new NullWrapper("java.lang.String");
242 }
243
244 Object paramObj4 = body;
245
246 if (body == null) {
247 paramObj4 = new NullWrapper("java.lang.String");
248 }
249
250 Object paramObj5 = files;
251
252 if (files == null) {
253 paramObj5 = new NullWrapper("java.util.List");
254 }
255
256 Object paramObj6 = new BooleanWrapper(anonymous);
257
258 Object paramObj7 = new DoubleWrapper(priority);
259
260 Object paramObj8 = serviceContext;
261
262 if (serviceContext == null) {
263 paramObj8 = new NullWrapper(
264 "com.liferay.portal.service.ServiceContext");
265 }
266
267 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
268 "addMessage",
269 new Object[] {
270 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
271 paramObj5, paramObj6, paramObj7, paramObj8
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.PortalException) {
281 throw (com.liferay.portal.PortalException)e;
282 }
283
284 if (e instanceof com.liferay.portal.SystemException) {
285 throw (com.liferay.portal.SystemException)e;
286 }
287
288 throw new com.liferay.portal.SystemException(e);
289 }
290
291 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
292 }
293 catch (com.liferay.portal.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.PortalException,
303 com.liferay.portal.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.PortalException) {
326 throw (com.liferay.portal.PortalException)e;
327 }
328
329 if (e instanceof com.liferay.portal.SystemException) {
330 throw (com.liferay.portal.SystemException)e;
331 }
332
333 throw new com.liferay.portal.SystemException(e);
334 }
335 }
336 catch (com.liferay.portal.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.PortalException,
345 com.liferay.portal.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.PortalException) {
357 throw (com.liferay.portal.PortalException)e;
358 }
359
360 if (e instanceof com.liferay.portal.SystemException) {
361 throw (com.liferay.portal.SystemException)e;
362 }
363
364 throw new com.liferay.portal.SystemException(e);
365 }
366 }
367 catch (com.liferay.portal.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 categoryId, int start, int end)
376 throws com.liferay.portal.PortalException,
377 com.liferay.portal.SystemException {
378 try {
379 Object paramObj0 = new LongWrapper(categoryId);
380
381 Object paramObj1 = new IntegerWrapper(start);
382
383 Object paramObj2 = new IntegerWrapper(end);
384
385 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
386 "getCategoryMessages",
387 new Object[] { paramObj0, paramObj1, paramObj2 });
388
389 Object returnObj = null;
390
391 try {
392 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
393 }
394 catch (Exception e) {
395 if (e instanceof com.liferay.portal.PortalException) {
396 throw (com.liferay.portal.PortalException)e;
397 }
398
399 if (e instanceof com.liferay.portal.SystemException) {
400 throw (com.liferay.portal.SystemException)e;
401 }
402
403 throw new com.liferay.portal.SystemException(e);
404 }
405
406 return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
407 }
408 catch (com.liferay.portal.SystemException se) {
409 _log.error(se, se);
410
411 throw se;
412 }
413 }
414
415 public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
416 long categoryId) throws com.liferay.portal.SystemException {
417 try {
418 Object paramObj0 = new LongWrapper(categoryId);
419
420 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
421 "getCategoryMessagesCount", new Object[] { paramObj0 });
422
423 Object returnObj = null;
424
425 try {
426 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
427 }
428 catch (Exception e) {
429 if (e instanceof com.liferay.portal.SystemException) {
430 throw (com.liferay.portal.SystemException)e;
431 }
432
433 throw new com.liferay.portal.SystemException(e);
434 }
435
436 return ((Integer)returnObj).intValue();
437 }
438 catch (com.liferay.portal.SystemException se) {
439 _log.error(se, se);
440
441 throw se;
442 }
443 }
444
445 public static java.lang.String getCategoryMessagesRSS(
446 HttpPrincipal httpPrincipal, long categoryId, int max,
447 java.lang.String type, double version, java.lang.String displayStyle,
448 java.lang.String feedURL, java.lang.String entryURL,
449 com.liferay.portal.theme.ThemeDisplay themeDisplay)
450 throws com.liferay.portal.PortalException,
451 com.liferay.portal.SystemException {
452 try {
453 Object paramObj0 = new LongWrapper(categoryId);
454
455 Object paramObj1 = new IntegerWrapper(max);
456
457 Object paramObj2 = type;
458
459 if (type == null) {
460 paramObj2 = new NullWrapper("java.lang.String");
461 }
462
463 Object paramObj3 = new DoubleWrapper(version);
464
465 Object paramObj4 = displayStyle;
466
467 if (displayStyle == null) {
468 paramObj4 = new NullWrapper("java.lang.String");
469 }
470
471 Object paramObj5 = feedURL;
472
473 if (feedURL == null) {
474 paramObj5 = new NullWrapper("java.lang.String");
475 }
476
477 Object paramObj6 = entryURL;
478
479 if (entryURL == null) {
480 paramObj6 = new NullWrapper("java.lang.String");
481 }
482
483 Object paramObj7 = themeDisplay;
484
485 if (themeDisplay == null) {
486 paramObj7 = new NullWrapper(
487 "com.liferay.portal.theme.ThemeDisplay");
488 }
489
490 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
491 "getCategoryMessagesRSS",
492 new Object[] {
493 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
494 paramObj5, paramObj6, paramObj7
495 });
496
497 Object returnObj = null;
498
499 try {
500 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
501 }
502 catch (Exception e) {
503 if (e instanceof com.liferay.portal.PortalException) {
504 throw (com.liferay.portal.PortalException)e;
505 }
506
507 if (e instanceof com.liferay.portal.SystemException) {
508 throw (com.liferay.portal.SystemException)e;
509 }
510
511 throw new com.liferay.portal.SystemException(e);
512 }
513
514 return (java.lang.String)returnObj;
515 }
516 catch (com.liferay.portal.SystemException se) {
517 _log.error(se, se);
518
519 throw se;
520 }
521 }
522
523 public static java.lang.String getCompanyMessagesRSS(
524 HttpPrincipal httpPrincipal, long companyId, int max,
525 java.lang.String type, double version, java.lang.String displayStyle,
526 java.lang.String feedURL, java.lang.String entryURL,
527 com.liferay.portal.theme.ThemeDisplay themeDisplay)
528 throws com.liferay.portal.PortalException,
529 com.liferay.portal.SystemException {
530 try {
531 Object paramObj0 = new LongWrapper(companyId);
532
533 Object paramObj1 = new IntegerWrapper(max);
534
535 Object paramObj2 = type;
536
537 if (type == null) {
538 paramObj2 = new NullWrapper("java.lang.String");
539 }
540
541 Object paramObj3 = new DoubleWrapper(version);
542
543 Object paramObj4 = displayStyle;
544
545 if (displayStyle == null) {
546 paramObj4 = new NullWrapper("java.lang.String");
547 }
548
549 Object paramObj5 = feedURL;
550
551 if (feedURL == null) {
552 paramObj5 = new NullWrapper("java.lang.String");
553 }
554
555 Object paramObj6 = entryURL;
556
557 if (entryURL == null) {
558 paramObj6 = new NullWrapper("java.lang.String");
559 }
560
561 Object paramObj7 = themeDisplay;
562
563 if (themeDisplay == null) {
564 paramObj7 = new NullWrapper(
565 "com.liferay.portal.theme.ThemeDisplay");
566 }
567
568 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
569 "getCompanyMessagesRSS",
570 new Object[] {
571 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
572 paramObj5, paramObj6, paramObj7
573 });
574
575 Object returnObj = null;
576
577 try {
578 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
579 }
580 catch (Exception e) {
581 if (e instanceof com.liferay.portal.PortalException) {
582 throw (com.liferay.portal.PortalException)e;
583 }
584
585 if (e instanceof com.liferay.portal.SystemException) {
586 throw (com.liferay.portal.SystemException)e;
587 }
588
589 throw new com.liferay.portal.SystemException(e);
590 }
591
592 return (java.lang.String)returnObj;
593 }
594 catch (com.liferay.portal.SystemException se) {
595 _log.error(se, se);
596
597 throw se;
598 }
599 }
600
601 public static java.lang.String getGroupMessagesRSS(
602 HttpPrincipal httpPrincipal, long groupId, int max,
603 java.lang.String type, double version, java.lang.String displayStyle,
604 java.lang.String feedURL, java.lang.String entryURL,
605 com.liferay.portal.theme.ThemeDisplay themeDisplay)
606 throws com.liferay.portal.PortalException,
607 com.liferay.portal.SystemException {
608 try {
609 Object paramObj0 = new LongWrapper(groupId);
610
611 Object paramObj1 = new IntegerWrapper(max);
612
613 Object paramObj2 = type;
614
615 if (type == null) {
616 paramObj2 = new NullWrapper("java.lang.String");
617 }
618
619 Object paramObj3 = new DoubleWrapper(version);
620
621 Object paramObj4 = displayStyle;
622
623 if (displayStyle == null) {
624 paramObj4 = new NullWrapper("java.lang.String");
625 }
626
627 Object paramObj5 = feedURL;
628
629 if (feedURL == null) {
630 paramObj5 = new NullWrapper("java.lang.String");
631 }
632
633 Object paramObj6 = entryURL;
634
635 if (entryURL == null) {
636 paramObj6 = new NullWrapper("java.lang.String");
637 }
638
639 Object paramObj7 = themeDisplay;
640
641 if (themeDisplay == null) {
642 paramObj7 = new NullWrapper(
643 "com.liferay.portal.theme.ThemeDisplay");
644 }
645
646 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
647 "getGroupMessagesRSS",
648 new Object[] {
649 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
650 paramObj5, paramObj6, paramObj7
651 });
652
653 Object returnObj = null;
654
655 try {
656 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
657 }
658 catch (Exception e) {
659 if (e instanceof com.liferay.portal.PortalException) {
660 throw (com.liferay.portal.PortalException)e;
661 }
662
663 if (e instanceof com.liferay.portal.SystemException) {
664 throw (com.liferay.portal.SystemException)e;
665 }
666
667 throw new com.liferay.portal.SystemException(e);
668 }
669
670 return (java.lang.String)returnObj;
671 }
672 catch (com.liferay.portal.SystemException se) {
673 _log.error(se, se);
674
675 throw se;
676 }
677 }
678
679 public static java.lang.String getGroupMessagesRSS(
680 HttpPrincipal httpPrincipal, long groupId, long userId, int max,
681 java.lang.String type, double version, java.lang.String displayStyle,
682 java.lang.String feedURL, java.lang.String entryURL,
683 com.liferay.portal.theme.ThemeDisplay themeDisplay)
684 throws com.liferay.portal.PortalException,
685 com.liferay.portal.SystemException {
686 try {
687 Object paramObj0 = new LongWrapper(groupId);
688
689 Object paramObj1 = new LongWrapper(userId);
690
691 Object paramObj2 = new IntegerWrapper(max);
692
693 Object paramObj3 = type;
694
695 if (type == null) {
696 paramObj3 = new NullWrapper("java.lang.String");
697 }
698
699 Object paramObj4 = new DoubleWrapper(version);
700
701 Object paramObj5 = displayStyle;
702
703 if (displayStyle == null) {
704 paramObj5 = new NullWrapper("java.lang.String");
705 }
706
707 Object paramObj6 = feedURL;
708
709 if (feedURL == null) {
710 paramObj6 = new NullWrapper("java.lang.String");
711 }
712
713 Object paramObj7 = entryURL;
714
715 if (entryURL == null) {
716 paramObj7 = new NullWrapper("java.lang.String");
717 }
718
719 Object paramObj8 = themeDisplay;
720
721 if (themeDisplay == null) {
722 paramObj8 = new NullWrapper(
723 "com.liferay.portal.theme.ThemeDisplay");
724 }
725
726 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
727 "getGroupMessagesRSS",
728 new Object[] {
729 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
730 paramObj5, paramObj6, paramObj7, paramObj8
731 });
732
733 Object returnObj = null;
734
735 try {
736 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
737 }
738 catch (Exception e) {
739 if (e instanceof com.liferay.portal.PortalException) {
740 throw (com.liferay.portal.PortalException)e;
741 }
742
743 if (e instanceof com.liferay.portal.SystemException) {
744 throw (com.liferay.portal.SystemException)e;
745 }
746
747 throw new com.liferay.portal.SystemException(e);
748 }
749
750 return (java.lang.String)returnObj;
751 }
752 catch (com.liferay.portal.SystemException se) {
753 _log.error(se, se);
754
755 throw se;
756 }
757 }
758
759 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
760 HttpPrincipal httpPrincipal, long messageId)
761 throws com.liferay.portal.PortalException,
762 com.liferay.portal.SystemException {
763 try {
764 Object paramObj0 = new LongWrapper(messageId);
765
766 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
767 "getMessage", new Object[] { paramObj0 });
768
769 Object returnObj = null;
770
771 try {
772 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
773 }
774 catch (Exception e) {
775 if (e instanceof com.liferay.portal.PortalException) {
776 throw (com.liferay.portal.PortalException)e;
777 }
778
779 if (e instanceof com.liferay.portal.SystemException) {
780 throw (com.liferay.portal.SystemException)e;
781 }
782
783 throw new com.liferay.portal.SystemException(e);
784 }
785
786 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
787 }
788 catch (com.liferay.portal.SystemException se) {
789 _log.error(se, se);
790
791 throw se;
792 }
793 }
794
795 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
796 HttpPrincipal httpPrincipal, long messageId)
797 throws com.liferay.portal.PortalException,
798 com.liferay.portal.SystemException {
799 try {
800 Object paramObj0 = new LongWrapper(messageId);
801
802 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
803 "getMessageDisplay", new Object[] { paramObj0 });
804
805 Object returnObj = null;
806
807 try {
808 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
809 }
810 catch (Exception e) {
811 if (e instanceof com.liferay.portal.PortalException) {
812 throw (com.liferay.portal.PortalException)e;
813 }
814
815 if (e instanceof com.liferay.portal.SystemException) {
816 throw (com.liferay.portal.SystemException)e;
817 }
818
819 throw new com.liferay.portal.SystemException(e);
820 }
821
822 return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
823 }
824 catch (com.liferay.portal.SystemException se) {
825 _log.error(se, se);
826
827 throw se;
828 }
829 }
830
831 public static java.lang.String getThreadMessagesRSS(
832 HttpPrincipal httpPrincipal, long threadId, int max,
833 java.lang.String type, double version, java.lang.String displayStyle,
834 java.lang.String feedURL, java.lang.String entryURL,
835 com.liferay.portal.theme.ThemeDisplay themeDisplay)
836 throws com.liferay.portal.PortalException,
837 com.liferay.portal.SystemException {
838 try {
839 Object paramObj0 = new LongWrapper(threadId);
840
841 Object paramObj1 = new IntegerWrapper(max);
842
843 Object paramObj2 = type;
844
845 if (type == null) {
846 paramObj2 = new NullWrapper("java.lang.String");
847 }
848
849 Object paramObj3 = new DoubleWrapper(version);
850
851 Object paramObj4 = displayStyle;
852
853 if (displayStyle == null) {
854 paramObj4 = new NullWrapper("java.lang.String");
855 }
856
857 Object paramObj5 = feedURL;
858
859 if (feedURL == null) {
860 paramObj5 = new NullWrapper("java.lang.String");
861 }
862
863 Object paramObj6 = entryURL;
864
865 if (entryURL == null) {
866 paramObj6 = new NullWrapper("java.lang.String");
867 }
868
869 Object paramObj7 = themeDisplay;
870
871 if (themeDisplay == null) {
872 paramObj7 = new NullWrapper(
873 "com.liferay.portal.theme.ThemeDisplay");
874 }
875
876 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
877 "getThreadMessagesRSS",
878 new Object[] {
879 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
880 paramObj5, paramObj6, paramObj7
881 });
882
883 Object returnObj = null;
884
885 try {
886 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
887 }
888 catch (Exception e) {
889 if (e instanceof com.liferay.portal.PortalException) {
890 throw (com.liferay.portal.PortalException)e;
891 }
892
893 if (e instanceof com.liferay.portal.SystemException) {
894 throw (com.liferay.portal.SystemException)e;
895 }
896
897 throw new com.liferay.portal.SystemException(e);
898 }
899
900 return (java.lang.String)returnObj;
901 }
902 catch (com.liferay.portal.SystemException se) {
903 _log.error(se, se);
904
905 throw se;
906 }
907 }
908
909 public static void subscribeMessage(HttpPrincipal httpPrincipal,
910 long messageId)
911 throws com.liferay.portal.PortalException,
912 com.liferay.portal.SystemException {
913 try {
914 Object paramObj0 = new LongWrapper(messageId);
915
916 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
917 "subscribeMessage", new Object[] { paramObj0 });
918
919 try {
920 TunnelUtil.invoke(httpPrincipal, methodWrapper);
921 }
922 catch (Exception e) {
923 if (e instanceof com.liferay.portal.PortalException) {
924 throw (com.liferay.portal.PortalException)e;
925 }
926
927 if (e instanceof com.liferay.portal.SystemException) {
928 throw (com.liferay.portal.SystemException)e;
929 }
930
931 throw new com.liferay.portal.SystemException(e);
932 }
933 }
934 catch (com.liferay.portal.SystemException se) {
935 _log.error(se, se);
936
937 throw se;
938 }
939 }
940
941 public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
942 long messageId)
943 throws com.liferay.portal.PortalException,
944 com.liferay.portal.SystemException {
945 try {
946 Object paramObj0 = new LongWrapper(messageId);
947
948 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
949 "unsubscribeMessage", new Object[] { paramObj0 });
950
951 try {
952 TunnelUtil.invoke(httpPrincipal, methodWrapper);
953 }
954 catch (Exception e) {
955 if (e instanceof com.liferay.portal.PortalException) {
956 throw (com.liferay.portal.PortalException)e;
957 }
958
959 if (e instanceof com.liferay.portal.SystemException) {
960 throw (com.liferay.portal.SystemException)e;
961 }
962
963 throw new com.liferay.portal.SystemException(e);
964 }
965 }
966 catch (com.liferay.portal.SystemException se) {
967 _log.error(se, se);
968
969 throw se;
970 }
971 }
972
973 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
974 HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
975 long messageId, java.lang.String subject, java.lang.String body,
976 com.liferay.portal.service.ServiceContext serviceContext)
977 throws com.liferay.portal.PortalException,
978 com.liferay.portal.SystemException {
979 try {
980 Object paramObj0 = className;
981
982 if (className == null) {
983 paramObj0 = new NullWrapper("java.lang.String");
984 }
985
986 Object paramObj1 = new LongWrapper(classPK);
987
988 Object paramObj2 = new LongWrapper(messageId);
989
990 Object paramObj3 = subject;
991
992 if (subject == null) {
993 paramObj3 = new NullWrapper("java.lang.String");
994 }
995
996 Object paramObj4 = body;
997
998 if (body == null) {
999 paramObj4 = new NullWrapper("java.lang.String");
1000 }
1001
1002 Object paramObj5 = serviceContext;
1003
1004 if (serviceContext == null) {
1005 paramObj5 = new NullWrapper(
1006 "com.liferay.portal.service.ServiceContext");
1007 }
1008
1009 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1010 "updateDiscussionMessage",
1011 new Object[] {
1012 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1013 paramObj5
1014 });
1015
1016 Object returnObj = null;
1017
1018 try {
1019 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1020 }
1021 catch (Exception e) {
1022 if (e instanceof com.liferay.portal.PortalException) {
1023 throw (com.liferay.portal.PortalException)e;
1024 }
1025
1026 if (e instanceof com.liferay.portal.SystemException) {
1027 throw (com.liferay.portal.SystemException)e;
1028 }
1029
1030 throw new com.liferay.portal.SystemException(e);
1031 }
1032
1033 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1034 }
1035 catch (com.liferay.portal.SystemException se) {
1036 _log.error(se, se);
1037
1038 throw se;
1039 }
1040 }
1041
1042 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
1043 HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
1044 java.lang.String body,
1045 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
1046 java.util.List<String> existingFiles, double priority,
1047 com.liferay.portal.service.ServiceContext serviceContext)
1048 throws com.liferay.portal.PortalException,
1049 com.liferay.portal.SystemException {
1050 try {
1051 Object paramObj0 = new LongWrapper(messageId);
1052
1053 Object paramObj1 = subject;
1054
1055 if (subject == null) {
1056 paramObj1 = new NullWrapper("java.lang.String");
1057 }
1058
1059 Object paramObj2 = body;
1060
1061 if (body == null) {
1062 paramObj2 = new NullWrapper("java.lang.String");
1063 }
1064
1065 Object paramObj3 = files;
1066
1067 if (files == null) {
1068 paramObj3 = new NullWrapper("java.util.List");
1069 }
1070
1071 Object paramObj4 = existingFiles;
1072
1073 if (existingFiles == null) {
1074 paramObj4 = new NullWrapper("java.util.List");
1075 }
1076
1077 Object paramObj5 = new DoubleWrapper(priority);
1078
1079 Object paramObj6 = serviceContext;
1080
1081 if (serviceContext == null) {
1082 paramObj6 = new NullWrapper(
1083 "com.liferay.portal.service.ServiceContext");
1084 }
1085
1086 MethodWrapper methodWrapper = new MethodWrapper(MBMessageServiceUtil.class.getName(),
1087 "updateMessage",
1088 new Object[] {
1089 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1090 paramObj5, paramObj6
1091 });
1092
1093 Object returnObj = null;
1094
1095 try {
1096 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1097 }
1098 catch (Exception e) {
1099 if (e instanceof com.liferay.portal.PortalException) {
1100 throw (com.liferay.portal.PortalException)e;
1101 }
1102
1103 if (e instanceof com.liferay.portal.SystemException) {
1104 throw (com.liferay.portal.SystemException)e;
1105 }
1106
1107 throw new com.liferay.portal.SystemException(e);
1108 }
1109
1110 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
1111 }
1112 catch (com.liferay.portal.SystemException se) {
1113 _log.error(se, se);
1114
1115 throw se;
1116 }
1117 }
1118
1119 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
1120}