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.MBCategoryServiceUtil;
025
026
056 public class MBCategoryServiceHttp {
057 public static com.liferay.portlet.messageboards.model.MBCategory addCategory(
058 HttpPrincipal httpPrincipal, long parentCategoryId,
059 java.lang.String name, java.lang.String description,
060 java.lang.String displayStyle, java.lang.String emailAddress,
061 java.lang.String inProtocol, java.lang.String inServerName,
062 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
063 java.lang.String inPassword, int inReadInterval,
064 java.lang.String outEmailAddress, boolean outCustom,
065 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
066 java.lang.String outUserName, java.lang.String outPassword,
067 boolean mailingListActive, boolean allowAnonymousEmail,
068 com.liferay.portal.service.ServiceContext serviceContext)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 try {
072 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
073 "addCategory", _addCategoryParameterTypes0);
074
075 MethodHandler methodHandler = new MethodHandler(methodKey,
076 parentCategoryId, name, description, displayStyle,
077 emailAddress, inProtocol, inServerName, inServerPort,
078 inUseSSL, inUserName, inPassword, inReadInterval,
079 outEmailAddress, outCustom, outServerName, outServerPort,
080 outUseSSL, outUserName, outPassword, mailingListActive,
081 allowAnonymousEmail, serviceContext);
082
083 Object returnObj = null;
084
085 try {
086 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
087 }
088 catch (Exception e) {
089 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
090 throw (com.liferay.portal.kernel.exception.PortalException)e;
091 }
092
093 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
094 throw (com.liferay.portal.kernel.exception.SystemException)e;
095 }
096
097 throw new com.liferay.portal.kernel.exception.SystemException(e);
098 }
099
100 return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
101 }
102 catch (com.liferay.portal.kernel.exception.SystemException se) {
103 _log.error(se, se);
104
105 throw se;
106 }
107 }
108
109 public static void deleteCategory(HttpPrincipal httpPrincipal,
110 long groupId, long categoryId)
111 throws com.liferay.portal.kernel.exception.PortalException,
112 com.liferay.portal.kernel.exception.SystemException {
113 try {
114 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
115 "deleteCategory", _deleteCategoryParameterTypes1);
116
117 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
118 categoryId);
119
120 try {
121 TunnelUtil.invoke(httpPrincipal, methodHandler);
122 }
123 catch (Exception e) {
124 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
125 throw (com.liferay.portal.kernel.exception.PortalException)e;
126 }
127
128 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
129 throw (com.liferay.portal.kernel.exception.SystemException)e;
130 }
131
132 throw new com.liferay.portal.kernel.exception.SystemException(e);
133 }
134 }
135 catch (com.liferay.portal.kernel.exception.SystemException se) {
136 _log.error(se, se);
137
138 throw se;
139 }
140 }
141
142 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
143 HttpPrincipal httpPrincipal, long groupId)
144 throws com.liferay.portal.kernel.exception.SystemException {
145 try {
146 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
147 "getCategories", _getCategoriesParameterTypes2);
148
149 MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
150
151 Object returnObj = null;
152
153 try {
154 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
155 }
156 catch (Exception e) {
157 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
158 throw (com.liferay.portal.kernel.exception.SystemException)e;
159 }
160
161 throw new com.liferay.portal.kernel.exception.SystemException(e);
162 }
163
164 return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
165 }
166 catch (com.liferay.portal.kernel.exception.SystemException se) {
167 _log.error(se, se);
168
169 throw se;
170 }
171 }
172
173 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
174 HttpPrincipal httpPrincipal, long groupId, long parentCategoryId,
175 int start, int end)
176 throws com.liferay.portal.kernel.exception.SystemException {
177 try {
178 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
179 "getCategories", _getCategoriesParameterTypes3);
180
181 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
182 parentCategoryId, start, end);
183
184 Object returnObj = null;
185
186 try {
187 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
188 }
189 catch (Exception e) {
190 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
191 throw (com.liferay.portal.kernel.exception.SystemException)e;
192 }
193
194 throw new com.liferay.portal.kernel.exception.SystemException(e);
195 }
196
197 return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
198 }
199 catch (com.liferay.portal.kernel.exception.SystemException se) {
200 _log.error(se, se);
201
202 throw se;
203 }
204 }
205
206 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getCategories(
207 HttpPrincipal httpPrincipal, long groupId, long[] parentCategoryIds,
208 int start, int end)
209 throws com.liferay.portal.kernel.exception.SystemException {
210 try {
211 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
212 "getCategories", _getCategoriesParameterTypes4);
213
214 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
215 parentCategoryIds, start, end);
216
217 Object returnObj = null;
218
219 try {
220 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
221 }
222 catch (Exception e) {
223 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
224 throw (com.liferay.portal.kernel.exception.SystemException)e;
225 }
226
227 throw new com.liferay.portal.kernel.exception.SystemException(e);
228 }
229
230 return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
231 }
232 catch (com.liferay.portal.kernel.exception.SystemException se) {
233 _log.error(se, se);
234
235 throw se;
236 }
237 }
238
239 public static int getCategoriesCount(HttpPrincipal httpPrincipal,
240 long groupId, long parentCategoryId)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 try {
243 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
244 "getCategoriesCount", _getCategoriesCountParameterTypes5);
245
246 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
247 parentCategoryId);
248
249 Object returnObj = null;
250
251 try {
252 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
253 }
254 catch (Exception e) {
255 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
256 throw (com.liferay.portal.kernel.exception.SystemException)e;
257 }
258
259 throw new com.liferay.portal.kernel.exception.SystemException(e);
260 }
261
262 return ((Integer)returnObj).intValue();
263 }
264 catch (com.liferay.portal.kernel.exception.SystemException se) {
265 _log.error(se, se);
266
267 throw se;
268 }
269 }
270
271 public static int getCategoriesCount(HttpPrincipal httpPrincipal,
272 long groupId, long[] parentCategoryIds)
273 throws com.liferay.portal.kernel.exception.SystemException {
274 try {
275 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
276 "getCategoriesCount", _getCategoriesCountParameterTypes6);
277
278 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
279 parentCategoryIds);
280
281 Object returnObj = null;
282
283 try {
284 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
285 }
286 catch (Exception e) {
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 ((Integer)returnObj).intValue();
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 com.liferay.portlet.messageboards.model.MBCategory getCategory(
304 HttpPrincipal httpPrincipal, long categoryId)
305 throws com.liferay.portal.kernel.exception.PortalException,
306 com.liferay.portal.kernel.exception.SystemException {
307 try {
308 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
309 "getCategory", _getCategoryParameterTypes7);
310
311 MethodHandler methodHandler = new MethodHandler(methodKey,
312 categoryId);
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.PortalException) {
321 throw (com.liferay.portal.kernel.exception.PortalException)e;
322 }
323
324 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
325 throw (com.liferay.portal.kernel.exception.SystemException)e;
326 }
327
328 throw new com.liferay.portal.kernel.exception.SystemException(e);
329 }
330
331 return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
332 }
333 catch (com.liferay.portal.kernel.exception.SystemException se) {
334 _log.error(se, se);
335
336 throw se;
337 }
338 }
339
340 public static long[] getCategoryIds(HttpPrincipal httpPrincipal,
341 long groupId, long categoryId)
342 throws com.liferay.portal.kernel.exception.SystemException {
343 try {
344 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
345 "getCategoryIds", _getCategoryIdsParameterTypes8);
346
347 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
348 categoryId);
349
350 Object returnObj = null;
351
352 try {
353 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
354 }
355 catch (Exception e) {
356 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
357 throw (com.liferay.portal.kernel.exception.SystemException)e;
358 }
359
360 throw new com.liferay.portal.kernel.exception.SystemException(e);
361 }
362
363 return (long[])returnObj;
364 }
365 catch (com.liferay.portal.kernel.exception.SystemException se) {
366 _log.error(se, se);
367
368 throw se;
369 }
370 }
371
372 public static java.util.List<java.lang.Long> getSubcategoryIds(
373 HttpPrincipal httpPrincipal,
374 java.util.List<java.lang.Long> categoryIds, long groupId,
375 long categoryId)
376 throws com.liferay.portal.kernel.exception.SystemException {
377 try {
378 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
379 "getSubcategoryIds", _getSubcategoryIdsParameterTypes9);
380
381 MethodHandler methodHandler = new MethodHandler(methodKey,
382 categoryIds, groupId, categoryId);
383
384 Object returnObj = null;
385
386 try {
387 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
388 }
389 catch (Exception e) {
390 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
391 throw (com.liferay.portal.kernel.exception.SystemException)e;
392 }
393
394 throw new com.liferay.portal.kernel.exception.SystemException(e);
395 }
396
397 return (java.util.List<java.lang.Long>)returnObj;
398 }
399 catch (com.liferay.portal.kernel.exception.SystemException se) {
400 _log.error(se, se);
401
402 throw se;
403 }
404 }
405
406 public static java.util.List<com.liferay.portlet.messageboards.model.MBCategory> getSubscribedCategories(
407 HttpPrincipal httpPrincipal, long groupId, long userId, int start,
408 int end) throws com.liferay.portal.kernel.exception.SystemException {
409 try {
410 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
411 "getSubscribedCategories",
412 _getSubscribedCategoriesParameterTypes10);
413
414 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
415 userId, start, end);
416
417 Object returnObj = null;
418
419 try {
420 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
421 }
422 catch (Exception e) {
423 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
424 throw (com.liferay.portal.kernel.exception.SystemException)e;
425 }
426
427 throw new com.liferay.portal.kernel.exception.SystemException(e);
428 }
429
430 return (java.util.List<com.liferay.portlet.messageboards.model.MBCategory>)returnObj;
431 }
432 catch (com.liferay.portal.kernel.exception.SystemException se) {
433 _log.error(se, se);
434
435 throw se;
436 }
437 }
438
439 public static int getSubscribedCategoriesCount(
440 HttpPrincipal httpPrincipal, long groupId, long userId)
441 throws com.liferay.portal.kernel.exception.SystemException {
442 try {
443 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
444 "getSubscribedCategoriesCount",
445 _getSubscribedCategoriesCountParameterTypes11);
446
447 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
448 userId);
449
450 Object returnObj = null;
451
452 try {
453 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
454 }
455 catch (Exception e) {
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 ((Integer)returnObj).intValue();
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 void subscribeCategory(HttpPrincipal httpPrincipal,
473 long groupId, long categoryId)
474 throws com.liferay.portal.kernel.exception.PortalException,
475 com.liferay.portal.kernel.exception.SystemException {
476 try {
477 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
478 "subscribeCategory", _subscribeCategoryParameterTypes12);
479
480 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
481 categoryId);
482
483 try {
484 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 catch (com.liferay.portal.kernel.exception.SystemException se) {
499 _log.error(se, se);
500
501 throw se;
502 }
503 }
504
505 public static void unsubscribeCategory(HttpPrincipal httpPrincipal,
506 long groupId, long categoryId)
507 throws com.liferay.portal.kernel.exception.PortalException,
508 com.liferay.portal.kernel.exception.SystemException {
509 try {
510 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
511 "unsubscribeCategory", _unsubscribeCategoryParameterTypes13);
512
513 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
514 categoryId);
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 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
525 throw (com.liferay.portal.kernel.exception.SystemException)e;
526 }
527
528 throw new com.liferay.portal.kernel.exception.SystemException(e);
529 }
530 }
531 catch (com.liferay.portal.kernel.exception.SystemException se) {
532 _log.error(se, se);
533
534 throw se;
535 }
536 }
537
538 public static com.liferay.portlet.messageboards.model.MBCategory updateCategory(
539 HttpPrincipal httpPrincipal, long categoryId, long parentCategoryId,
540 java.lang.String name, java.lang.String description,
541 java.lang.String displayStyle, java.lang.String emailAddress,
542 java.lang.String inProtocol, java.lang.String inServerName,
543 int inServerPort, boolean inUseSSL, java.lang.String inUserName,
544 java.lang.String inPassword, int inReadInterval,
545 java.lang.String outEmailAddress, boolean outCustom,
546 java.lang.String outServerName, int outServerPort, boolean outUseSSL,
547 java.lang.String outUserName, java.lang.String outPassword,
548 boolean mailingListActive, boolean allowAnonymousEmail,
549 boolean mergeWithParentCategory,
550 com.liferay.portal.service.ServiceContext serviceContext)
551 throws com.liferay.portal.kernel.exception.PortalException,
552 com.liferay.portal.kernel.exception.SystemException {
553 try {
554 MethodKey methodKey = new MethodKey(MBCategoryServiceUtil.class.getName(),
555 "updateCategory", _updateCategoryParameterTypes14);
556
557 MethodHandler methodHandler = new MethodHandler(methodKey,
558 categoryId, parentCategoryId, name, description,
559 displayStyle, emailAddress, inProtocol, inServerName,
560 inServerPort, inUseSSL, inUserName, inPassword,
561 inReadInterval, outEmailAddress, outCustom, outServerName,
562 outServerPort, outUseSSL, outUserName, outPassword,
563 mailingListActive, allowAnonymousEmail,
564 mergeWithParentCategory, serviceContext);
565
566 Object returnObj = null;
567
568 try {
569 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
570 }
571 catch (Exception e) {
572 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
573 throw (com.liferay.portal.kernel.exception.PortalException)e;
574 }
575
576 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
577 throw (com.liferay.portal.kernel.exception.SystemException)e;
578 }
579
580 throw new com.liferay.portal.kernel.exception.SystemException(e);
581 }
582
583 return (com.liferay.portlet.messageboards.model.MBCategory)returnObj;
584 }
585 catch (com.liferay.portal.kernel.exception.SystemException se) {
586 _log.error(se, se);
587
588 throw se;
589 }
590 }
591
592 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceHttp.class);
593 private static final Class<?>[] _addCategoryParameterTypes0 = new Class[] {
594 long.class, java.lang.String.class, java.lang.String.class,
595 java.lang.String.class, java.lang.String.class,
596 java.lang.String.class, java.lang.String.class, int.class,
597 boolean.class, java.lang.String.class, java.lang.String.class,
598 int.class, java.lang.String.class, boolean.class,
599 java.lang.String.class, int.class, boolean.class,
600 java.lang.String.class, java.lang.String.class, boolean.class,
601 boolean.class, com.liferay.portal.service.ServiceContext.class
602 };
603 private static final Class<?>[] _deleteCategoryParameterTypes1 = new Class[] {
604 long.class, long.class
605 };
606 private static final Class<?>[] _getCategoriesParameterTypes2 = new Class[] {
607 long.class
608 };
609 private static final Class<?>[] _getCategoriesParameterTypes3 = new Class[] {
610 long.class, long.class, int.class, int.class
611 };
612 private static final Class<?>[] _getCategoriesParameterTypes4 = new Class[] {
613 long.class, long[].class, int.class, int.class
614 };
615 private static final Class<?>[] _getCategoriesCountParameterTypes5 = new Class[] {
616 long.class, long.class
617 };
618 private static final Class<?>[] _getCategoriesCountParameterTypes6 = new Class[] {
619 long.class, long[].class
620 };
621 private static final Class<?>[] _getCategoryParameterTypes7 = new Class[] {
622 long.class
623 };
624 private static final Class<?>[] _getCategoryIdsParameterTypes8 = new Class[] {
625 long.class, long.class
626 };
627 private static final Class<?>[] _getSubcategoryIdsParameterTypes9 = new Class[] {
628 java.util.List.class, long.class, long.class
629 };
630 private static final Class<?>[] _getSubscribedCategoriesParameterTypes10 = new Class[] {
631 long.class, long.class, int.class, int.class
632 };
633 private static final Class<?>[] _getSubscribedCategoriesCountParameterTypes11 =
634 new Class[] { long.class, long.class };
635 private static final Class<?>[] _subscribeCategoryParameterTypes12 = new Class[] {
636 long.class, long.class
637 };
638 private static final Class<?>[] _unsubscribeCategoryParameterTypes13 = new Class[] {
639 long.class, long.class
640 };
641 private static final Class<?>[] _updateCategoryParameterTypes14 = new Class[] {
642 long.class, long.class, java.lang.String.class,
643 java.lang.String.class, java.lang.String.class,
644 java.lang.String.class, java.lang.String.class,
645 java.lang.String.class, int.class, boolean.class,
646 java.lang.String.class, java.lang.String.class, int.class,
647 java.lang.String.class, boolean.class, java.lang.String.class,
648 int.class, boolean.class, java.lang.String.class,
649 java.lang.String.class, boolean.class, boolean.class, boolean.class,
650 com.liferay.portal.service.ServiceContext.class
651 };
652 }