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
022 import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
023
024 import java.rmi.RemoteException;
025
026
066 @ProviderType
067 public class MBMessageServiceSoap {
068 public static com.liferay.portlet.messageboards.model.MBMessageSoap addDiscussionMessage(
069 long groupId, java.lang.String className, long classPK, long threadId,
070 long parentMessageId, java.lang.String subject, java.lang.String body,
071 com.liferay.portal.service.ServiceContext serviceContext)
072 throws RemoteException {
073 try {
074 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addDiscussionMessage(groupId,
075 className, classPK, threadId, parentMessageId, subject,
076 body, serviceContext);
077
078 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
079 }
080 catch (Exception e) {
081 _log.error(e, e);
082
083 throw new RemoteException(e.getMessage());
084 }
085 }
086
087
092 @Deprecated
093 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
094 long groupId, long categoryId, long threadId, long parentMessageId,
095 java.lang.String subject, java.lang.String body,
096 java.lang.String format,
097 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
098 boolean anonymous, double priority, boolean allowPingbacks,
099 com.liferay.portal.service.ServiceContext serviceContext)
100 throws RemoteException {
101 try {
102 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(groupId,
103 categoryId, threadId, parentMessageId, subject, body,
104 format, inputStreamOVPs, anonymous, priority,
105 allowPingbacks, serviceContext);
106
107 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
108 }
109 catch (Exception e) {
110 _log.error(e, e);
111
112 throw new RemoteException(e.getMessage());
113 }
114 }
115
116 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
117 long groupId, long categoryId, java.lang.String subject,
118 java.lang.String body, java.lang.String format,
119 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
120 boolean anonymous, double priority, boolean allowPingbacks,
121 com.liferay.portal.service.ServiceContext serviceContext)
122 throws RemoteException {
123 try {
124 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(groupId,
125 categoryId, subject, body, format, inputStreamOVPs,
126 anonymous, priority, allowPingbacks, serviceContext);
127
128 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
129 }
130 catch (Exception e) {
131 _log.error(e, e);
132
133 throw new RemoteException(e.getMessage());
134 }
135 }
136
137 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
138 long categoryId, java.lang.String subject, java.lang.String body,
139 com.liferay.portal.service.ServiceContext serviceContext)
140 throws RemoteException {
141 try {
142 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
143 subject, body, serviceContext);
144
145 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
155 long parentMessageId, java.lang.String subject, java.lang.String body,
156 java.lang.String format,
157 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
158 boolean anonymous, double priority, boolean allowPingbacks,
159 com.liferay.portal.service.ServiceContext serviceContext)
160 throws RemoteException {
161 try {
162 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(parentMessageId,
163 subject, body, format, inputStreamOVPs, anonymous,
164 priority, allowPingbacks, serviceContext);
165
166 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
167 }
168 catch (Exception e) {
169 _log.error(e, e);
170
171 throw new RemoteException(e.getMessage());
172 }
173 }
174
175 public static void deleteDiscussionMessage(long messageId)
176 throws RemoteException {
177 try {
178 MBMessageServiceUtil.deleteDiscussionMessage(messageId);
179 }
180 catch (Exception e) {
181 _log.error(e, e);
182
183 throw new RemoteException(e.getMessage());
184 }
185 }
186
187
191 @Deprecated
192 public static void deleteDiscussionMessage(long groupId,
193 java.lang.String className, long classPK,
194 java.lang.String permissionClassName, long permissionClassPK,
195 long permissionOwnerId, long messageId) throws RemoteException {
196 try {
197 MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
198 classPK, permissionClassName, permissionClassPK,
199 permissionOwnerId, messageId);
200 }
201 catch (Exception e) {
202 _log.error(e, e);
203
204 throw new RemoteException(e.getMessage());
205 }
206 }
207
208 public static void deleteMessage(long messageId) throws RemoteException {
209 try {
210 MBMessageServiceUtil.deleteMessage(messageId);
211 }
212 catch (Exception e) {
213 _log.error(e, e);
214
215 throw new RemoteException(e.getMessage());
216 }
217 }
218
219 public static void deleteMessageAttachment(long messageId,
220 java.lang.String fileName) throws RemoteException {
221 try {
222 MBMessageServiceUtil.deleteMessageAttachment(messageId, fileName);
223 }
224 catch (Exception e) {
225 _log.error(e, e);
226
227 throw new RemoteException(e.getMessage());
228 }
229 }
230
231 public static void deleteMessageAttachments(long messageId)
232 throws RemoteException {
233 try {
234 MBMessageServiceUtil.deleteMessageAttachments(messageId);
235 }
236 catch (Exception e) {
237 _log.error(e, e);
238
239 throw new RemoteException(e.getMessage());
240 }
241 }
242
243 public static void emptyMessageAttachments(long messageId)
244 throws RemoteException {
245 try {
246 MBMessageServiceUtil.emptyMessageAttachments(messageId);
247 }
248 catch (Exception e) {
249 _log.error(e, e);
250
251 throw new RemoteException(e.getMessage());
252 }
253 }
254
255 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
256 long groupId, long categoryId, int status, int start, int end)
257 throws RemoteException {
258 try {
259 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
260 MBMessageServiceUtil.getCategoryMessages(groupId, categoryId,
261 status, start, end);
262
263 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
264 }
265 catch (Exception e) {
266 _log.error(e, e);
267
268 throw new RemoteException(e.getMessage());
269 }
270 }
271
272 public static int getCategoryMessagesCount(long groupId, long categoryId,
273 int status) throws RemoteException {
274 try {
275 int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(groupId,
276 categoryId, status);
277
278 return returnValue;
279 }
280 catch (Exception e) {
281 _log.error(e, e);
282
283 throw new RemoteException(e.getMessage());
284 }
285 }
286
287 public static int getGroupMessagesCount(long groupId, int status)
288 throws RemoteException {
289 try {
290 int returnValue = MBMessageServiceUtil.getGroupMessagesCount(groupId,
291 status);
292
293 return returnValue;
294 }
295 catch (Exception e) {
296 _log.error(e, e);
297
298 throw new RemoteException(e.getMessage());
299 }
300 }
301
302 public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
303 long messageId) throws RemoteException {
304 try {
305 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
306
307 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
308 }
309 catch (Exception e) {
310 _log.error(e, e);
311
312 throw new RemoteException(e.getMessage());
313 }
314 }
315
316 public static int getThreadAnswersCount(long groupId, long categoryId,
317 long threadId) throws RemoteException {
318 try {
319 int returnValue = MBMessageServiceUtil.getThreadAnswersCount(groupId,
320 categoryId, threadId);
321
322 return returnValue;
323 }
324 catch (Exception e) {
325 _log.error(e, e);
326
327 throw new RemoteException(e.getMessage());
328 }
329 }
330
331 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getThreadMessages(
332 long groupId, long categoryId, long threadId, int status, int start,
333 int end) throws RemoteException {
334 try {
335 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
336 MBMessageServiceUtil.getThreadMessages(groupId, categoryId,
337 threadId, status, start, end);
338
339 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
340 }
341 catch (Exception e) {
342 _log.error(e, e);
343
344 throw new RemoteException(e.getMessage());
345 }
346 }
347
348 public static int getThreadMessagesCount(long groupId, long categoryId,
349 long threadId, int status) throws RemoteException {
350 try {
351 int returnValue = MBMessageServiceUtil.getThreadMessagesCount(groupId,
352 categoryId, threadId, status);
353
354 return returnValue;
355 }
356 catch (Exception e) {
357 _log.error(e, e);
358
359 throw new RemoteException(e.getMessage());
360 }
361 }
362
363 public static void restoreMessageAttachmentFromTrash(long messageId,
364 java.lang.String fileName) throws RemoteException {
365 try {
366 MBMessageServiceUtil.restoreMessageAttachmentFromTrash(messageId,
367 fileName);
368 }
369 catch (Exception e) {
370 _log.error(e, e);
371
372 throw new RemoteException(e.getMessage());
373 }
374 }
375
376 public static void subscribeMessage(long messageId)
377 throws RemoteException {
378 try {
379 MBMessageServiceUtil.subscribeMessage(messageId);
380 }
381 catch (Exception e) {
382 _log.error(e, e);
383
384 throw new RemoteException(e.getMessage());
385 }
386 }
387
388 public static void unsubscribeMessage(long messageId)
389 throws RemoteException {
390 try {
391 MBMessageServiceUtil.unsubscribeMessage(messageId);
392 }
393 catch (Exception e) {
394 _log.error(e, e);
395
396 throw new RemoteException(e.getMessage());
397 }
398 }
399
400 public static void updateAnswer(long messageId, boolean answer,
401 boolean cascade) throws RemoteException {
402 try {
403 MBMessageServiceUtil.updateAnswer(messageId, answer, cascade);
404 }
405 catch (Exception e) {
406 _log.error(e, e);
407
408 throw new RemoteException(e.getMessage());
409 }
410 }
411
412 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
413 java.lang.String className, long classPK, long messageId,
414 java.lang.String subject, java.lang.String body,
415 com.liferay.portal.service.ServiceContext serviceContext)
416 throws RemoteException {
417 try {
418 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(className,
419 classPK, messageId, subject, body, serviceContext);
420
421 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
422 }
423 catch (Exception e) {
424 _log.error(e, e);
425
426 throw new RemoteException(e.getMessage());
427 }
428 }
429
430 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
431 long messageId, java.lang.String subject, java.lang.String body,
432 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, java.io.InputStream>> inputStreamOVPs,
433 java.util.List<java.lang.String> existingFiles, double priority,
434 boolean allowPingbacks,
435 com.liferay.portal.service.ServiceContext serviceContext)
436 throws RemoteException {
437 try {
438 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
439 subject, body, inputStreamOVPs, existingFiles, priority,
440 allowPingbacks, serviceContext);
441
442 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
443 }
444 catch (Exception e) {
445 _log.error(e, e);
446
447 throw new RemoteException(e.getMessage());
448 }
449 }
450
451 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
452 }