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