001
014
015 package com.liferay.portlet.messageboards.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.MethodHandler;
022 import com.liferay.portal.kernel.util.MethodKey;
023 import com.liferay.portal.security.auth.HttpPrincipal;
024 import com.liferay.portal.service.http.TunnelUtil;
025
026 import com.liferay.portlet.messageboards.service.MBThreadServiceUtil;
027
028
056 @ProviderType
057 public class MBThreadServiceHttp {
058 public static void deleteThread(HttpPrincipal httpPrincipal, long threadId)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 try {
061 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
062 "deleteThread", _deleteThreadParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
065
066 try {
067 TunnelUtil.invoke(httpPrincipal, methodHandler);
068 }
069 catch (Exception e) {
070 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
071 throw (com.liferay.portal.kernel.exception.PortalException)e;
072 }
073
074 throw new com.liferay.portal.kernel.exception.SystemException(e);
075 }
076 }
077 catch (com.liferay.portal.kernel.exception.SystemException se) {
078 _log.error(se, se);
079
080 throw se;
081 }
082 }
083
084 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
085 HttpPrincipal httpPrincipal, long groupId, long userId,
086 java.util.Date modifiedDate, int status, int start, int end)
087 throws com.liferay.portal.kernel.exception.PortalException {
088 try {
089 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
090 "getGroupThreads", _getGroupThreadsParameterTypes1);
091
092 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
093 userId, modifiedDate, status, start, end);
094
095 Object returnObj = null;
096
097 try {
098 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
099 }
100 catch (Exception e) {
101 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
102 throw (com.liferay.portal.kernel.exception.PortalException)e;
103 }
104
105 throw new com.liferay.portal.kernel.exception.SystemException(e);
106 }
107
108 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
109 }
110 catch (com.liferay.portal.kernel.exception.SystemException se) {
111 _log.error(se, se);
112
113 throw se;
114 }
115 }
116
117 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
118 HttpPrincipal httpPrincipal, long groupId, long userId, int status,
119 boolean subscribed, boolean includeAnonymous, int start, int end)
120 throws com.liferay.portal.kernel.exception.PortalException {
121 try {
122 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
123 "getGroupThreads", _getGroupThreadsParameterTypes2);
124
125 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
126 userId, status, subscribed, includeAnonymous, start, end);
127
128 Object returnObj = null;
129
130 try {
131 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
132 }
133 catch (Exception e) {
134 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
135 throw (com.liferay.portal.kernel.exception.PortalException)e;
136 }
137
138 throw new com.liferay.portal.kernel.exception.SystemException(e);
139 }
140
141 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
142 }
143 catch (com.liferay.portal.kernel.exception.SystemException se) {
144 _log.error(se, se);
145
146 throw se;
147 }
148 }
149
150 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
151 HttpPrincipal httpPrincipal, long groupId, long userId, int status,
152 boolean subscribed, int start, int end)
153 throws com.liferay.portal.kernel.exception.PortalException {
154 try {
155 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
156 "getGroupThreads", _getGroupThreadsParameterTypes3);
157
158 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
159 userId, status, subscribed, start, end);
160
161 Object returnObj = null;
162
163 try {
164 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
165 }
166 catch (Exception e) {
167 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
168 throw (com.liferay.portal.kernel.exception.PortalException)e;
169 }
170
171 throw new com.liferay.portal.kernel.exception.SystemException(e);
172 }
173
174 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
175 }
176 catch (com.liferay.portal.kernel.exception.SystemException se) {
177 _log.error(se, se);
178
179 throw se;
180 }
181 }
182
183 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
184 HttpPrincipal httpPrincipal, long groupId, long userId, int status,
185 int start, int end)
186 throws com.liferay.portal.kernel.exception.PortalException {
187 try {
188 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
189 "getGroupThreads", _getGroupThreadsParameterTypes4);
190
191 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
192 userId, status, start, end);
193
194 Object returnObj = null;
195
196 try {
197 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
198 }
199 catch (Exception e) {
200 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
201 throw (com.liferay.portal.kernel.exception.PortalException)e;
202 }
203
204 throw new com.liferay.portal.kernel.exception.SystemException(e);
205 }
206
207 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
208 }
209 catch (com.liferay.portal.kernel.exception.SystemException se) {
210 _log.error(se, se);
211
212 throw se;
213 }
214 }
215
216 public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
217 long groupId, long userId, java.util.Date modifiedDate, int status) {
218 try {
219 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
220 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes5);
221
222 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
223 userId, modifiedDate, status);
224
225 Object returnObj = null;
226
227 try {
228 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
229 }
230 catch (Exception e) {
231 throw new com.liferay.portal.kernel.exception.SystemException(e);
232 }
233
234 return ((Integer)returnObj).intValue();
235 }
236 catch (com.liferay.portal.kernel.exception.SystemException se) {
237 _log.error(se, se);
238
239 throw se;
240 }
241 }
242
243 public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
244 long groupId, long userId, int status) {
245 try {
246 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
247 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes6);
248
249 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
250 userId, status);
251
252 Object returnObj = null;
253
254 try {
255 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
256 }
257 catch (Exception e) {
258 throw new com.liferay.portal.kernel.exception.SystemException(e);
259 }
260
261 return ((Integer)returnObj).intValue();
262 }
263 catch (com.liferay.portal.kernel.exception.SystemException se) {
264 _log.error(se, se);
265
266 throw se;
267 }
268 }
269
270 public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
271 long groupId, long userId, int status, boolean subscribed) {
272 try {
273 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
274 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes7);
275
276 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
277 userId, status, subscribed);
278
279 Object returnObj = null;
280
281 try {
282 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
283 }
284 catch (Exception e) {
285 throw new com.liferay.portal.kernel.exception.SystemException(e);
286 }
287
288 return ((Integer)returnObj).intValue();
289 }
290 catch (com.liferay.portal.kernel.exception.SystemException se) {
291 _log.error(se, se);
292
293 throw se;
294 }
295 }
296
297 public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
298 long groupId, long userId, int status, boolean subscribed,
299 boolean includeAnonymous) {
300 try {
301 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
302 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes8);
303
304 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
305 userId, status, subscribed, includeAnonymous);
306
307 Object returnObj = null;
308
309 try {
310 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
311 }
312 catch (Exception e) {
313 throw new com.liferay.portal.kernel.exception.SystemException(e);
314 }
315
316 return ((Integer)returnObj).intValue();
317 }
318 catch (com.liferay.portal.kernel.exception.SystemException se) {
319 _log.error(se, se);
320
321 throw se;
322 }
323 }
324
325 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
326 HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
327 int start, int end) {
328 try {
329 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
330 "getThreads", _getThreadsParameterTypes9);
331
332 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
333 categoryId, status, start, end);
334
335 Object returnObj = null;
336
337 try {
338 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
339 }
340 catch (Exception e) {
341 throw new com.liferay.portal.kernel.exception.SystemException(e);
342 }
343
344 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
345 }
346 catch (com.liferay.portal.kernel.exception.SystemException se) {
347 _log.error(se, se);
348
349 throw se;
350 }
351 }
352
353 public static int getThreadsCount(HttpPrincipal httpPrincipal,
354 long groupId, long categoryId, int status) {
355 try {
356 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
357 "getThreadsCount", _getThreadsCountParameterTypes10);
358
359 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
360 categoryId, status);
361
362 Object returnObj = null;
363
364 try {
365 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
366 }
367 catch (Exception e) {
368 throw new com.liferay.portal.kernel.exception.SystemException(e);
369 }
370
371 return ((Integer)returnObj).intValue();
372 }
373 catch (com.liferay.portal.kernel.exception.SystemException se) {
374 _log.error(se, se);
375
376 throw se;
377 }
378 }
379
380 public static com.liferay.portal.kernel.lock.Lock lockThread(
381 HttpPrincipal httpPrincipal, long threadId)
382 throws com.liferay.portal.kernel.exception.PortalException {
383 try {
384 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
385 "lockThread", _lockThreadParameterTypes11);
386
387 MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
388
389 Object returnObj = null;
390
391 try {
392 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
393 }
394 catch (Exception e) {
395 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
396 throw (com.liferay.portal.kernel.exception.PortalException)e;
397 }
398
399 throw new com.liferay.portal.kernel.exception.SystemException(e);
400 }
401
402 return (com.liferay.portal.kernel.lock.Lock)returnObj;
403 }
404 catch (com.liferay.portal.kernel.exception.SystemException se) {
405 _log.error(se, se);
406
407 throw se;
408 }
409 }
410
411 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
412 HttpPrincipal httpPrincipal, long categoryId, long threadId)
413 throws com.liferay.portal.kernel.exception.PortalException {
414 try {
415 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
416 "moveThread", _moveThreadParameterTypes12);
417
418 MethodHandler methodHandler = new MethodHandler(methodKey,
419 categoryId, threadId);
420
421 Object returnObj = null;
422
423 try {
424 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
425 }
426 catch (Exception e) {
427 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
428 throw (com.liferay.portal.kernel.exception.PortalException)e;
429 }
430
431 throw new com.liferay.portal.kernel.exception.SystemException(e);
432 }
433
434 return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
435 }
436 catch (com.liferay.portal.kernel.exception.SystemException se) {
437 _log.error(se, se);
438
439 throw se;
440 }
441 }
442
443 public static com.liferay.portlet.messageboards.model.MBThread moveThreadFromTrash(
444 HttpPrincipal httpPrincipal, long categoryId, long threadId)
445 throws com.liferay.portal.kernel.exception.PortalException {
446 try {
447 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
448 "moveThreadFromTrash", _moveThreadFromTrashParameterTypes13);
449
450 MethodHandler methodHandler = new MethodHandler(methodKey,
451 categoryId, threadId);
452
453 Object returnObj = null;
454
455 try {
456 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
457 }
458 catch (Exception e) {
459 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
460 throw (com.liferay.portal.kernel.exception.PortalException)e;
461 }
462
463 throw new com.liferay.portal.kernel.exception.SystemException(e);
464 }
465
466 return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
467 }
468 catch (com.liferay.portal.kernel.exception.SystemException se) {
469 _log.error(se, se);
470
471 throw se;
472 }
473 }
474
475 public static com.liferay.portlet.messageboards.model.MBThread moveThreadToTrash(
476 HttpPrincipal httpPrincipal, long threadId)
477 throws com.liferay.portal.kernel.exception.PortalException {
478 try {
479 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
480 "moveThreadToTrash", _moveThreadToTrashParameterTypes14);
481
482 MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
483
484 Object returnObj = null;
485
486 try {
487 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
488 }
489 catch (Exception e) {
490 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
491 throw (com.liferay.portal.kernel.exception.PortalException)e;
492 }
493
494 throw new com.liferay.portal.kernel.exception.SystemException(e);
495 }
496
497 return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
498 }
499 catch (com.liferay.portal.kernel.exception.SystemException se) {
500 _log.error(se, se);
501
502 throw se;
503 }
504 }
505
506 public static void restoreThreadFromTrash(HttpPrincipal httpPrincipal,
507 long threadId)
508 throws com.liferay.portal.kernel.exception.PortalException {
509 try {
510 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
511 "restoreThreadFromTrash",
512 _restoreThreadFromTrashParameterTypes15);
513
514 MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
515
516 try {
517 TunnelUtil.invoke(httpPrincipal, methodHandler);
518 }
519 catch (Exception e) {
520 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
521 throw (com.liferay.portal.kernel.exception.PortalException)e;
522 }
523
524 throw new com.liferay.portal.kernel.exception.SystemException(e);
525 }
526 }
527 catch (com.liferay.portal.kernel.exception.SystemException se) {
528 _log.error(se, se);
529
530 throw se;
531 }
532 }
533
534 public static com.liferay.portal.kernel.search.Hits search(
535 HttpPrincipal httpPrincipal, long groupId, long creatorUserId,
536 int status, int start, int end)
537 throws com.liferay.portal.kernel.exception.PortalException {
538 try {
539 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
540 "search", _searchParameterTypes16);
541
542 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
543 creatorUserId, status, start, end);
544
545 Object returnObj = null;
546
547 try {
548 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
549 }
550 catch (Exception e) {
551 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
552 throw (com.liferay.portal.kernel.exception.PortalException)e;
553 }
554
555 throw new com.liferay.portal.kernel.exception.SystemException(e);
556 }
557
558 return (com.liferay.portal.kernel.search.Hits)returnObj;
559 }
560 catch (com.liferay.portal.kernel.exception.SystemException se) {
561 _log.error(se, se);
562
563 throw se;
564 }
565 }
566
567 public static com.liferay.portal.kernel.search.Hits search(
568 HttpPrincipal httpPrincipal, long groupId, long creatorUserId,
569 long startDate, long endDate, int status, int start, int end)
570 throws com.liferay.portal.kernel.exception.PortalException {
571 try {
572 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
573 "search", _searchParameterTypes17);
574
575 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
576 creatorUserId, startDate, endDate, status, start, end);
577
578 Object returnObj = null;
579
580 try {
581 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
582 }
583 catch (Exception e) {
584 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
585 throw (com.liferay.portal.kernel.exception.PortalException)e;
586 }
587
588 throw new com.liferay.portal.kernel.exception.SystemException(e);
589 }
590
591 return (com.liferay.portal.kernel.search.Hits)returnObj;
592 }
593 catch (com.liferay.portal.kernel.exception.SystemException se) {
594 _log.error(se, se);
595
596 throw se;
597 }
598 }
599
600 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
601 HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
602 com.liferay.portal.service.ServiceContext serviceContext)
603 throws com.liferay.portal.kernel.exception.PortalException {
604 try {
605 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
606 "splitThread", _splitThreadParameterTypes18);
607
608 MethodHandler methodHandler = new MethodHandler(methodKey,
609 messageId, subject, serviceContext);
610
611 Object returnObj = null;
612
613 try {
614 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
615 }
616 catch (Exception e) {
617 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
618 throw (com.liferay.portal.kernel.exception.PortalException)e;
619 }
620
621 throw new com.liferay.portal.kernel.exception.SystemException(e);
622 }
623
624 return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
625 }
626 catch (com.liferay.portal.kernel.exception.SystemException se) {
627 _log.error(se, se);
628
629 throw se;
630 }
631 }
632
633 public static void unlockThread(HttpPrincipal httpPrincipal, long threadId)
634 throws com.liferay.portal.kernel.exception.PortalException {
635 try {
636 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class,
637 "unlockThread", _unlockThreadParameterTypes19);
638
639 MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
640
641 try {
642 TunnelUtil.invoke(httpPrincipal, methodHandler);
643 }
644 catch (Exception e) {
645 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
646 throw (com.liferay.portal.kernel.exception.PortalException)e;
647 }
648
649 throw new com.liferay.portal.kernel.exception.SystemException(e);
650 }
651 }
652 catch (com.liferay.portal.kernel.exception.SystemException se) {
653 _log.error(se, se);
654
655 throw se;
656 }
657 }
658
659 private static Log _log = LogFactoryUtil.getLog(MBThreadServiceHttp.class);
660 private static final Class<?>[] _deleteThreadParameterTypes0 = new Class[] {
661 long.class
662 };
663 private static final Class<?>[] _getGroupThreadsParameterTypes1 = new Class[] {
664 long.class, long.class, java.util.Date.class, int.class, int.class,
665 int.class
666 };
667 private static final Class<?>[] _getGroupThreadsParameterTypes2 = new Class[] {
668 long.class, long.class, int.class, boolean.class, boolean.class,
669 int.class, int.class
670 };
671 private static final Class<?>[] _getGroupThreadsParameterTypes3 = new Class[] {
672 long.class, long.class, int.class, boolean.class, int.class,
673 int.class
674 };
675 private static final Class<?>[] _getGroupThreadsParameterTypes4 = new Class[] {
676 long.class, long.class, int.class, int.class, int.class
677 };
678 private static final Class<?>[] _getGroupThreadsCountParameterTypes5 = new Class[] {
679 long.class, long.class, java.util.Date.class, int.class
680 };
681 private static final Class<?>[] _getGroupThreadsCountParameterTypes6 = new Class[] {
682 long.class, long.class, int.class
683 };
684 private static final Class<?>[] _getGroupThreadsCountParameterTypes7 = new Class[] {
685 long.class, long.class, int.class, boolean.class
686 };
687 private static final Class<?>[] _getGroupThreadsCountParameterTypes8 = new Class[] {
688 long.class, long.class, int.class, boolean.class, boolean.class
689 };
690 private static final Class<?>[] _getThreadsParameterTypes9 = new Class[] {
691 long.class, long.class, int.class, int.class, int.class
692 };
693 private static final Class<?>[] _getThreadsCountParameterTypes10 = new Class[] {
694 long.class, long.class, int.class
695 };
696 private static final Class<?>[] _lockThreadParameterTypes11 = new Class[] {
697 long.class
698 };
699 private static final Class<?>[] _moveThreadParameterTypes12 = new Class[] {
700 long.class, long.class
701 };
702 private static final Class<?>[] _moveThreadFromTrashParameterTypes13 = new Class[] {
703 long.class, long.class
704 };
705 private static final Class<?>[] _moveThreadToTrashParameterTypes14 = new Class[] {
706 long.class
707 };
708 private static final Class<?>[] _restoreThreadFromTrashParameterTypes15 = new Class[] {
709 long.class
710 };
711 private static final Class<?>[] _searchParameterTypes16 = new Class[] {
712 long.class, long.class, int.class, int.class, int.class
713 };
714 private static final Class<?>[] _searchParameterTypes17 = new Class[] {
715 long.class, long.class, long.class, long.class, int.class, int.class,
716 int.class
717 };
718 private static final Class<?>[] _splitThreadParameterTypes18 = new Class[] {
719 long.class, java.lang.String.class,
720 com.liferay.portal.service.ServiceContext.class
721 };
722 private static final Class<?>[] _unlockThreadParameterTypes19 = new Class[] {
723 long.class
724 };
725 }