1
22
23 package com.liferay.portlet.messageboards.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27
28 import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
29
30 import java.rmi.RemoteException;
31
32
83 public class MBMessageServiceSoap {
84 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
85 long categoryId, java.lang.String subject, java.lang.String body,
86 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
87 boolean anonymous, double priority, java.lang.String[] tagsEntries,
88 boolean addCommunityPermissions, boolean addGuestPermissions)
89 throws RemoteException {
90 try {
91 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
92 subject, body, files, anonymous, priority, tagsEntries,
93 addCommunityPermissions, addGuestPermissions);
94
95 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
96 }
97 catch (Exception e) {
98 _log.error(e, e);
99
100 throw new RemoteException(e.getMessage());
101 }
102 }
103
104 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
105 long categoryId, java.lang.String subject, java.lang.String body,
106 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
107 boolean anonymous, double priority, java.lang.String[] tagsEntries,
108 java.lang.String[] communityPermissions,
109 java.lang.String[] guestPermissions) throws RemoteException {
110 try {
111 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
112 subject, body, files, anonymous, priority, tagsEntries,
113 communityPermissions, guestPermissions);
114
115 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
116 }
117 catch (Exception e) {
118 _log.error(e, e);
119
120 throw new RemoteException(e.getMessage());
121 }
122 }
123
124 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
125 long categoryId, long threadId, long parentMessageId,
126 java.lang.String subject, java.lang.String body,
127 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
128 boolean anonymous, double priority, java.lang.String[] tagsEntries,
129 boolean addCommunityPermissions, boolean addGuestPermissions)
130 throws RemoteException {
131 try {
132 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
133 threadId, parentMessageId, subject, body, files, anonymous,
134 priority, tagsEntries, addCommunityPermissions,
135 addGuestPermissions);
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 com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
147 long categoryId, long threadId, long parentMessageId,
148 java.lang.String subject, java.lang.String body,
149 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
150 boolean anonymous, double priority, java.lang.String[] tagsEntries,
151 java.lang.String[] communityPermissions,
152 java.lang.String[] guestPermissions) throws RemoteException {
153 try {
154 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
155 threadId, parentMessageId, subject, body, files, anonymous,
156 priority, tagsEntries, communityPermissions,
157 guestPermissions);
158
159 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
160 }
161 catch (Exception e) {
162 _log.error(e, e);
163
164 throw new RemoteException(e.getMessage());
165 }
166 }
167
168 public static void deleteDiscussionMessage(long groupId,
169 java.lang.String className, long classPK, long messageId)
170 throws RemoteException {
171 try {
172 MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
173 classPK, messageId);
174 }
175 catch (Exception e) {
176 _log.error(e, e);
177
178 throw new RemoteException(e.getMessage());
179 }
180 }
181
182 public static void deleteMessage(long messageId) throws RemoteException {
183 try {
184 MBMessageServiceUtil.deleteMessage(messageId);
185 }
186 catch (Exception e) {
187 _log.error(e, e);
188
189 throw new RemoteException(e.getMessage());
190 }
191 }
192
193 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
194 long categoryId, int begin, int end) throws RemoteException {
195 try {
196 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
197 MBMessageServiceUtil.getCategoryMessages(categoryId, begin, end);
198
199 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
200 }
201 catch (Exception e) {
202 _log.error(e, e);
203
204 throw new RemoteException(e.getMessage());
205 }
206 }
207
208 public static int getCategoryMessagesCount(long categoryId)
209 throws RemoteException {
210 try {
211 int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(categoryId);
212
213 return returnValue;
214 }
215 catch (Exception e) {
216 _log.error(e, e);
217
218 throw new RemoteException(e.getMessage());
219 }
220 }
221
222 public static java.lang.String getCategoryMessagesRSS(long categoryId,
223 int max, java.lang.String type, double version,
224 java.lang.String displayStyle, java.lang.String feedURL,
225 java.lang.String entryURL) throws RemoteException {
226 try {
227 java.lang.String returnValue = MBMessageServiceUtil.getCategoryMessagesRSS(categoryId,
228 max, type, version, displayStyle, feedURL, entryURL);
229
230 return returnValue;
231 }
232 catch (Exception e) {
233 _log.error(e, e);
234
235 throw new RemoteException(e.getMessage());
236 }
237 }
238
239 public static java.lang.String getCompanyMessagesRSS(long companyId,
240 int max, java.lang.String type, double version,
241 java.lang.String displayStyle, java.lang.String feedURL,
242 java.lang.String entryURL) throws RemoteException {
243 try {
244 java.lang.String returnValue = MBMessageServiceUtil.getCompanyMessagesRSS(companyId,
245 max, type, version, displayStyle, feedURL, entryURL);
246
247 return returnValue;
248 }
249 catch (Exception e) {
250 _log.error(e, e);
251
252 throw new RemoteException(e.getMessage());
253 }
254 }
255
256 public static java.lang.String getGroupMessagesRSS(long groupId, int max,
257 java.lang.String type, double version, java.lang.String displayStyle,
258 java.lang.String feedURL, java.lang.String entryURL)
259 throws RemoteException {
260 try {
261 java.lang.String returnValue = MBMessageServiceUtil.getGroupMessagesRSS(groupId,
262 max, type, version, displayStyle, feedURL, entryURL);
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 java.lang.String getGroupMessagesRSS(long groupId,
274 long userId, int max, java.lang.String type, double version,
275 java.lang.String displayStyle, java.lang.String feedURL,
276 java.lang.String entryURL) throws RemoteException {
277 try {
278 java.lang.String returnValue = MBMessageServiceUtil.getGroupMessagesRSS(groupId,
279 userId, max, type, version, displayStyle, feedURL, entryURL);
280
281 return returnValue;
282 }
283 catch (Exception e) {
284 _log.error(e, e);
285
286 throw new RemoteException(e.getMessage());
287 }
288 }
289
290 public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
291 long messageId) throws RemoteException {
292 try {
293 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
294
295 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
296 }
297 catch (Exception e) {
298 _log.error(e, e);
299
300 throw new RemoteException(e.getMessage());
301 }
302 }
303
304 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
305 long messageId) throws RemoteException {
306 try {
307 com.liferay.portlet.messageboards.model.MBMessageDisplay returnValue =
308 MBMessageServiceUtil.getMessageDisplay(messageId);
309
310 return returnValue;
311 }
312 catch (Exception e) {
313 _log.error(e, e);
314
315 throw new RemoteException(e.getMessage());
316 }
317 }
318
319 public static java.lang.String getThreadMessagesRSS(long threadId, int max,
320 java.lang.String type, double version, java.lang.String displayStyle,
321 java.lang.String feedURL, java.lang.String entryURL)
322 throws RemoteException {
323 try {
324 java.lang.String returnValue = MBMessageServiceUtil.getThreadMessagesRSS(threadId,
325 max, type, version, displayStyle, feedURL, entryURL);
326
327 return returnValue;
328 }
329 catch (Exception e) {
330 _log.error(e, e);
331
332 throw new RemoteException(e.getMessage());
333 }
334 }
335
336 public static void subscribeMessage(long messageId)
337 throws RemoteException {
338 try {
339 MBMessageServiceUtil.subscribeMessage(messageId);
340 }
341 catch (Exception e) {
342 _log.error(e, e);
343
344 throw new RemoteException(e.getMessage());
345 }
346 }
347
348 public static void unsubscribeMessage(long messageId)
349 throws RemoteException {
350 try {
351 MBMessageServiceUtil.unsubscribeMessage(messageId);
352 }
353 catch (Exception e) {
354 _log.error(e, e);
355
356 throw new RemoteException(e.getMessage());
357 }
358 }
359
360 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
361 long groupId, java.lang.String className, long classPK, long messageId,
362 java.lang.String subject, java.lang.String body)
363 throws RemoteException {
364 try {
365 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(groupId,
366 className, classPK, messageId, subject, body);
367
368 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
369 }
370 catch (Exception e) {
371 _log.error(e, e);
372
373 throw new RemoteException(e.getMessage());
374 }
375 }
376
377 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
378 long messageId, java.lang.String subject, java.lang.String body,
379 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
380 java.util.List<String> existingFiles, double priority,
381 java.lang.String[] tagsEntries) throws RemoteException {
382 try {
383 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
384 subject, body, files, existingFiles, priority, tagsEntries);
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 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
396 }