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.MBThreadServiceUtil;
025
026
056 public class MBThreadServiceHttp {
057 public static void deleteThread(HttpPrincipal httpPrincipal, long threadId)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException {
060 try {
061 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
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 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
075 throw (com.liferay.portal.kernel.exception.SystemException)e;
076 }
077
078 throw new com.liferay.portal.kernel.exception.SystemException(e);
079 }
080 }
081 catch (com.liferay.portal.kernel.exception.SystemException se) {
082 _log.error(se, se);
083
084 throw se;
085 }
086 }
087
088 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
089 HttpPrincipal httpPrincipal, long groupId, long userId,
090 java.util.Date modifiedDate, int status, int start, int end)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException {
093 try {
094 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
095 "getGroupThreads", _getGroupThreadsParameterTypes1);
096
097 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
098 userId, modifiedDate, status, start, end);
099
100 Object returnObj = null;
101
102 try {
103 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
104 }
105 catch (Exception e) {
106 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
107 throw (com.liferay.portal.kernel.exception.PortalException)e;
108 }
109
110 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
111 throw (com.liferay.portal.kernel.exception.SystemException)e;
112 }
113
114 throw new com.liferay.portal.kernel.exception.SystemException(e);
115 }
116
117 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
118 }
119 catch (com.liferay.portal.kernel.exception.SystemException se) {
120 _log.error(se, se);
121
122 throw se;
123 }
124 }
125
126 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
127 HttpPrincipal httpPrincipal, long groupId, long userId, int status,
128 boolean subscribed, boolean includeAnonymous, int start, int end)
129 throws com.liferay.portal.kernel.exception.PortalException,
130 com.liferay.portal.kernel.exception.SystemException {
131 try {
132 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
133 "getGroupThreads", _getGroupThreadsParameterTypes2);
134
135 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
136 userId, status, subscribed, includeAnonymous, start, end);
137
138 Object returnObj = null;
139
140 try {
141 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
142 }
143 catch (Exception e) {
144 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
145 throw (com.liferay.portal.kernel.exception.PortalException)e;
146 }
147
148 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
149 throw (com.liferay.portal.kernel.exception.SystemException)e;
150 }
151
152 throw new com.liferay.portal.kernel.exception.SystemException(e);
153 }
154
155 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
156 }
157 catch (com.liferay.portal.kernel.exception.SystemException se) {
158 _log.error(se, se);
159
160 throw se;
161 }
162 }
163
164 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
165 HttpPrincipal httpPrincipal, long groupId, long userId, int status,
166 boolean subscribed, int start, int end)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 try {
170 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
171 "getGroupThreads", _getGroupThreadsParameterTypes3);
172
173 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
174 userId, status, subscribed, start, end);
175
176 Object returnObj = null;
177
178 try {
179 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
180 }
181 catch (Exception e) {
182 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
183 throw (com.liferay.portal.kernel.exception.PortalException)e;
184 }
185
186 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
187 throw (com.liferay.portal.kernel.exception.SystemException)e;
188 }
189
190 throw new com.liferay.portal.kernel.exception.SystemException(e);
191 }
192
193 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
194 }
195 catch (com.liferay.portal.kernel.exception.SystemException se) {
196 _log.error(se, se);
197
198 throw se;
199 }
200 }
201
202 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
203 HttpPrincipal httpPrincipal, long groupId, long userId, int status,
204 int start, int end)
205 throws com.liferay.portal.kernel.exception.PortalException,
206 com.liferay.portal.kernel.exception.SystemException {
207 try {
208 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
209 "getGroupThreads", _getGroupThreadsParameterTypes4);
210
211 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
212 userId, status, start, end);
213
214 Object returnObj = null;
215
216 try {
217 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
218 }
219 catch (Exception e) {
220 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
221 throw (com.liferay.portal.kernel.exception.PortalException)e;
222 }
223
224 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
225 throw (com.liferay.portal.kernel.exception.SystemException)e;
226 }
227
228 throw new com.liferay.portal.kernel.exception.SystemException(e);
229 }
230
231 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
232 }
233 catch (com.liferay.portal.kernel.exception.SystemException se) {
234 _log.error(se, se);
235
236 throw se;
237 }
238 }
239
240 public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
241 long groupId, long userId, java.util.Date modifiedDate, int status)
242 throws com.liferay.portal.kernel.exception.SystemException {
243 try {
244 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
245 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes5);
246
247 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
248 userId, modifiedDate, status);
249
250 Object returnObj = null;
251
252 try {
253 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
254 }
255 catch (Exception e) {
256 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
257 throw (com.liferay.portal.kernel.exception.SystemException)e;
258 }
259
260 throw new com.liferay.portal.kernel.exception.SystemException(e);
261 }
262
263 return ((Integer)returnObj).intValue();
264 }
265 catch (com.liferay.portal.kernel.exception.SystemException se) {
266 _log.error(se, se);
267
268 throw se;
269 }
270 }
271
272 public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
273 long groupId, long userId, int status)
274 throws com.liferay.portal.kernel.exception.SystemException {
275 try {
276 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
277 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes6);
278
279 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
280 userId, status);
281
282 Object returnObj = null;
283
284 try {
285 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
286 }
287 catch (Exception e) {
288 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
289 throw (com.liferay.portal.kernel.exception.SystemException)e;
290 }
291
292 throw new com.liferay.portal.kernel.exception.SystemException(e);
293 }
294
295 return ((Integer)returnObj).intValue();
296 }
297 catch (com.liferay.portal.kernel.exception.SystemException se) {
298 _log.error(se, se);
299
300 throw se;
301 }
302 }
303
304 public static int getGroupThreadsCount(HttpPrincipal httpPrincipal,
305 long groupId, long userId, int status, boolean subscribed)
306 throws com.liferay.portal.kernel.exception.SystemException {
307 try {
308 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
309 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes7);
310
311 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
312 userId, status, subscribed);
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 int getGroupThreadsCount(HttpPrincipal httpPrincipal,
337 long groupId, long userId, int status, boolean subscribed,
338 boolean includeAnonymous)
339 throws com.liferay.portal.kernel.exception.SystemException {
340 try {
341 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
342 "getGroupThreadsCount", _getGroupThreadsCountParameterTypes8);
343
344 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
345 userId, status, subscribed, includeAnonymous);
346
347 Object returnObj = null;
348
349 try {
350 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
351 }
352 catch (Exception e) {
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 return ((Integer)returnObj).intValue();
361 }
362 catch (com.liferay.portal.kernel.exception.SystemException se) {
363 _log.error(se, se);
364
365 throw se;
366 }
367 }
368
369 public static java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
370 HttpPrincipal httpPrincipal, long groupId, long categoryId, int status,
371 int start, int end)
372 throws com.liferay.portal.kernel.exception.SystemException {
373 try {
374 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
375 "getThreads", _getThreadsParameterTypes9);
376
377 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
378 categoryId, status, start, end);
379
380 Object returnObj = null;
381
382 try {
383 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
384 }
385 catch (Exception e) {
386 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
387 throw (com.liferay.portal.kernel.exception.SystemException)e;
388 }
389
390 throw new com.liferay.portal.kernel.exception.SystemException(e);
391 }
392
393 return (java.util.List<com.liferay.portlet.messageboards.model.MBThread>)returnObj;
394 }
395 catch (com.liferay.portal.kernel.exception.SystemException se) {
396 _log.error(se, se);
397
398 throw se;
399 }
400 }
401
402 public static int getThreadsCount(HttpPrincipal httpPrincipal,
403 long groupId, long categoryId, int status)
404 throws com.liferay.portal.kernel.exception.SystemException {
405 try {
406 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
407 "getThreadsCount", _getThreadsCountParameterTypes10);
408
409 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
410 categoryId, status);
411
412 Object returnObj = null;
413
414 try {
415 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
416 }
417 catch (Exception e) {
418 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
419 throw (com.liferay.portal.kernel.exception.SystemException)e;
420 }
421
422 throw new com.liferay.portal.kernel.exception.SystemException(e);
423 }
424
425 return ((Integer)returnObj).intValue();
426 }
427 catch (com.liferay.portal.kernel.exception.SystemException se) {
428 _log.error(se, se);
429
430 throw se;
431 }
432 }
433
434 public static com.liferay.portal.model.Lock lockThread(
435 HttpPrincipal httpPrincipal, long threadId)
436 throws com.liferay.portal.kernel.exception.PortalException,
437 com.liferay.portal.kernel.exception.SystemException {
438 try {
439 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
440 "lockThread", _lockThreadParameterTypes11);
441
442 MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
443
444 Object returnObj = null;
445
446 try {
447 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
448 }
449 catch (Exception e) {
450 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
451 throw (com.liferay.portal.kernel.exception.PortalException)e;
452 }
453
454 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
455 throw (com.liferay.portal.kernel.exception.SystemException)e;
456 }
457
458 throw new com.liferay.portal.kernel.exception.SystemException(e);
459 }
460
461 return (com.liferay.portal.model.Lock)returnObj;
462 }
463 catch (com.liferay.portal.kernel.exception.SystemException se) {
464 _log.error(se, se);
465
466 throw se;
467 }
468 }
469
470 public static com.liferay.portlet.messageboards.model.MBThread moveThread(
471 HttpPrincipal httpPrincipal, long categoryId, long threadId)
472 throws com.liferay.portal.kernel.exception.PortalException,
473 com.liferay.portal.kernel.exception.SystemException {
474 try {
475 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
476 "moveThread", _moveThreadParameterTypes12);
477
478 MethodHandler methodHandler = new MethodHandler(methodKey,
479 categoryId, threadId);
480
481 Object returnObj = null;
482
483 try {
484 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
485 }
486 catch (Exception e) {
487 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
488 throw (com.liferay.portal.kernel.exception.PortalException)e;
489 }
490
491 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
492 throw (com.liferay.portal.kernel.exception.SystemException)e;
493 }
494
495 throw new com.liferay.portal.kernel.exception.SystemException(e);
496 }
497
498 return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
499 }
500 catch (com.liferay.portal.kernel.exception.SystemException se) {
501 _log.error(se, se);
502
503 throw se;
504 }
505 }
506
507 public static com.liferay.portlet.messageboards.model.MBThread splitThread(
508 HttpPrincipal httpPrincipal, long messageId, java.lang.String subject,
509 com.liferay.portal.service.ServiceContext serviceContext)
510 throws com.liferay.portal.kernel.exception.PortalException,
511 com.liferay.portal.kernel.exception.SystemException {
512 try {
513 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
514 "splitThread", _splitThreadParameterTypes13);
515
516 MethodHandler methodHandler = new MethodHandler(methodKey,
517 messageId, subject, serviceContext);
518
519 Object returnObj = null;
520
521 try {
522 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
523 }
524 catch (Exception e) {
525 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
526 throw (com.liferay.portal.kernel.exception.PortalException)e;
527 }
528
529 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
530 throw (com.liferay.portal.kernel.exception.SystemException)e;
531 }
532
533 throw new com.liferay.portal.kernel.exception.SystemException(e);
534 }
535
536 return (com.liferay.portlet.messageboards.model.MBThread)returnObj;
537 }
538 catch (com.liferay.portal.kernel.exception.SystemException se) {
539 _log.error(se, se);
540
541 throw se;
542 }
543 }
544
545 public static void unlockThread(HttpPrincipal httpPrincipal, long threadId)
546 throws com.liferay.portal.kernel.exception.PortalException,
547 com.liferay.portal.kernel.exception.SystemException {
548 try {
549 MethodKey methodKey = new MethodKey(MBThreadServiceUtil.class.getName(),
550 "unlockThread", _unlockThreadParameterTypes14);
551
552 MethodHandler methodHandler = new MethodHandler(methodKey, threadId);
553
554 try {
555 TunnelUtil.invoke(httpPrincipal, methodHandler);
556 }
557 catch (Exception e) {
558 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
559 throw (com.liferay.portal.kernel.exception.PortalException)e;
560 }
561
562 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
563 throw (com.liferay.portal.kernel.exception.SystemException)e;
564 }
565
566 throw new com.liferay.portal.kernel.exception.SystemException(e);
567 }
568 }
569 catch (com.liferay.portal.kernel.exception.SystemException se) {
570 _log.error(se, se);
571
572 throw se;
573 }
574 }
575
576 private static Log _log = LogFactoryUtil.getLog(MBThreadServiceHttp.class);
577 private static final Class<?>[] _deleteThreadParameterTypes0 = new Class[] {
578 long.class
579 };
580 private static final Class<?>[] _getGroupThreadsParameterTypes1 = new Class[] {
581 long.class, long.class, java.util.Date.class, int.class, int.class,
582 int.class
583 };
584 private static final Class<?>[] _getGroupThreadsParameterTypes2 = new Class[] {
585 long.class, long.class, int.class, boolean.class, boolean.class,
586 int.class, int.class
587 };
588 private static final Class<?>[] _getGroupThreadsParameterTypes3 = new Class[] {
589 long.class, long.class, int.class, boolean.class, int.class,
590 int.class
591 };
592 private static final Class<?>[] _getGroupThreadsParameterTypes4 = new Class[] {
593 long.class, long.class, int.class, int.class, int.class
594 };
595 private static final Class<?>[] _getGroupThreadsCountParameterTypes5 = new Class[] {
596 long.class, long.class, java.util.Date.class, int.class
597 };
598 private static final Class<?>[] _getGroupThreadsCountParameterTypes6 = new Class[] {
599 long.class, long.class, int.class
600 };
601 private static final Class<?>[] _getGroupThreadsCountParameterTypes7 = new Class[] {
602 long.class, long.class, int.class, boolean.class
603 };
604 private static final Class<?>[] _getGroupThreadsCountParameterTypes8 = new Class[] {
605 long.class, long.class, int.class, boolean.class, boolean.class
606 };
607 private static final Class<?>[] _getThreadsParameterTypes9 = new Class[] {
608 long.class, long.class, int.class, int.class, int.class
609 };
610 private static final Class<?>[] _getThreadsCountParameterTypes10 = new Class[] {
611 long.class, long.class, int.class
612 };
613 private static final Class<?>[] _lockThreadParameterTypes11 = new Class[] {
614 long.class
615 };
616 private static final Class<?>[] _moveThreadParameterTypes12 = new Class[] {
617 long.class, long.class
618 };
619 private static final Class<?>[] _splitThreadParameterTypes13 = new Class[] {
620 long.class, java.lang.String.class,
621 com.liferay.portal.service.ServiceContext.class
622 };
623 private static final Class<?>[] _unlockThreadParameterTypes14 = new Class[] {
624 long.class
625 };
626 }