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