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