1
19
20 package com.liferay.portlet.messageboards.service.http;
21
22 import com.liferay.portal.kernel.log.Log;
23 import com.liferay.portal.kernel.log.LogFactoryUtil;
24
25 import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
26
27 import java.rmi.RemoteException;
28
29
80 public class MBMessageServiceSoap {
81 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
82 long categoryId, java.lang.String subject, java.lang.String body,
83 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
84 boolean anonymous, double priority, java.lang.String[] tagsEntries,
85 boolean addCommunityPermissions, boolean addGuestPermissions)
86 throws RemoteException {
87 try {
88 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
89 subject, body, files, anonymous, priority, tagsEntries,
90 addCommunityPermissions, addGuestPermissions);
91
92 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
93 }
94 catch (Exception e) {
95 _log.error(e, e);
96
97 throw new RemoteException(e.getMessage());
98 }
99 }
100
101 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
102 long categoryId, java.lang.String subject, java.lang.String body,
103 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
104 boolean anonymous, double priority, java.lang.String[] tagsEntries,
105 java.lang.String[] communityPermissions,
106 java.lang.String[] guestPermissions) throws RemoteException {
107 try {
108 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
109 subject, body, files, anonymous, priority, tagsEntries,
110 communityPermissions, guestPermissions);
111
112 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
113 }
114 catch (Exception e) {
115 _log.error(e, e);
116
117 throw new RemoteException(e.getMessage());
118 }
119 }
120
121 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
122 long categoryId, long threadId, long parentMessageId,
123 java.lang.String subject, java.lang.String body,
124 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
125 boolean anonymous, double priority, java.lang.String[] tagsEntries,
126 boolean addCommunityPermissions, boolean addGuestPermissions)
127 throws RemoteException {
128 try {
129 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
130 threadId, parentMessageId, subject, body, files, anonymous,
131 priority, tagsEntries, addCommunityPermissions,
132 addGuestPermissions);
133
134 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
135 }
136 catch (Exception e) {
137 _log.error(e, e);
138
139 throw new RemoteException(e.getMessage());
140 }
141 }
142
143 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
144 long categoryId, long threadId, long parentMessageId,
145 java.lang.String subject, java.lang.String body,
146 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
147 boolean anonymous, double priority, java.lang.String[] tagsEntries,
148 java.lang.String[] communityPermissions,
149 java.lang.String[] guestPermissions) throws RemoteException {
150 try {
151 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
152 threadId, parentMessageId, subject, body, files, anonymous,
153 priority, tagsEntries, communityPermissions,
154 guestPermissions);
155
156 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
157 }
158 catch (Exception e) {
159 _log.error(e, e);
160
161 throw new RemoteException(e.getMessage());
162 }
163 }
164
165 public static void deleteDiscussionMessage(long groupId,
166 java.lang.String className, long classPK, long messageId)
167 throws RemoteException {
168 try {
169 MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
170 classPK, messageId);
171 }
172 catch (Exception e) {
173 _log.error(e, e);
174
175 throw new RemoteException(e.getMessage());
176 }
177 }
178
179 public static void deleteMessage(long messageId) throws RemoteException {
180 try {
181 MBMessageServiceUtil.deleteMessage(messageId);
182 }
183 catch (Exception e) {
184 _log.error(e, e);
185
186 throw new RemoteException(e.getMessage());
187 }
188 }
189
190 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
191 long categoryId, int start, int end) throws RemoteException {
192 try {
193 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
194 MBMessageServiceUtil.getCategoryMessages(categoryId, start, end);
195
196 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
197 }
198 catch (Exception e) {
199 _log.error(e, e);
200
201 throw new RemoteException(e.getMessage());
202 }
203 }
204
205 public static int getCategoryMessagesCount(long categoryId)
206 throws RemoteException {
207 try {
208 int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(categoryId);
209
210 return returnValue;
211 }
212 catch (Exception e) {
213 _log.error(e, e);
214
215 throw new RemoteException(e.getMessage());
216 }
217 }
218
219 public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
220 long messageId) throws RemoteException {
221 try {
222 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
223
224 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
225 }
226 catch (Exception e) {
227 _log.error(e, e);
228
229 throw new RemoteException(e.getMessage());
230 }
231 }
232
233 public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
234 long messageId) throws RemoteException {
235 try {
236 com.liferay.portlet.messageboards.model.MBMessageDisplay returnValue =
237 MBMessageServiceUtil.getMessageDisplay(messageId);
238
239 return returnValue;
240 }
241 catch (Exception e) {
242 _log.error(e, e);
243
244 throw new RemoteException(e.getMessage());
245 }
246 }
247
248 public static void subscribeMessage(long messageId)
249 throws RemoteException {
250 try {
251 MBMessageServiceUtil.subscribeMessage(messageId);
252 }
253 catch (Exception e) {
254 _log.error(e, e);
255
256 throw new RemoteException(e.getMessage());
257 }
258 }
259
260 public static void unsubscribeMessage(long messageId)
261 throws RemoteException {
262 try {
263 MBMessageServiceUtil.unsubscribeMessage(messageId);
264 }
265 catch (Exception e) {
266 _log.error(e, e);
267
268 throw new RemoteException(e.getMessage());
269 }
270 }
271
272 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
273 long groupId, java.lang.String className, long classPK, long messageId,
274 java.lang.String subject, java.lang.String body)
275 throws RemoteException {
276 try {
277 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(groupId,
278 className, classPK, messageId, subject, body);
279
280 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
281 }
282 catch (Exception e) {
283 _log.error(e, e);
284
285 throw new RemoteException(e.getMessage());
286 }
287 }
288
289 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
290 long messageId, java.lang.String subject, java.lang.String body,
291 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
292 java.util.List<String> existingFiles, double priority,
293 java.lang.String[] tagsEntries) throws RemoteException {
294 try {
295 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
296 subject, body, files, existingFiles, priority, tagsEntries);
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 }