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