001
014
015 package com.liferay.portlet.messageboards.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019
020 import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
021
022 import java.rmi.RemoteException;
023
024
067 public class MBMessageServiceSoap {
068 public static com.liferay.portlet.messageboards.model.MBMessageSoap addDiscussionMessage(
069 long groupId, java.lang.String className, long classPK,
070 java.lang.String permissionClassName, long permissionClassPK,
071 long threadId, long parentMessageId, java.lang.String subject,
072 java.lang.String body,
073 com.liferay.portal.service.ServiceContext serviceContext)
074 throws RemoteException {
075 try {
076 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addDiscussionMessage(groupId,
077 className, classPK, permissionClassName, permissionClassPK,
078 threadId, parentMessageId, subject, body, serviceContext);
079
080 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
081 }
082 catch (Exception e) {
083 _log.error(e, e);
084
085 throw new RemoteException(e.getMessage());
086 }
087 }
088
089 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
090 long groupId, long categoryId, long threadId, long parentMessageId,
091 java.lang.String subject, java.lang.String body,
092 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
093 boolean anonymous, double priority, boolean allowPingbacks,
094 com.liferay.portal.service.ServiceContext serviceContext)
095 throws RemoteException {
096 try {
097 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(groupId,
098 categoryId, threadId, parentMessageId, subject, body,
099 files, anonymous, priority, allowPingbacks, serviceContext);
100
101 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
102 }
103 catch (Exception e) {
104 _log.error(e, e);
105
106 throw new RemoteException(e.getMessage());
107 }
108 }
109
110 public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
111 long groupId, long categoryId, java.lang.String subject,
112 java.lang.String body,
113 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
114 boolean anonymous, double priority, boolean allowPingbacks,
115 com.liferay.portal.service.ServiceContext serviceContext)
116 throws RemoteException {
117 try {
118 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(groupId,
119 categoryId, subject, body, files, anonymous, priority,
120 allowPingbacks, serviceContext);
121
122 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
123 }
124 catch (Exception e) {
125 _log.error(e, e);
126
127 throw new RemoteException(e.getMessage());
128 }
129 }
130
131 public static void deleteDiscussionMessage(long groupId,
132 java.lang.String className, long classPK,
133 java.lang.String permissionClassName, long permissionClassPK,
134 long messageId) throws RemoteException {
135 try {
136 MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
137 classPK, permissionClassName, permissionClassPK, messageId);
138 }
139 catch (Exception e) {
140 _log.error(e, e);
141
142 throw new RemoteException(e.getMessage());
143 }
144 }
145
146 public static void deleteMessage(long messageId) throws RemoteException {
147 try {
148 MBMessageServiceUtil.deleteMessage(messageId);
149 }
150 catch (Exception e) {
151 _log.error(e, e);
152
153 throw new RemoteException(e.getMessage());
154 }
155 }
156
157 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
158 long groupId, long categoryId, int status, int start, int end)
159 throws RemoteException {
160 try {
161 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
162 MBMessageServiceUtil.getCategoryMessages(groupId, categoryId,
163 status, start, end);
164
165 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
166 }
167 catch (Exception e) {
168 _log.error(e, e);
169
170 throw new RemoteException(e.getMessage());
171 }
172 }
173
174 public static int getCategoryMessagesCount(long groupId, long categoryId,
175 int status) throws RemoteException {
176 try {
177 int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(groupId,
178 categoryId, status);
179
180 return returnValue;
181 }
182 catch (Exception e) {
183 _log.error(e, e);
184
185 throw new RemoteException(e.getMessage());
186 }
187 }
188
189 public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
190 long messageId) throws RemoteException {
191 try {
192 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
193
194 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
195 }
196 catch (Exception e) {
197 _log.error(e, e);
198
199 throw new RemoteException(e.getMessage());
200 }
201 }
202
203 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getThreadMessages(
204 long groupId, long categoryId, long threadId, int status, int start,
205 int end) throws RemoteException {
206 try {
207 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
208 MBMessageServiceUtil.getThreadMessages(groupId, categoryId,
209 threadId, status, start, end);
210
211 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModels(returnValue);
212 }
213 catch (Exception e) {
214 _log.error(e, e);
215
216 throw new RemoteException(e.getMessage());
217 }
218 }
219
220 public static int getThreadMessagesCount(long groupId, long categoryId,
221 long threadId, int status) throws RemoteException {
222 try {
223 int returnValue = MBMessageServiceUtil.getThreadMessagesCount(groupId,
224 categoryId, threadId, status);
225
226 return 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 java.lang.String className, long classPK,
261 java.lang.String permissionClassName, long permissionClassPK,
262 long messageId, java.lang.String subject, java.lang.String body,
263 com.liferay.portal.service.ServiceContext serviceContext)
264 throws RemoteException {
265 try {
266 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(className,
267 classPK, permissionClassName, permissionClassPK, messageId,
268 subject, body, serviceContext);
269
270 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
271 }
272 catch (Exception e) {
273 _log.error(e, e);
274
275 throw new RemoteException(e.getMessage());
276 }
277 }
278
279 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
280 long messageId, java.lang.String subject, java.lang.String body,
281 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
282 java.util.List<java.lang.String> existingFiles, double priority,
283 boolean allowPingbacks,
284 com.liferay.portal.service.ServiceContext serviceContext)
285 throws RemoteException {
286 try {
287 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
288 subject, body, files, existingFiles, priority,
289 allowPingbacks, serviceContext);
290
291 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
292 }
293 catch (Exception e) {
294 _log.error(e, e);
295
296 throw new RemoteException(e.getMessage());
297 }
298 }
299
300 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
301 }