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