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