1
14
15 package com.liferay.portlet.messageboards.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19
20 import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
21
22 import java.rmi.RemoteException;
23
24
74 public class MBMessageServiceSoap {
75 public static com.liferay.portlet.messageboards.model.MBMessageSoap addDiscussionMessage(
76 long groupId, java.lang.String className, long classPK,
77 java.lang.String permissionClassName, long permissionClassPK,
78 long threadId, long parentMessageId, java.lang.String subject,
79 java.lang.String body,
80 com.liferay.portal.service.ServiceContext serviceContext)
81 throws RemoteException {
82 try {
83 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addDiscussionMessage(groupId,
84 className, classPK, permissionClassName, permissionClassPK,
85 threadId, parentMessageId, subject, body, serviceContext);
86
87 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
88 }
89 catch (Exception e) {
90 _log.error(e, e);
91
92 throw new RemoteException(e.getMessage());
93 }
94 }
95
96 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
97 long groupId, long categoryId, java.lang.String subject,
98 java.lang.String body,
99 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
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, subject, body, files, 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, long threadId, long parentMessageId,
119 java.lang.String subject, java.lang.String body,
120 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
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, threadId, parentMessageId, subject, body,
127 files, 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 void deleteDiscussionMessage(long groupId,
139 java.lang.String className, long classPK,
140 java.lang.String permissionClassName, long permissionClassPK,
141 long messageId) throws RemoteException {
142 try {
143 MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
144 classPK, permissionClassName, permissionClassPK, messageId);
145 }
146 catch (Exception e) {
147 _log.error(e, e);
148
149 throw new RemoteException(e.getMessage());
150 }
151 }
152
153 public static void deleteMessage(long messageId) throws RemoteException {
154 try {
155 MBMessageServiceUtil.deleteMessage(messageId);
156 }
157 catch (Exception e) {
158 _log.error(e, e);
159
160 throw new RemoteException(e.getMessage());
161 }
162 }
163
164 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
165 long groupId, long categoryId, int status, int start, int end)
166 throws RemoteException {
167 try {
168 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
169 MBMessageServiceUtil.getCategoryMessages(groupId, categoryId,
170 status, start, end);
171
172 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
173 }
174 catch (Exception e) {
175 _log.error(e, e);
176
177 throw new RemoteException(e.getMessage());
178 }
179 }
180
181 public static int getCategoryMessagesCount(long groupId, long categoryId,
182 int status) throws RemoteException {
183 try {
184 int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(groupId,
185 categoryId, status);
186
187 return returnValue;
188 }
189 catch (Exception e) {
190 _log.error(e, e);
191
192 throw new RemoteException(e.getMessage());
193 }
194 }
195
196 public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
197 long messageId) throws RemoteException {
198 try {
199 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
200
201 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
202 }
203 catch (Exception e) {
204 _log.error(e, e);
205
206 throw new RemoteException(e.getMessage());
207 }
208 }
209
210 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getThreadMessages(
211 long groupId, long categoryId, long threadId, int status, int start,
212 int end) throws RemoteException {
213 try {
214 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
215 MBMessageServiceUtil.getThreadMessages(groupId, categoryId,
216 threadId, status, start, end);
217
218 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
219 }
220 catch (Exception e) {
221 _log.error(e, e);
222
223 throw new RemoteException(e.getMessage());
224 }
225 }
226
227 public static int getThreadMessagesCount(long groupId, long categoryId,
228 long threadId, int status) throws RemoteException {
229 try {
230 int returnValue = MBMessageServiceUtil.getThreadMessagesCount(groupId,
231 categoryId, threadId, status);
232
233 return returnValue;
234 }
235 catch (Exception e) {
236 _log.error(e, e);
237
238 throw new RemoteException(e.getMessage());
239 }
240 }
241
242 public static void subscribeMessage(long messageId)
243 throws RemoteException {
244 try {
245 MBMessageServiceUtil.subscribeMessage(messageId);
246 }
247 catch (Exception e) {
248 _log.error(e, e);
249
250 throw new RemoteException(e.getMessage());
251 }
252 }
253
254 public static void unsubscribeMessage(long messageId)
255 throws RemoteException {
256 try {
257 MBMessageServiceUtil.unsubscribeMessage(messageId);
258 }
259 catch (Exception e) {
260 _log.error(e, e);
261
262 throw new RemoteException(e.getMessage());
263 }
264 }
265
266 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
267 java.lang.String className, long classPK,
268 java.lang.String permissionClassName, long permissionClassPK,
269 long messageId, java.lang.String subject, java.lang.String body,
270 com.liferay.portal.service.ServiceContext serviceContext)
271 throws RemoteException {
272 try {
273 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(className,
274 classPK, permissionClassName, permissionClassPK, messageId,
275 subject, body, serviceContext);
276
277 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
278 }
279 catch (Exception e) {
280 _log.error(e, e);
281
282 throw new RemoteException(e.getMessage());
283 }
284 }
285
286 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
287 long messageId, java.lang.String subject, java.lang.String body,
288 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
289 java.util.List<java.lang.String> existingFiles, double priority,
290 boolean allowPingbacks,
291 com.liferay.portal.service.ServiceContext serviceContext)
292 throws RemoteException {
293 try {
294 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
295 subject, body, files, existingFiles, priority,
296 allowPingbacks, serviceContext);
297
298 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
299 }
300 catch (Exception e) {
301 _log.error(e, e);
302
303 throw new RemoteException(e.getMessage());
304 }
305 }
306
307 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
308 }