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