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