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