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