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 ownerId, 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, ownerId, 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 categoryId, long threadId, long parentMessageId,
96 java.lang.String subject, java.lang.String body,
97 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
98 boolean anonymous, double priority,
99 com.liferay.portal.service.ServiceContext serviceContext)
100 throws RemoteException {
101 try {
102 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
103 threadId, parentMessageId, subject, body, files, anonymous,
104 priority, 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 categoryId, java.lang.String subject, java.lang.String body,
117 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
118 boolean anonymous, double priority,
119 com.liferay.portal.service.ServiceContext serviceContext)
120 throws RemoteException {
121 try {
122 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.addMessage(categoryId,
123 subject, body, files, anonymous, priority, serviceContext);
124
125 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
126 }
127 catch (Exception e) {
128 _log.error(e, e);
129
130 throw new RemoteException(e.getMessage());
131 }
132 }
133
134 public static void deleteDiscussionMessage(long groupId,
135 java.lang.String className, long classPK, long ownerId, long messageId)
136 throws RemoteException {
137 try {
138 MBMessageServiceUtil.deleteDiscussionMessage(groupId, className,
139 classPK, ownerId, messageId);
140 }
141 catch (Exception e) {
142 _log.error(e, e);
143
144 throw new RemoteException(e.getMessage());
145 }
146 }
147
148 public static void deleteMessage(long messageId) throws RemoteException {
149 try {
150 MBMessageServiceUtil.deleteMessage(messageId);
151 }
152 catch (Exception e) {
153 _log.error(e, e);
154
155 throw new RemoteException(e.getMessage());
156 }
157 }
158
159 public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
160 long categoryId, int start, int end) throws RemoteException {
161 try {
162 java.util.List<com.liferay.portlet.messageboards.model.MBMessage> returnValue =
163 MBMessageServiceUtil.getCategoryMessages(categoryId, 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 categoryId)
175 throws RemoteException {
176 try {
177 int returnValue = MBMessageServiceUtil.getCategoryMessagesCount(categoryId);
178
179 return returnValue;
180 }
181 catch (Exception e) {
182 _log.error(e, e);
183
184 throw new RemoteException(e.getMessage());
185 }
186 }
187
188 public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
189 long messageId) throws RemoteException {
190 try {
191 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
192
193 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
194 }
195 catch (Exception e) {
196 _log.error(e, e);
197
198 throw new RemoteException(e.getMessage());
199 }
200 }
201
202 public static void subscribeMessage(long messageId)
203 throws RemoteException {
204 try {
205 MBMessageServiceUtil.subscribeMessage(messageId);
206 }
207 catch (Exception e) {
208 _log.error(e, e);
209
210 throw new RemoteException(e.getMessage());
211 }
212 }
213
214 public static void unsubscribeMessage(long messageId)
215 throws RemoteException {
216 try {
217 MBMessageServiceUtil.unsubscribeMessage(messageId);
218 }
219 catch (Exception e) {
220 _log.error(e, e);
221
222 throw new RemoteException(e.getMessage());
223 }
224 }
225
226 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
227 java.lang.String className, long classPK, long ownerId, long messageId,
228 java.lang.String subject, java.lang.String body,
229 com.liferay.portal.service.ServiceContext serviceContext)
230 throws RemoteException {
231 try {
232 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateDiscussionMessage(className,
233 classPK, ownerId, messageId, subject, body, serviceContext);
234
235 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
236 }
237 catch (Exception e) {
238 _log.error(e, e);
239
240 throw new RemoteException(e.getMessage());
241 }
242 }
243
244 public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
245 long messageId, java.lang.String subject, java.lang.String body,
246 java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
247 java.util.List<java.lang.String> existingFiles, double priority,
248 com.liferay.portal.service.ServiceContext serviceContext)
249 throws RemoteException {
250 try {
251 com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId,
252 subject, body, files, existingFiles, priority,
253 serviceContext);
254
255 return com.liferay.portlet.messageboards.model.MBMessageSoap.toSoapModel(returnValue);
256 }
257 catch (Exception e) {
258 _log.error(e, e);
259
260 throw new RemoteException(e.getMessage());
261 }
262 }
263
264 private static Log _log = LogFactoryUtil.getLog(MBMessageServiceSoap.class);
265 }