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