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