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