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 void subscribeMessage(long messageId)
237 throws RemoteException {
238 try {
239 MBMessageServiceUtil.subscribeMessage(messageId);
240 }
241 catch (Exception e) {
242 _log.error(e, e);
243
244 throw new RemoteException(e.getMessage());
245 }
246 }
247
248 public static void unsubscribeMessage(long messageId)
249 throws RemoteException {
250 try {
251 MBMessageServiceUtil.unsubscribeMessage(messageId);
252 }
253 catch (Exception e) {
254 _log.error(e, e);
255
256 throw new RemoteException(e.getMessage());
257 }
258 }
259
260 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
261 long groupId, java.lang.String className, long classPK, long messageId,
262 java.lang.String subject, java.lang.String body)
263 throws RemoteException {
264 try {
265 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(groupId,
266 className, classPK, messageId, subject, body);
267
268 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
269 }
270 catch (Exception e) {
271 _log.error(e, e);
272
273 throw new RemoteException(e.getMessage());
274 }
275 }
276
277 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
278 long messageId, java.lang.String subject, java.lang.String body,
279 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
280 java.util.List<String> existingFiles, double priority,
281 java.lang.String[] tagsEntries) throws RemoteException {
282 try {
283 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
284 subject, body, files, existingFiles, priority, tagsEntries);
285
286 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
287 }
288 catch (Exception e) {
289 _log.error(e, e);
290
291 throw new RemoteException(e.getMessage());
292 }
293 }
294
295 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
296 }