001
014
015 package com.liferay.portlet.messageboards.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
025
026
056 public class MBMessageServiceHttp {
057 public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
058 HttpPrincipal httpPrincipal, long groupId, java.lang.String className,
059 long classPK, java.lang.String permissionClassName,
060 long permissionClassPK, long threadId, long parentMessageId,
061 java.lang.String subject, java.lang.String body,
062 com.liferay.portal.service.ServiceContext serviceContext)
063 throws com.liferay.portal.kernel.exception.PortalException,
064 com.liferay.portal.kernel.exception.SystemException {
065 try {
066 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
067 "addDiscussionMessage", long.class, java.lang.String.class,
068 long.class, java.lang.String.class, long.class, long.class,
069 long.class, java.lang.String.class, java.lang.String.class,
070 com.liferay.portal.service.ServiceContext.class);
071
072 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
073 className, classPK, permissionClassName, permissionClassPK,
074 threadId, parentMessageId, subject, body, serviceContext);
075
076 Object returnObj = null;
077
078 try {
079 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
080 }
081 catch (Exception e) {
082 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
083 throw (com.liferay.portal.kernel.exception.PortalException)e;
084 }
085
086 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
087 throw (com.liferay.portal.kernel.exception.SystemException)e;
088 }
089
090 throw new com.liferay.portal.kernel.exception.SystemException(e);
091 }
092
093 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
094 }
095 catch (com.liferay.portal.kernel.exception.SystemException se) {
096 _log.error(se, se);
097
098 throw se;
099 }
100 }
101
102 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
103 HttpPrincipal httpPrincipal, long groupId, long categoryId,
104 long threadId, long parentMessageId, java.lang.String subject,
105 java.lang.String body,
106 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
107 boolean anonymous, double priority, boolean allowPingbacks,
108 com.liferay.portal.service.ServiceContext serviceContext)
109 throws com.liferay.portal.kernel.exception.PortalException,
110 com.liferay.portal.kernel.exception.SystemException {
111 try {
112 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
113 "addMessage", long.class, long.class, long.class,
114 long.class, java.lang.String.class, java.lang.String.class,
115 java.util.List.class, boolean.class, double.class,
116 boolean.class,
117 com.liferay.portal.service.ServiceContext.class);
118
119 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
120 categoryId, threadId, parentMessageId, subject, body,
121 files, anonymous, priority, allowPingbacks, serviceContext);
122
123 Object returnObj = null;
124
125 try {
126 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
127 }
128 catch (Exception e) {
129 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
130 throw (com.liferay.portal.kernel.exception.PortalException)e;
131 }
132
133 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
134 throw (com.liferay.portal.kernel.exception.SystemException)e;
135 }
136
137 throw new com.liferay.portal.kernel.exception.SystemException(e);
138 }
139
140 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
141 }
142 catch (com.liferay.portal.kernel.exception.SystemException se) {
143 _log.error(se, se);
144
145 throw se;
146 }
147 }
148
149 public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
150 HttpPrincipal httpPrincipal, long groupId, long categoryId,
151 java.lang.String subject, java.lang.String body,
152 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
153 boolean anonymous, double priority, boolean allowPingbacks,
154 com.liferay.portal.service.ServiceContext serviceContext)
155 throws com.liferay.portal.kernel.exception.PortalException,
156 com.liferay.portal.kernel.exception.SystemException {
157 try {
158 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
159 "addMessage", long.class, long.class,
160 java.lang.String.class, java.lang.String.class,
161 java.util.List.class, boolean.class, double.class,
162 boolean.class,
163 com.liferay.portal.service.ServiceContext.class);
164
165 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
166 categoryId, subject, body, files, anonymous, priority,
167 allowPingbacks, serviceContext);
168
169 Object returnObj = null;
170
171 try {
172 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
173 }
174 catch (Exception e) {
175 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
176 throw (com.liferay.portal.kernel.exception.PortalException)e;
177 }
178
179 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
180 throw (com.liferay.portal.kernel.exception.SystemException)e;
181 }
182
183 throw new com.liferay.portal.kernel.exception.SystemException(e);
184 }
185
186 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
187 }
188 catch (com.liferay.portal.kernel.exception.SystemException se) {
189 _log.error(se, se);
190
191 throw se;
192 }
193 }
194
195 public static void deleteDiscussionMessage(HttpPrincipal httpPrincipal,
196 long groupId, java.lang.String className, long classPK,
197 java.lang.String permissionClassName, long permissionClassPK,
198 long messageId)
199 throws com.liferay.portal.kernel.exception.PortalException,
200 com.liferay.portal.kernel.exception.SystemException {
201 try {
202 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
203 "deleteDiscussionMessage", long.class,
204 java.lang.String.class, long.class, java.lang.String.class,
205 long.class, long.class);
206
207 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
208 className, classPK, permissionClassName, permissionClassPK,
209 messageId);
210
211 try {
212 TunnelUtil.invoke(httpPrincipal, methodHandler);
213 }
214 catch (Exception e) {
215 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
216 throw (com.liferay.portal.kernel.exception.PortalException)e;
217 }
218
219 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
220 throw (com.liferay.portal.kernel.exception.SystemException)e;
221 }
222
223 throw new com.liferay.portal.kernel.exception.SystemException(e);
224 }
225 }
226 catch (com.liferay.portal.kernel.exception.SystemException se) {
227 _log.error(se, se);
228
229 throw se;
230 }
231 }
232
233 public static void deleteMessage(HttpPrincipal httpPrincipal, long messageId)
234 throws com.liferay.portal.kernel.exception.PortalException,
235 com.liferay.portal.kernel.exception.SystemException {
236 try {
237 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
238 "deleteMessage", long.class);
239
240 MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
241
242 try {
243 TunnelUtil.invoke(httpPrincipal, methodHandler);
244 }
245 catch (Exception e) {
246 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
247 throw (com.liferay.portal.kernel.exception.PortalException)e;
248 }
249
250 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
251 throw (com.liferay.portal.kernel.exception.SystemException)e;
252 }
253
254 throw new com.liferay.portal.kernel.exception.SystemException(e);
255 }
256 }
257 catch (com.liferay.portal.kernel.exception.SystemException se) {
258 _log.error(se, se);
259
260 throw se;
261 }
262 }
263
264 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
265 HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
266 int start, int end)
267 throws com.liferay.portal.kernel.exception.PortalException,
268 com.liferay.portal.kernel.exception.SystemException {
269 try {
270 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
271 "getCategoryMessages", long.class, long.class, int.class,
272 int.class, int.class);
273
274 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
275 categoryId, status, start, end);
276
277 Object returnObj = null;
278
279 try {
280 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
281 }
282 catch (Exception e) {
283 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
284 throw (com.liferay.portal.kernel.exception.PortalException)e;
285 }
286
287 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
288 throw (com.liferay.portal.kernel.exception.SystemException)e;
289 }
290
291 throw new com.liferay.portal.kernel.exception.SystemException(e);
292 }
293
294 return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
295 }
296 catch (com.liferay.portal.kernel.exception.SystemException se) {
297 _log.error(se, se);
298
299 throw se;
300 }
301 }
302
303 public static int getCategoryMessagesCount(HttpPrincipal httpPrincipal,
304 long groupId, long categoryId, int status)
305 throws com.liferay.portal.kernel.exception.SystemException {
306 try {
307 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
308 "getCategoryMessagesCount", long.class, long.class,
309 int.class);
310
311 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
312 categoryId, status);
313
314 Object returnObj = null;
315
316 try {
317 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
318 }
319 catch (Exception e) {
320 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
321 throw (com.liferay.portal.kernel.exception.SystemException)e;
322 }
323
324 throw new com.liferay.portal.kernel.exception.SystemException(e);
325 }
326
327 return ((Integer)returnObj).intValue();
328 }
329 catch (com.liferay.portal.kernel.exception.SystemException se) {
330 _log.error(se, se);
331
332 throw se;
333 }
334 }
335
336 public static java.lang.String getCategoryMessagesRSS(
337 HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
338 int max, java.lang.String type, double version,
339 java.lang.String displayStyle, java.lang.String feedURL,
340 java.lang.String entryURL,
341 com.liferay.portal.theme.ThemeDisplay themeDisplay)
342 throws com.liferay.portal.kernel.exception.PortalException,
343 com.liferay.portal.kernel.exception.SystemException {
344 try {
345 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
346 "getCategoryMessagesRSS", long.class, long.class,
347 int.class, int.class, java.lang.String.class, double.class,
348 java.lang.String.class, java.lang.String.class,
349 java.lang.String.class,
350 com.liferay.portal.theme.ThemeDisplay.class);
351
352 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
353 categoryId, status, max, type, version, displayStyle,
354 feedURL, entryURL, themeDisplay);
355
356 Object returnObj = null;
357
358 try {
359 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
360 }
361 catch (Exception e) {
362 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
363 throw (com.liferay.portal.kernel.exception.PortalException)e;
364 }
365
366 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
367 throw (com.liferay.portal.kernel.exception.SystemException)e;
368 }
369
370 throw new com.liferay.portal.kernel.exception.SystemException(e);
371 }
372
373 return (java.lang.String)returnObj;
374 }
375 catch (com.liferay.portal.kernel.exception.SystemException se) {
376 _log.error(se, se);
377
378 throw se;
379 }
380 }
381
382 public static java.lang.String getCompanyMessagesRSS(
383 HttpPrincipal httpPrincipal, long companyId, int status, int max,
384 java.lang.String type, double version, java.lang.String displayStyle,
385 java.lang.String feedURL, java.lang.String entryURL,
386 com.liferay.portal.theme.ThemeDisplay themeDisplay)
387 throws com.liferay.portal.kernel.exception.PortalException,
388 com.liferay.portal.kernel.exception.SystemException {
389 try {
390 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
391 "getCompanyMessagesRSS", long.class, int.class, int.class,
392 java.lang.String.class, double.class,
393 java.lang.String.class, java.lang.String.class,
394 java.lang.String.class,
395 com.liferay.portal.theme.ThemeDisplay.class);
396
397 MethodHandler methodHandler = new MethodHandler(methodKey,
398 companyId, status, max, type, version, displayStyle,
399 feedURL, entryURL, themeDisplay);
400
401 Object returnObj = null;
402
403 try {
404 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
405 }
406 catch (Exception e) {
407 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
408 throw (com.liferay.portal.kernel.exception.PortalException)e;
409 }
410
411 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
412 throw (com.liferay.portal.kernel.exception.SystemException)e;
413 }
414
415 throw new com.liferay.portal.kernel.exception.SystemException(e);
416 }
417
418 return (java.lang.String)returnObj;
419 }
420 catch (com.liferay.portal.kernel.exception.SystemException se) {
421 _log.error(se, se);
422
423 throw se;
424 }
425 }
426
427 public static java.lang.String getGroupMessagesRSS(
428 HttpPrincipal httpPrincipal, long groupId, int status, int max,
429 java.lang.String type, double version, java.lang.String displayStyle,
430 java.lang.String feedURL, java.lang.String entryURL,
431 com.liferay.portal.theme.ThemeDisplay themeDisplay)
432 throws com.liferay.portal.kernel.exception.PortalException,
433 com.liferay.portal.kernel.exception.SystemException {
434 try {
435 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
436 "getGroupMessagesRSS", long.class, int.class, int.class,
437 java.lang.String.class, double.class,
438 java.lang.String.class, java.lang.String.class,
439 java.lang.String.class,
440 com.liferay.portal.theme.ThemeDisplay.class);
441
442 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
443 status, max, type, version, displayStyle, feedURL,
444 entryURL, themeDisplay);
445
446 Object returnObj = null;
447
448 try {
449 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
450 }
451 catch (Exception e) {
452 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
453 throw (com.liferay.portal.kernel.exception.PortalException)e;
454 }
455
456 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
457 throw (com.liferay.portal.kernel.exception.SystemException)e;
458 }
459
460 throw new com.liferay.portal.kernel.exception.SystemException(e);
461 }
462
463 return (java.lang.String)returnObj;
464 }
465 catch (com.liferay.portal.kernel.exception.SystemException se) {
466 _log.error(se, se);
467
468 throw se;
469 }
470 }
471
472 public static java.lang.String getGroupMessagesRSS(
473 HttpPrincipal httpPrincipal, long groupId, long userId, int status,
474 int max, java.lang.String type, double version,
475 java.lang.String displayStyle, java.lang.String feedURL,
476 java.lang.String entryURL,
477 com.liferay.portal.theme.ThemeDisplay themeDisplay)
478 throws com.liferay.portal.kernel.exception.PortalException,
479 com.liferay.portal.kernel.exception.SystemException {
480 try {
481 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
482 "getGroupMessagesRSS", long.class, long.class, int.class,
483 int.class, java.lang.String.class, double.class,
484 java.lang.String.class, java.lang.String.class,
485 java.lang.String.class,
486 com.liferay.portal.theme.ThemeDisplay.class);
487
488 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
489 userId, status, max, type, version, displayStyle, feedURL,
490 entryURL, themeDisplay);
491
492 Object returnObj = null;
493
494 try {
495 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
496 }
497 catch (Exception e) {
498 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
499 throw (com.liferay.portal.kernel.exception.PortalException)e;
500 }
501
502 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
503 throw (com.liferay.portal.kernel.exception.SystemException)e;
504 }
505
506 throw new com.liferay.portal.kernel.exception.SystemException(e);
507 }
508
509 return (java.lang.String)returnObj;
510 }
511 catch (com.liferay.portal.kernel.exception.SystemException se) {
512 _log.error(se, se);
513
514 throw se;
515 }
516 }
517
518 public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
519 HttpPrincipal httpPrincipal, long messageId)
520 throws com.liferay.portal.kernel.exception.PortalException,
521 com.liferay.portal.kernel.exception.SystemException {
522 try {
523 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
524 "getMessage", long.class);
525
526 MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
527
528 Object returnObj = null;
529
530 try {
531 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
532 }
533 catch (Exception e) {
534 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
535 throw (com.liferay.portal.kernel.exception.PortalException)e;
536 }
537
538 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
539 throw (com.liferay.portal.kernel.exception.SystemException)e;
540 }
541
542 throw new com.liferay.portal.kernel.exception.SystemException(e);
543 }
544
545 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
546 }
547 catch (com.liferay.portal.kernel.exception.SystemException se) {
548 _log.error(se, se);
549
550 throw se;
551 }
552 }
553
554 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
555 HttpPrincipal httpPrincipal, long messageId, int status,
556 java.lang.String threadView, boolean includePrevAndNext)
557 throws com.liferay.portal.kernel.exception.PortalException,
558 com.liferay.portal.kernel.exception.SystemException {
559 try {
560 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
561 "getMessageDisplay", long.class, int.class,
562 java.lang.String.class, boolean.class);
563
564 MethodHandler methodHandler = new MethodHandler(methodKey,
565 messageId, status, threadView, includePrevAndNext);
566
567 Object returnObj = null;
568
569 try {
570 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
571 }
572 catch (Exception e) {
573 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
574 throw (com.liferay.portal.kernel.exception.PortalException)e;
575 }
576
577 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
578 throw (com.liferay.portal.kernel.exception.SystemException)e;
579 }
580
581 throw new com.liferay.portal.kernel.exception.SystemException(e);
582 }
583
584 return (com.liferay.portlet.messageboards.model.MBMessageDisplay)returnObj;
585 }
586 catch (com.liferay.portal.kernel.exception.SystemException se) {
587 _log.error(se, se);
588
589 throw se;
590 }
591 }
592
593 public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
594 HttpPrincipal httpPrincipal, long groupId, long categoryId,
595 long threadId, int status, int start, int end)
596 throws com.liferay.portal.kernel.exception.SystemException {
597 try {
598 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
599 "getThreadMessages", long.class, long.class, long.class,
600 int.class, int.class, int.class);
601
602 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
603 categoryId, threadId, status, start, end);
604
605 Object returnObj = null;
606
607 try {
608 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
609 }
610 catch (Exception e) {
611 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
612 throw (com.liferay.portal.kernel.exception.SystemException)e;
613 }
614
615 throw new com.liferay.portal.kernel.exception.SystemException(e);
616 }
617
618 return (java.util.List<com.liferay.portlet.messageboards.model.MBMessage>)returnObj;
619 }
620 catch (com.liferay.portal.kernel.exception.SystemException se) {
621 _log.error(se, se);
622
623 throw se;
624 }
625 }
626
627 public static int getThreadMessagesCount(HttpPrincipal httpPrincipal,
628 long groupId, long categoryId, long threadId, int status)
629 throws com.liferay.portal.kernel.exception.SystemException {
630 try {
631 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
632 "getThreadMessagesCount", long.class, long.class,
633 long.class, int.class);
634
635 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
636 categoryId, threadId, status);
637
638 Object returnObj = null;
639
640 try {
641 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
642 }
643 catch (Exception e) {
644 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
645 throw (com.liferay.portal.kernel.exception.SystemException)e;
646 }
647
648 throw new com.liferay.portal.kernel.exception.SystemException(e);
649 }
650
651 return ((Integer)returnObj).intValue();
652 }
653 catch (com.liferay.portal.kernel.exception.SystemException se) {
654 _log.error(se, se);
655
656 throw se;
657 }
658 }
659
660 public static java.lang.String getThreadMessagesRSS(
661 HttpPrincipal httpPrincipal, long threadId, int status, int max,
662 java.lang.String type, double version, java.lang.String displayStyle,
663 java.lang.String feedURL, java.lang.String entryURL,
664 com.liferay.portal.theme.ThemeDisplay themeDisplay)
665 throws com.liferay.portal.kernel.exception.PortalException,
666 com.liferay.portal.kernel.exception.SystemException {
667 try {
668 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
669 "getThreadMessagesRSS", long.class, int.class, int.class,
670 java.lang.String.class, double.class,
671 java.lang.String.class, java.lang.String.class,
672 java.lang.String.class,
673 com.liferay.portal.theme.ThemeDisplay.class);
674
675 MethodHandler methodHandler = new MethodHandler(methodKey,
676 threadId, status, max, type, version, displayStyle,
677 feedURL, entryURL, themeDisplay);
678
679 Object returnObj = null;
680
681 try {
682 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
683 }
684 catch (Exception e) {
685 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
686 throw (com.liferay.portal.kernel.exception.PortalException)e;
687 }
688
689 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
690 throw (com.liferay.portal.kernel.exception.SystemException)e;
691 }
692
693 throw new com.liferay.portal.kernel.exception.SystemException(e);
694 }
695
696 return (java.lang.String)returnObj;
697 }
698 catch (com.liferay.portal.kernel.exception.SystemException se) {
699 _log.error(se, se);
700
701 throw se;
702 }
703 }
704
705 public static void subscribeMessage(HttpPrincipal httpPrincipal,
706 long messageId)
707 throws com.liferay.portal.kernel.exception.PortalException,
708 com.liferay.portal.kernel.exception.SystemException {
709 try {
710 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
711 "subscribeMessage", long.class);
712
713 MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
714
715 try {
716 TunnelUtil.invoke(httpPrincipal, methodHandler);
717 }
718 catch (Exception e) {
719 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
720 throw (com.liferay.portal.kernel.exception.PortalException)e;
721 }
722
723 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
724 throw (com.liferay.portal.kernel.exception.SystemException)e;
725 }
726
727 throw new com.liferay.portal.kernel.exception.SystemException(e);
728 }
729 }
730 catch (com.liferay.portal.kernel.exception.SystemException se) {
731 _log.error(se, se);
732
733 throw se;
734 }
735 }
736
737 public static void unsubscribeMessage(HttpPrincipal httpPrincipal,
738 long messageId)
739 throws com.liferay.portal.kernel.exception.PortalException,
740 com.liferay.portal.kernel.exception.SystemException {
741 try {
742 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
743 "unsubscribeMessage", long.class);
744
745 MethodHandler methodHandler = new MethodHandler(methodKey, messageId);
746
747 try {
748 TunnelUtil.invoke(httpPrincipal, methodHandler);
749 }
750 catch (Exception e) {
751 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
752 throw (com.liferay.portal.kernel.exception.PortalException)e;
753 }
754
755 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
756 throw (com.liferay.portal.kernel.exception.SystemException)e;
757 }
758
759 throw new com.liferay.portal.kernel.exception.SystemException(e);
760 }
761 }
762 catch (com.liferay.portal.kernel.exception.SystemException se) {
763 _log.error(se, se);
764
765 throw se;
766 }
767 }
768
769 public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
770 HttpPrincipal httpPrincipal, java.lang.String className, long classPK,
771 java.lang.String permissionClassName, long permissionClassPK,
772 long messageId, java.lang.String subject, java.lang.String body,
773 com.liferay.portal.service.ServiceContext serviceContext)
774 throws com.liferay.portal.kernel.exception.PortalException,
775 com.liferay.portal.kernel.exception.SystemException {
776 try {
777 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
778 "updateDiscussionMessage", java.lang.String.class,
779 long.class, java.lang.String.class, long.class, long.class,
780 java.lang.String.class, java.lang.String.class,
781 com.liferay.portal.service.ServiceContext.class);
782
783 MethodHandler methodHandler = new MethodHandler(methodKey,
784 className, classPK, permissionClassName, permissionClassPK,
785 messageId, subject, body, serviceContext);
786
787 Object returnObj = null;
788
789 try {
790 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
791 }
792 catch (Exception e) {
793 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
794 throw (com.liferay.portal.kernel.exception.PortalException)e;
795 }
796
797 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
798 throw (com.liferay.portal.kernel.exception.SystemException)e;
799 }
800
801 throw new com.liferay.portal.kernel.exception.SystemException(e);
802 }
803
804 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
805 }
806 catch (com.liferay.portal.kernel.exception.SystemException se) {
807 _log.error(se, se);
808
809 throw se;
810 }
811 }
812
813 public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
814 HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
815 java.lang.String body,
816 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
817 java.util.List<java.lang.String> existingFiles, double priority,
818 boolean allowPingbacks,
819 com.liferay.portal.service.ServiceContext serviceContext)
820 throws com.liferay.portal.kernel.exception.PortalException,
821 com.liferay.portal.kernel.exception.SystemException {
822 try {
823 MethodKey methodKey = new MethodKey(MBMessageServiceUtil.class.getName(),
824 "updateMessage", long.class, java.lang.String.class,
825 java.lang.String.class, java.util.List.class,
826 java.util.List.class, double.class, boolean.class,
827 com.liferay.portal.service.ServiceContext.class);
828
829 MethodHandler methodHandler = new MethodHandler(methodKey,
830 messageId, subject, body, files, existingFiles, priority,
831 allowPingbacks, serviceContext);
832
833 Object returnObj = null;
834
835 try {
836 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
837 }
838 catch (Exception e) {
839 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
840 throw (com.liferay.portal.kernel.exception.PortalException)e;
841 }
842
843 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
844 throw (com.liferay.portal.kernel.exception.SystemException)e;
845 }
846
847 throw new com.liferay.portal.kernel.exception.SystemException(e);
848 }
849
850 return (com.liferay.portlet.messageboards.model.MBMessage)returnObj;
851 }
852 catch (com.liferay.portal.kernel.exception.SystemException se) {
853 _log.error(se, se);
854
855 throw se;
856 }
857 }
858
859 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceHttp.class);
860 }