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 getCategoriesCount(long groupId, long parentCategoryId)
276 throws RemoteException {
277 try {
278 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
279 parentCategoryId);
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 getCategoriesCount(long groupId, long parentCategoryId,
291 int status) throws RemoteException {
292 try {
293 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
294 parentCategoryId, 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 excludedCategoryId,
306 long parentCategoryId, int status) throws RemoteException {
307 try {
308 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
309 excludedCategoryId, parentCategoryId, status);
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[] parentCategoryIds)
321 throws RemoteException {
322 try {
323 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
324 parentCategoryIds);
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,
336 long[] parentCategoryIds, int status) throws RemoteException {
337 try {
338 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
339 parentCategoryIds, 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,
351 long[] excludedCategoryIds, long[] parentCategoryIds, int status)
352 throws RemoteException {
353 try {
354 int returnValue = MBCategoryServiceUtil.getCategoriesCount(groupId,
355 excludedCategoryIds, parentCategoryIds, status);
356
357 return returnValue;
358 }
359 catch (Exception e) {
360 _log.error(e, e);
361
362 throw new RemoteException(e.getMessage());
363 }
364 }
365
366 public static com.liferay.portlet.messageboards.model.MBCategorySoap getCategory(
367 long categoryId) throws RemoteException {
368 try {
369 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.getCategory(categoryId);
370
371 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
372 }
373 catch (Exception e) {
374 _log.error(e, e);
375
376 throw new RemoteException(e.getMessage());
377 }
378 }
379
380 public static long[] getCategoryIds(long groupId, long categoryId)
381 throws RemoteException {
382 try {
383 long[] returnValue = MBCategoryServiceUtil.getCategoryIds(groupId,
384 categoryId);
385
386 return returnValue;
387 }
388 catch (Exception e) {
389 _log.error(e, e);
390
391 throw new RemoteException(e.getMessage());
392 }
393 }
394
395 public static java.lang.Long[] getSubcategoryIds(Long[] categoryIds,
396 long groupId, long categoryId) throws RemoteException {
397 try {
398 java.util.List<java.lang.Long> returnValue = MBCategoryServiceUtil.getSubcategoryIds(ListUtil.toList(
399 categoryIds), groupId, categoryId);
400
401 return returnValue.toArray(new java.lang.Long[returnValue.size()]);
402 }
403 catch (Exception e) {
404 _log.error(e, e);
405
406 throw new RemoteException(e.getMessage());
407 }
408 }
409
410 public static com.liferay.portlet.messageboards.model.MBCategorySoap[] getSubscribedCategories(
411 long groupId, long userId, int start, int end)
412 throws RemoteException {
413 try {
414 java.util.List<com.liferay.portlet.messageboards.model.MBCategory> returnValue =
415 MBCategoryServiceUtil.getSubscribedCategories(groupId, userId,
416 start, end);
417
418 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModels(returnValue);
419 }
420 catch (Exception e) {
421 _log.error(e, e);
422
423 throw new RemoteException(e.getMessage());
424 }
425 }
426
427 public static int getSubscribedCategoriesCount(long groupId, long userId)
428 throws RemoteException {
429 try {
430 int returnValue = MBCategoryServiceUtil.getSubscribedCategoriesCount(groupId,
431 userId);
432
433 return returnValue;
434 }
435 catch (Exception e) {
436 _log.error(e, e);
437
438 throw new RemoteException(e.getMessage());
439 }
440 }
441
442 public static com.liferay.portlet.messageboards.model.MBCategorySoap moveCategory(
443 long categoryId, long parentCategoryId, boolean mergeWithParentCategory)
444 throws RemoteException {
445 try {
446 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.moveCategory(categoryId,
447 parentCategoryId, mergeWithParentCategory);
448
449 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
450 }
451 catch (Exception e) {
452 _log.error(e, e);
453
454 throw new RemoteException(e.getMessage());
455 }
456 }
457
458 public static com.liferay.portlet.messageboards.model.MBCategorySoap moveCategoryFromTrash(
459 long categoryId, long newCategoryId) throws RemoteException {
460 try {
461 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.moveCategoryFromTrash(categoryId,
462 newCategoryId);
463
464 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
465 }
466 catch (Exception e) {
467 _log.error(e, e);
468
469 throw new RemoteException(e.getMessage());
470 }
471 }
472
473 public static com.liferay.portlet.messageboards.model.MBCategorySoap moveCategoryToTrash(
474 long categoryId) throws RemoteException {
475 try {
476 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.moveCategoryToTrash(categoryId);
477
478 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
479 }
480 catch (Exception e) {
481 _log.error(e, e);
482
483 throw new RemoteException(e.getMessage());
484 }
485 }
486
487 public static void restoreCategoryFromTrash(long categoryId)
488 throws RemoteException {
489 try {
490 MBCategoryServiceUtil.restoreCategoryFromTrash(categoryId);
491 }
492 catch (Exception e) {
493 _log.error(e, e);
494
495 throw new RemoteException(e.getMessage());
496 }
497 }
498
499 public static void subscribeCategory(long groupId, long categoryId)
500 throws RemoteException {
501 try {
502 MBCategoryServiceUtil.subscribeCategory(groupId, categoryId);
503 }
504 catch (Exception e) {
505 _log.error(e, e);
506
507 throw new RemoteException(e.getMessage());
508 }
509 }
510
511 public static void unsubscribeCategory(long groupId, long categoryId)
512 throws RemoteException {
513 try {
514 MBCategoryServiceUtil.unsubscribeCategory(groupId, categoryId);
515 }
516 catch (Exception e) {
517 _log.error(e, e);
518
519 throw new RemoteException(e.getMessage());
520 }
521 }
522
523 public static com.liferay.portlet.messageboards.model.MBCategorySoap updateCategory(
524 long categoryId, long parentCategoryId, java.lang.String name,
525 java.lang.String description, java.lang.String displayStyle,
526 java.lang.String emailAddress, java.lang.String inProtocol,
527 java.lang.String inServerName, int inServerPort, boolean inUseSSL,
528 java.lang.String inUserName, java.lang.String inPassword,
529 int inReadInterval, java.lang.String outEmailAddress,
530 boolean outCustom, java.lang.String outServerName, int outServerPort,
531 boolean outUseSSL, java.lang.String outUserName,
532 java.lang.String outPassword, boolean mailingListActive,
533 boolean allowAnonymousEmail, boolean mergeWithParentCategory,
534 com.liferay.portal.service.ServiceContext serviceContext)
535 throws RemoteException {
536 try {
537 com.liferay.portlet.messageboards.model.MBCategory returnValue = MBCategoryServiceUtil.updateCategory(categoryId,
538 parentCategoryId, name, description, displayStyle,
539 emailAddress, inProtocol, inServerName, inServerPort,
540 inUseSSL, inUserName, inPassword, inReadInterval,
541 outEmailAddress, outCustom, outServerName, outServerPort,
542 outUseSSL, outUserName, outPassword, mailingListActive,
543 allowAnonymousEmail, mergeWithParentCategory, serviceContext);
544
545 return com.liferay.portlet.messageboards.model.MBCategorySoap.toSoapModel(returnValue);
546 }
547 catch (Exception e) {
548 _log.error(e, e);
549
550 throw new RemoteException(e.getMessage());
551 }
552 }
553
554 private static Log _log = LogFactoryUtil.getLog(MBCategoryServiceSoap.class);
555 }