001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.messageboards.service.http;
022:
023: import com.liferay.portal.kernel.log.Log;
024: import com.liferay.portal.kernel.log.LogFactoryUtil;
025:
026: import com.liferay.portlet.messageboards.service.MBMessageServiceUtil;
027:
028: import java.rmi.RemoteException;
029:
030: /**
031: * <a href="MBMessageServiceSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class provides a SOAP utility for the
040: * <code>com.liferay.portlet.messageboards.service.MBMessageServiceUtil</code> service
041: * utility. The static methods of this class calls the same methods of the
042: * service utility. However, the signatures are different because it is
043: * difficult for SOAP to support certain types.
044: * </p>
045: *
046: * <p>
047: * ServiceBuilder follows certain rules in translating the methods. For example,
048: * if the method in the service utility returns a <code>java.util.List</code>,
049: * that is translated to an array of
050: * <code>com.liferay.portlet.messageboards.model.MBMessageSoap</code>. If the method in the
051: * service utility returns a <code>com.liferay.portlet.messageboards.model.MBMessage</code>,
052: * that is translated to a <code>com.liferay.portlet.messageboards.model.MBMessageSoap</code>.
053: * Methods that SOAP cannot safely wire are skipped.
054: * </p>
055: *
056: * <p>
057: * The benefits of using the SOAP utility is that it is cross platform
058: * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
059: * even Perl, to call the generated services. One drawback of SOAP is that it is
060: * slow because it needs to serialize all calls into a text format (XML).
061: * </p>
062: *
063: * <p>
064: * You can see a list of services at
065: * http://localhost:8080/tunnel-web/secure/axis. Set the property
066: * <code>tunnel.servlet.hosts.allowed</code> in portal.properties to configure
067: * security.
068: * </p>
069: *
070: * <p>
071: * The SOAP utility is only generated for remote services.
072: * </p>
073: *
074: * @author Brian Wing Shun Chan
075: *
076: * @see com.liferay.portlet.messageboards.service.MBMessageServiceUtil
077: * @see com.liferay.portlet.messageboards.service.http.MBMessageServiceHttp
078: * @see com.liferay.portlet.messageboards.service.model.MBMessageSoap
079: *
080: */
081: public class MBMessageServiceSoap {
082: public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
083: long categoryId, java.lang.String subject,
084: java.lang.String body, java.util.List files,
085: boolean anonymous, double priority,
086: java.lang.String[] tagsEntries,
087: boolean addCommunityPermissions, boolean addGuestPermissions)
088: throws RemoteException {
089: try {
090: com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil
091: .addMessage(categoryId, subject, body, files,
092: anonymous, priority, tagsEntries,
093: addCommunityPermissions,
094: addGuestPermissions);
095:
096: return com.liferay.portlet.messageboards.model.MBMessageSoap
097: .toSoapModel(returnValue);
098: } catch (Exception e) {
099: _log.error(e, e);
100:
101: throw new RemoteException(e.getMessage());
102: }
103: }
104:
105: public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
106: long categoryId, java.lang.String subject,
107: java.lang.String body, java.util.List files,
108: boolean anonymous, double priority,
109: java.lang.String[] tagsEntries,
110: java.lang.String[] communityPermissions,
111: java.lang.String[] guestPermissions) throws RemoteException {
112: try {
113: com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil
114: .addMessage(categoryId, subject, body, files,
115: anonymous, priority, tagsEntries,
116: communityPermissions, guestPermissions);
117:
118: return com.liferay.portlet.messageboards.model.MBMessageSoap
119: .toSoapModel(returnValue);
120: } catch (Exception e) {
121: _log.error(e, e);
122:
123: throw new RemoteException(e.getMessage());
124: }
125: }
126:
127: public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
128: long categoryId, long threadId, long parentMessageId,
129: java.lang.String subject, java.lang.String body,
130: java.util.List files, boolean anonymous, double priority,
131: java.lang.String[] tagsEntries,
132: boolean addCommunityPermissions, boolean addGuestPermissions)
133: throws RemoteException {
134: try {
135: com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil
136: .addMessage(categoryId, threadId, parentMessageId,
137: subject, body, files, anonymous, priority,
138: tagsEntries, addCommunityPermissions,
139: addGuestPermissions);
140:
141: return com.liferay.portlet.messageboards.model.MBMessageSoap
142: .toSoapModel(returnValue);
143: } catch (Exception e) {
144: _log.error(e, e);
145:
146: throw new RemoteException(e.getMessage());
147: }
148: }
149:
150: public static com.liferay.portlet.messageboards.model.MBMessageSoap addMessage(
151: long categoryId, long threadId, long parentMessageId,
152: java.lang.String subject, java.lang.String body,
153: java.util.List files, boolean anonymous, double priority,
154: java.lang.String[] tagsEntries,
155: java.lang.String[] communityPermissions,
156: java.lang.String[] guestPermissions) throws RemoteException {
157: try {
158: com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil
159: .addMessage(categoryId, threadId, parentMessageId,
160: subject, body, files, anonymous, priority,
161: tagsEntries, communityPermissions,
162: guestPermissions);
163:
164: return com.liferay.portlet.messageboards.model.MBMessageSoap
165: .toSoapModel(returnValue);
166: } catch (Exception e) {
167: _log.error(e, e);
168:
169: throw new RemoteException(e.getMessage());
170: }
171: }
172:
173: public static void deleteDiscussionMessage(long groupId,
174: java.lang.String className, long classPK, long messageId)
175: throws RemoteException {
176: try {
177: MBMessageServiceUtil.deleteDiscussionMessage(groupId,
178: className, classPK, messageId);
179: } catch (Exception e) {
180: _log.error(e, e);
181:
182: throw new RemoteException(e.getMessage());
183: }
184: }
185:
186: public static void deleteMessage(long messageId)
187: throws RemoteException {
188: try {
189: MBMessageServiceUtil.deleteMessage(messageId);
190: } catch (Exception e) {
191: _log.error(e, e);
192:
193: throw new RemoteException(e.getMessage());
194: }
195: }
196:
197: public static com.liferay.portlet.messageboards.model.MBMessageSoap[] getCategoryMessages(
198: long categoryId, int begin, int end) throws RemoteException {
199: try {
200: java.util.List returnValue = MBMessageServiceUtil
201: .getCategoryMessages(categoryId, begin, end);
202:
203: return com.liferay.portlet.messageboards.model.MBMessageSoap
204: .toSoapModels(returnValue);
205: } catch (Exception e) {
206: _log.error(e, e);
207:
208: throw new RemoteException(e.getMessage());
209: }
210: }
211:
212: public static int getCategoryMessagesCount(long categoryId)
213: throws RemoteException {
214: try {
215: int returnValue = MBMessageServiceUtil
216: .getCategoryMessagesCount(categoryId);
217:
218: return returnValue;
219: } catch (Exception e) {
220: _log.error(e, e);
221:
222: throw new RemoteException(e.getMessage());
223: }
224: }
225:
226: public static java.lang.String getCategoryMessagesRSS(
227: long categoryId, int max, java.lang.String type,
228: double version, java.lang.String displayStyle,
229: java.lang.String feedURL, java.lang.String entryURL)
230: throws RemoteException {
231: try {
232: java.lang.String returnValue = MBMessageServiceUtil
233: .getCategoryMessagesRSS(categoryId, max, type,
234: version, displayStyle, feedURL, entryURL);
235:
236: return returnValue;
237: } catch (Exception e) {
238: _log.error(e, e);
239:
240: throw new RemoteException(e.getMessage());
241: }
242: }
243:
244: public static java.lang.String getCompanyMessagesRSS(
245: long companyId, int max, java.lang.String type,
246: double version, java.lang.String displayStyle,
247: java.lang.String feedURL, java.lang.String entryURL)
248: throws RemoteException {
249: try {
250: java.lang.String returnValue = MBMessageServiceUtil
251: .getCompanyMessagesRSS(companyId, max, type,
252: version, displayStyle, feedURL, entryURL);
253:
254: return returnValue;
255: } catch (Exception e) {
256: _log.error(e, e);
257:
258: throw new RemoteException(e.getMessage());
259: }
260: }
261:
262: public static java.lang.String getGroupMessagesRSS(long groupId,
263: int max, java.lang.String type, double version,
264: java.lang.String displayStyle, java.lang.String feedURL,
265: java.lang.String entryURL) throws RemoteException {
266: try {
267: java.lang.String returnValue = MBMessageServiceUtil
268: .getGroupMessagesRSS(groupId, max, type, version,
269: displayStyle, feedURL, entryURL);
270:
271: return returnValue;
272: } catch (Exception e) {
273: _log.error(e, e);
274:
275: throw new RemoteException(e.getMessage());
276: }
277: }
278:
279: public static java.lang.String getGroupMessagesRSS(long groupId,
280: long userId, int max, java.lang.String type,
281: double version, java.lang.String displayStyle,
282: java.lang.String feedURL, java.lang.String entryURL)
283: throws RemoteException {
284: try {
285: java.lang.String returnValue = MBMessageServiceUtil
286: .getGroupMessagesRSS(groupId, userId, max, type,
287: version, displayStyle, feedURL, entryURL);
288:
289: return returnValue;
290: } catch (Exception e) {
291: _log.error(e, e);
292:
293: throw new RemoteException(e.getMessage());
294: }
295: }
296:
297: public static com.liferay.portlet.messageboards.model.MBMessageSoap getMessage(
298: long messageId) throws RemoteException {
299: try {
300: com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil
301: .getMessage(messageId);
302:
303: return com.liferay.portlet.messageboards.model.MBMessageSoap
304: .toSoapModel(returnValue);
305: } catch (Exception e) {
306: _log.error(e, e);
307:
308: throw new RemoteException(e.getMessage());
309: }
310: }
311:
312: public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
313: long messageId) throws RemoteException {
314: try {
315: com.liferay.portlet.messageboards.model.MBMessageDisplay returnValue = MBMessageServiceUtil
316: .getMessageDisplay(messageId);
317:
318: return returnValue;
319: } catch (Exception e) {
320: _log.error(e, e);
321:
322: throw new RemoteException(e.getMessage());
323: }
324: }
325:
326: public static java.lang.String getThreadMessagesRSS(long threadId,
327: int max, java.lang.String type, double version,
328: java.lang.String displayStyle, java.lang.String feedURL,
329: java.lang.String entryURL) throws RemoteException {
330: try {
331: java.lang.String returnValue = MBMessageServiceUtil
332: .getThreadMessagesRSS(threadId, max, type, version,
333: displayStyle, feedURL, entryURL);
334:
335: return returnValue;
336: } catch (Exception e) {
337: _log.error(e, e);
338:
339: throw new RemoteException(e.getMessage());
340: }
341: }
342:
343: public static void subscribeMessage(long messageId)
344: throws RemoteException {
345: try {
346: MBMessageServiceUtil.subscribeMessage(messageId);
347: } catch (Exception e) {
348: _log.error(e, e);
349:
350: throw new RemoteException(e.getMessage());
351: }
352: }
353:
354: public static void unsubscribeMessage(long messageId)
355: throws RemoteException {
356: try {
357: MBMessageServiceUtil.unsubscribeMessage(messageId);
358: } catch (Exception e) {
359: _log.error(e, e);
360:
361: throw new RemoteException(e.getMessage());
362: }
363: }
364:
365: public static com.liferay.portlet.messageboards.model.MBMessageSoap updateDiscussionMessage(
366: long groupId, java.lang.String className, long classPK,
367: long messageId, java.lang.String subject,
368: java.lang.String body) throws RemoteException {
369: try {
370: com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil
371: .updateDiscussionMessage(groupId, className,
372: classPK, messageId, subject, body);
373:
374: return com.liferay.portlet.messageboards.model.MBMessageSoap
375: .toSoapModel(returnValue);
376: } catch (Exception e) {
377: _log.error(e, e);
378:
379: throw new RemoteException(e.getMessage());
380: }
381: }
382:
383: public static com.liferay.portlet.messageboards.model.MBMessageSoap updateMessage(
384: long messageId, java.lang.String subject,
385: java.lang.String body, java.util.List files,
386: double priority, java.lang.String[] tagsEntries)
387: throws RemoteException {
388: try {
389: com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil
390: .updateMessage(messageId, subject, body, files,
391: priority, tagsEntries);
392:
393: return com.liferay.portlet.messageboards.model.MBMessageSoap
394: .toSoapModel(returnValue);
395: } catch (Exception e) {
396: _log.error(e, e);
397:
398: throw new RemoteException(e.getMessage());
399: }
400: }
401:
402: private static Log _log = LogFactoryUtil
403: .getLog(MBMessageServiceSoap.class);
404: }
|