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