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 start, int end) throws RemoteException {
195 try {
196 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
197 MBMessageServiceUtil.getCategoryMessages(categoryId, start, 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 com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
223 long messageId) throws RemoteException {
224 try {
225 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
226
227 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
228 }
229 catch (Exception e) {
230 _log.error(e, e);
231
232 throw new RemoteException(e.getMessage());
233 }
234 }
235
236 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
237 long messageId) throws RemoteException {
238 try {
239 com.liferay.portlet.messageboards.model.MBMessageDisplay returnValue =
240 MBMessageServiceUtil.getMessageDisplay(messageId);
241
242 return returnValue;
243 }
244 catch (Exception e) {
245 _log.error(e, e);
246
247 throw new RemoteException(e.getMessage());
248 }
249 }
250
251 public static void subscribeMessage(long messageId)
252 throws RemoteException {
253 try {
254 MBMessageServiceUtil.subscribeMessage(messageId);
255 }
256 catch (Exception e) {
257 _log.error(e, e);
258
259 throw new RemoteException(e.getMessage());
260 }
261 }
262
263 public static void unsubscribeMessage(long messageId)
264 throws RemoteException {
265 try {
266 MBMessageServiceUtil.unsubscribeMessage(messageId);
267 }
268 catch (Exception e) {
269 _log.error(e, e);
270
271 throw new RemoteException(e.getMessage());
272 }
273 }
274
275 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
276 long groupId, java.lang.String className, long classPK, long messageId,
277 java.lang.String subject, java.lang.String body)
278 throws RemoteException {
279 try {
280 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(groupId,
281 className, classPK, messageId, subject, body);
282
283 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(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 updateMessage(
293 long messageId, java.lang.String subject, java.lang.String body,
294 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
295 java.util.List<String> existingFiles, double priority,
296 java.lang.String[] tagsEntries) throws RemoteException {
297 try {
298 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
299 subject, body, files, existingFiles, priority, tagsEntries);
300
301 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
302 }
303 catch (Exception e) {
304 _log.error(e, e);
305
306 throw new RemoteException(e.getMessage());
307 }
308 }
309
310 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
311 }