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 addDiscussionMessage(
82 java.lang.String className, long classPK, long threadId,
83 long parentMessageId, java.lang.String subject, java.lang.String body,
84 com.liferay.portal.service.ServiceContext serviceContext)
85 throws RemoteException {
86 try {
87 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addDiscussionMessage(className,
88 classPK, threadId, parentMessageId, subject, body,
89 serviceContext);
90
91 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
92 }
93 catch (Exception e) {
94 _log.error(e, e);
95
96 throw new RemoteException(e.getMessage());
97 }
98 }
99
100 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
101 long categoryId, java.lang.String subject, java.lang.String body,
102 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
103 boolean anonymous, double priority,
104 com.liferay.portal.service.ServiceContext serviceContext)
105 throws RemoteException {
106 try {
107 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
108 subject, body, files, anonymous, priority, serviceContext);
109
110 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
111 }
112 catch (Exception e) {
113 _log.error(e, e);
114
115 throw new RemoteException(e.getMessage());
116 }
117 }
118
119 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
120 long categoryId, long threadId, long parentMessageId,
121 java.lang.String subject, java.lang.String body,
122 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
123 boolean anonymous, double priority,
124 com.liferay.portal.service.ServiceContext serviceContext)
125 throws RemoteException {
126 try {
127 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
128 threadId, parentMessageId, subject, body, files, anonymous,
129 priority, serviceContext);
130
131 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
132 }
133 catch (Exception e) {
134 _log.error(e, e);
135
136 throw new RemoteException(e.getMessage());
137 }
138 }
139
140 public static void deleteDiscussionMessage(long groupId,
141 java.lang.String className, long classPK, long messageId)
142 throws RemoteException {
143 try {
144 MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
145 classPK, messageId);
146 }
147 catch (Exception e) {
148 _log.error(e, e);
149
150 throw new RemoteException(e.getMessage());
151 }
152 }
153
154 public static void deleteMessage(long messageId) throws RemoteException {
155 try {
156 MBMessageServiceUtil.deleteMessage(messageId);
157 }
158 catch (Exception e) {
159 _log.error(e, e);
160
161 throw new RemoteException(e.getMessage());
162 }
163 }
164
165 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
166 long categoryId, int start, int end) throws RemoteException {
167 try {
168 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
169 MBMessageServiceUtil.getCategoryMessages(categoryId, start, end);
170
171 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
172 }
173 catch (Exception e) {
174 _log.error(e, e);
175
176 throw new RemoteException(e.getMessage());
177 }
178 }
179
180 public static int getCategoryMessagesCount(long categoryId)
181 throws RemoteException {
182 try {
183 int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(categoryId);
184
185 return returnValue;
186 }
187 catch (Exception e) {
188 _log.error(e, e);
189
190 throw new RemoteException(e.getMessage());
191 }
192 }
193
194 public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
195 long messageId) throws RemoteException {
196 try {
197 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
198
199 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
200 }
201 catch (Exception e) {
202 _log.error(e, e);
203
204 throw new RemoteException(e.getMessage());
205 }
206 }
207
208 public static void subscribeMessage(long messageId)
209 throws RemoteException {
210 try {
211 MBMessageServiceUtil.subscribeMessage(messageId);
212 }
213 catch (Exception e) {
214 _log.error(e, e);
215
216 throw new RemoteException(e.getMessage());
217 }
218 }
219
220 public static void unsubscribeMessage(long messageId)
221 throws RemoteException {
222 try {
223 MBMessageServiceUtil.unsubscribeMessage(messageId);
224 }
225 catch (Exception e) {
226 _log.error(e, e);
227
228 throw new RemoteException(e.getMessage());
229 }
230 }
231
232 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
233 java.lang.String className, long classPK, long messageId,
234 java.lang.String subject, java.lang.String body,
235 com.liferay.portal.service.ServiceContext serviceContext)
236 throws RemoteException {
237 try {
238 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(className,
239 classPK, messageId, subject, body, serviceContext);
240
241 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
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 updateMessage(
251 long messageId, java.lang.String subject, java.lang.String body,
252 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
253 java.util.List<String> existingFiles, double priority,
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 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 }