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.ListUtil;
022
023 import com.liferay.portlet.messageboards.service.MBCategoryServiceUtil;
024
025 import java.rmi.RemoteException;
026
027
067 @ProviderType
068 public class MBCategoryServiceSoap {
069 public static com.liferay.portlet.messageboards.model.MBCategorySoap addCategory(
070 long userId, long parentCategoryId, java.lang.String name,
071 java.lang.String description,
072 com.liferay.portal.service.ServiceContext serviceContext)
073 throws RemoteException {
074 try {
075 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.addCategory(userId,
076 parentCategoryId, name, description, serviceContext);
077
078 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
079 }
080 catch (Exception e) {
081 _log.error(e, e);
082
083 throw new RemoteException(e.getMessage());
084 }
085 }
086
087 public static com.liferay.portlet.messageboards.model.MBCategorySoap addCategory(
088 long parentCategoryId, java.lang.String name,
089 java.lang.String description, java.lang.String displayStyle,
090 java.lang.String emailAddress, java.lang.String inProtocol,
091 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
092 java.lang.String inUserName, java.lang.String inPassword,
093 int inReadInterval, java.lang.String outEmailAddress,
094 boolean outCustom, java.lang.String outServerName, int outServerPort,
095 boolean outUseSSL, java.lang.String outUserName,
096 java.lang.String outPassword, boolean mailingListActive,
097 boolean allowAnonymousEmail,
098 com.liferay.portal.service.ServiceContext serviceContext)
099 throws RemoteException {
100 try {
101 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.addCategory(parentCategoryId,
102 name, description, displayStyle, emailAddress, inProtocol,
103 inServerName, inServerPort, inUseSSL, inUserName,
104 inPassword, inReadInterval, outEmailAddress, outCustom,
105 outServerName, outServerPort, outUseSSL, outUserName,
106 outPassword, mailingListActive, allowAnonymousEmail,
107 serviceContext);
108
109 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
110 }
111 catch (Exception e) {
112 _log.error(e, e);
113
114 throw new RemoteException(e.getMessage());
115 }
116 }
117
118 public static void deleteCategory(long categoryId,
119 boolean includeTrashedEntries) throws RemoteException {
120 try {
121 MBCategoryServiceUtil.deleteCategory(categoryId,
122 includeTrashedEntries);
123 }
124 catch (Exception e) {
125 _log.error(e, e);
126
127 throw new RemoteException(e.getMessage());
128 }
129 }
130
131 public static void deleteCategory(long groupId, long categoryId)
132 throws RemoteException {
133 try {
134 MBCategoryServiceUtil.deleteCategory(groupId, categoryId);
135 }
136 catch (Exception e) {
137 _log.error(e, e);
138
139 throw new RemoteException(e.getMessage());
140 }
141 }
142
143 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
144 long groupId) throws RemoteException {
145 try {
146 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
147 MBCategoryServiceUtil.getCategories(groupId);
148
149 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
150 }
151 catch (Exception e) {
152 _log.error(e, e);
153
154 throw new RemoteException(e.getMessage());
155 }
156 }
157
158 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
159 long groupId, int status) throws RemoteException {
160 try {
161 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
162 MBCategoryServiceUtil.getCategories(groupId, status);
163
164 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
165 }
166 catch (Exception e) {
167 _log.error(e, e);
168
169 throw new RemoteException(e.getMessage());
170 }
171 }
172
173 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
174 long groupId, long parentCategoryId, int start, int end)
175 throws RemoteException {
176 try {
177 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
178 MBCategoryServiceUtil.getCategories(groupId, parentCategoryId,
179 start, end);
180
181 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
182 }
183 catch (Exception e) {
184 _log.error(e, e);
185
186 throw new RemoteException(e.getMessage());
187 }
188 }
189
190 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
191 long groupId, long parentCategoryId, int status, int start, int end)
192 throws RemoteException {
193 try {
194 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
195 MBCategoryServiceUtil.getCategories(groupId, parentCategoryId,
196 status, start, end);
197
198 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
199 }
200 catch (Exception e) {
201 _log.error(e, e);
202
203 throw new RemoteException(e.getMessage());
204 }
205 }
206
207 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
208 long groupId, long excludedCategoryId, long parentCategoryId,
209 int status, int start, int end) throws RemoteException {
210 try {
211 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
212 MBCategoryServiceUtil.getCategories(groupId,
213 excludedCategoryId, parentCategoryId, status, start, end);
214
215 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
216 }
217 catch (Exception e) {
218 _log.error(e, e);
219
220 throw new RemoteException(e.getMessage());
221 }
222 }
223
224 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
225 long groupId, long[] parentCategoryIds, int start, int end)
226 throws RemoteException {
227 try {
228 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
229 MBCategoryServiceUtil.getCategories(groupId, parentCategoryIds,
230 start, end);
231
232 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
233 }
234 catch (Exception e) {
235 _log.error(e, e);
236
237 throw new RemoteException(e.getMessage());
238 }
239 }
240
241 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
242 long groupId, long[] parentCategoryIds, int status, int start, int end)
243 throws RemoteException {
244 try {
245 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
246 MBCategoryServiceUtil.getCategories(groupId, parentCategoryIds,
247 status, start, end);
248
249 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
250 }
251 catch (Exception e) {
252 _log.error(e, e);
253
254 throw new RemoteException(e.getMessage());
255 }
256 }
257
258 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getCategories(
259 long groupId, long[] excludedCategoryIds, long[] parentCategoryIds,
260 int status, int start, int end) throws RemoteException {
261 try {
262 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
263 MBCategoryServiceUtil.getCategories(groupId,
264 excludedCategoryIds, parentCategoryIds, status, start, end);
265
266 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
267 }
268 catch (Exception e) {
269 _log.error(e, e);
270
271 throw new RemoteException(e.getMessage());
272 }
273 }
274
275 public static int getCategoriesAndThreadsCount(long groupId, long categoryId)
276 throws RemoteException {
277 try {
278 int returnValue = MBCategoryServiceUtil.getCategoriesAndThreadsCount(groupId,
279 categoryId);
280
281 return returnValue;
282 }
283 catch (Exception e) {
284 _log.error(e, e);
285
286 throw new RemoteException(e.getMessage());
287 }
288 }
289
290 public static int getCategoriesAndThreadsCount(long groupId,
291 long categoryId, int status) throws RemoteException {
292 try {
293 int returnValue = MBCategoryServiceUtil.getCategoriesAndThreadsCount(groupId,
294 categoryId, status);
295
296 return returnValue;
297 }
298 catch (Exception e) {
299 _log.error(e, e);
300
301 throw new RemoteException(e.getMessage());
302 }
303 }
304
305 public static int getCategoriesCount(long groupId, long parentCategoryId)
306 throws RemoteException {
307 try {
308 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
309 parentCategoryId);
310
311 return returnValue;
312 }
313 catch (Exception e) {
314 _log.error(e, e);
315
316 throw new RemoteException(e.getMessage());
317 }
318 }
319
320 public static int getCategoriesCount(long groupId, long parentCategoryId,
321 int status) throws RemoteException {
322 try {
323 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
324 parentCategoryId, status);
325
326 return returnValue;
327 }
328 catch (Exception e) {
329 _log.error(e, e);
330
331 throw new RemoteException(e.getMessage());
332 }
333 }
334
335 public static int getCategoriesCount(long groupId, long excludedCategoryId,
336 long parentCategoryId, int status) throws RemoteException {
337 try {
338 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
339 excludedCategoryId, parentCategoryId, status);
340
341 return returnValue;
342 }
343 catch (Exception e) {
344 _log.error(e, e);
345
346 throw new RemoteException(e.getMessage());
347 }
348 }
349
350 public static int getCategoriesCount(long groupId, long[] parentCategoryIds)
351 throws RemoteException {
352 try {
353 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
354 parentCategoryIds);
355
356 return returnValue;
357 }
358 catch (Exception e) {
359 _log.error(e, e);
360
361 throw new RemoteException(e.getMessage());
362 }
363 }
364
365 public static int getCategoriesCount(long groupId,
366 long[] parentCategoryIds, int status) throws RemoteException {
367 try {
368 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
369 parentCategoryIds, status);
370
371 return returnValue;
372 }
373 catch (Exception e) {
374 _log.error(e, e);
375
376 throw new RemoteException(e.getMessage());
377 }
378 }
379
380 public static int getCategoriesCount(long groupId,
381 long[] excludedCategoryIds, long[] parentCategoryIds, int status)
382 throws RemoteException {
383 try {
384 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
385 excludedCategoryIds, parentCategoryIds, status);
386
387 return returnValue;
388 }
389 catch (Exception e) {
390 _log.error(e, e);
391
392 throw new RemoteException(e.getMessage());
393 }
394 }
395
396 public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
397 long categoryId) throws RemoteException {
398 try {
399 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
400
401 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
402 }
403 catch (Exception e) {
404 _log.error(e, e);
405
406 throw new RemoteException(e.getMessage());
407 }
408 }
409
410 public static long[] getCategoryIds(long groupId, long categoryId)
411 throws RemoteException {
412 try {
413 long[] returnValue = MBCategoryServiceUtil.getCategoryIds(groupId,
414 categoryId);
415
416 return returnValue;
417 }
418 catch (Exception e) {
419 _log.error(e, e);
420
421 throw new RemoteException(e.getMessage());
422 }
423 }
424
425 public static java.lang.Long[] getSubcategoryIds(Long[] categoryIds,
426 long groupId, long categoryId) throws RemoteException {
427 try {
428 java.util.List<java.lang.Long> returnValue = MBCategoryServiceUtil.getSubcategoryIds(ListUtil.toList(
429 categoryIds), groupId, categoryId);
430
431 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
432 }
433 catch (Exception e) {
434 _log.error(e, e);
435
436 throw new RemoteException(e.getMessage());
437 }
438 }
439
440 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getSubscribedCategories(
441 long groupId, long userId, int start, int end)
442 throws RemoteException {
443 try {
444 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
445 MBCategoryServiceUtil.getSubscribedCategories(groupId, userId,
446 start, end);
447
448 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
449 }
450 catch (Exception e) {
451 _log.error(e, e);
452
453 throw new RemoteException(e.getMessage());
454 }
455 }
456
457 public static int getSubscribedCategoriesCount(long groupId, long userId)
458 throws RemoteException {
459 try {
460 int returnValue = MBCategoryServiceUtil.getSubscribedCategoriesCount(groupId,
461 userId);
462
463 return returnValue;
464 }
465 catch (Exception e) {
466 _log.error(e, e);
467
468 throw new RemoteException(e.getMessage());
469 }
470 }
471
472 public static com.liferay.portlet.messageboards.model.MBCategorySoap moveCategory(
473 long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
474 throws RemoteException {
475 try {
476 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.moveCategory(categoryId,
477 parentCategoryId, mergeWithParentCategory);
478
479 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
480 }
481 catch (Exception e) {
482 _log.error(e, e);
483
484 throw new RemoteException(e.getMessage());
485 }
486 }
487
488 public static com.liferay.portlet.messageboards.model.MBCategorySoap moveCategoryFromTrash(
489 long categoryId, long newCategoryId) throws RemoteException {
490 try {
491 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.moveCategoryFromTrash(categoryId,
492 newCategoryId);
493
494 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
495 }
496 catch (Exception e) {
497 _log.error(e, e);
498
499 throw new RemoteException(e.getMessage());
500 }
501 }
502
503 public static com.liferay.portlet.messageboards.model.MBCategorySoap moveCategoryToTrash(
504 long categoryId) throws RemoteException {
505 try {
506 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.moveCategoryToTrash(categoryId);
507
508 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
509 }
510 catch (Exception e) {
511 _log.error(e, e);
512
513 throw new RemoteException(e.getMessage());
514 }
515 }
516
517 public static void restoreCategoryFromTrash(long categoryId)
518 throws RemoteException {
519 try {
520 MBCategoryServiceUtil.restoreCategoryFromTrash(categoryId);
521 }
522 catch (Exception e) {
523 _log.error(e, e);
524
525 throw new RemoteException(e.getMessage());
526 }
527 }
528
529 public static void subscribeCategory(long groupId, long categoryId)
530 throws RemoteException {
531 try {
532 MBCategoryServiceUtil.subscribeCategory(groupId, categoryId);
533 }
534 catch (Exception e) {
535 _log.error(e, e);
536
537 throw new RemoteException(e.getMessage());
538 }
539 }
540
541 public static void unsubscribeCategory(long groupId, long categoryId)
542 throws RemoteException {
543 try {
544 MBCategoryServiceUtil.unsubscribeCategory(groupId, categoryId);
545 }
546 catch (Exception e) {
547 _log.error(e, e);
548
549 throw new RemoteException(e.getMessage());
550 }
551 }
552
553 public static com.liferay.portlet.messageboards.model.MBCategorySoap updateCategory(
554 long categoryId, long parentCategoryId, java.lang.String name,
555 java.lang.String description, java.lang.String displayStyle,
556 java.lang.String emailAddress, java.lang.String inProtocol,
557 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
558 java.lang.String inUserName, java.lang.String inPassword,
559 int inReadInterval, java.lang.String outEmailAddress,
560 boolean outCustom, java.lang.String outServerName, int outServerPort,
561 boolean outUseSSL, java.lang.String outUserName,
562 java.lang.String outPassword, boolean mailingListActive,
563 boolean allowAnonymousEmail, boolean mergeWithParentCategory,
564 com.liferay.portal.service.ServiceContext serviceContext)
565 throws RemoteException {
566 try {
567 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
568 parentCategoryId, name, description, displayStyle,
569 emailAddress, inProtocol, inServerName, inServerPort,
570 inUseSSL, inUserName, inPassword, inReadInterval,
571 outEmailAddress, outCustom, outServerName, outServerPort,
572 outUseSSL, outUserName, outPassword, mailingListActive,
573 allowAnonymousEmail, mergeWithParentCategory, serviceContext);
574
575 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
576 }
577 catch (Exception e) {
578 _log.error(e, e);
579
580 throw new RemoteException(e.getMessage());
581 }
582 }
583
584 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
585 }