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;
022:
023: /**
024: * <a href="MBMessageServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.messageboards.service.MBMessageService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.messageboards.service.MBMessageServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.messageboards.service.MBMessageService
047: * @see com.liferay.portlet.messageboards.service.MBMessageServiceFactory
048: *
049: */
050: public class MBMessageServiceUtil {
051: public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
052: long groupId, java.lang.String className, long classPK,
053: long threadId, long parentMessageId,
054: java.lang.String subject, java.lang.String body,
055: com.liferay.portal.theme.ThemeDisplay themeDisplay)
056: throws com.liferay.portal.PortalException,
057: com.liferay.portal.SystemException,
058: java.rmi.RemoteException {
059: MBMessageService mbMessageService = MBMessageServiceFactory
060: .getService();
061:
062: return mbMessageService.addDiscussionMessage(groupId,
063: className, classPK, threadId, parentMessageId, subject,
064: body, themeDisplay);
065: }
066:
067: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
068: long categoryId, java.lang.String subject,
069: java.lang.String body, java.util.List files,
070: boolean anonymous, double priority,
071: java.lang.String[] tagsEntries,
072: boolean addCommunityPermissions, boolean addGuestPermissions)
073: throws com.liferay.portal.PortalException,
074: com.liferay.portal.SystemException,
075: java.rmi.RemoteException {
076: MBMessageService mbMessageService = MBMessageServiceFactory
077: .getService();
078:
079: return mbMessageService.addMessage(categoryId, subject, body,
080: files, anonymous, priority, tagsEntries,
081: addCommunityPermissions, addGuestPermissions);
082: }
083:
084: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
085: long categoryId, java.lang.String subject,
086: java.lang.String body, java.util.List files,
087: boolean anonymous, double priority,
088: java.lang.String[] tagsEntries,
089: java.lang.String[] communityPermissions,
090: java.lang.String[] guestPermissions)
091: throws com.liferay.portal.PortalException,
092: com.liferay.portal.SystemException,
093: java.rmi.RemoteException {
094: MBMessageService mbMessageService = MBMessageServiceFactory
095: .getService();
096:
097: return mbMessageService.addMessage(categoryId, subject, body,
098: files, anonymous, priority, tagsEntries,
099: communityPermissions, guestPermissions);
100: }
101:
102: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
103: long categoryId, java.lang.String subject,
104: java.lang.String body, java.util.List files,
105: boolean anonymous, double priority,
106: java.lang.String[] tagsEntries,
107: javax.portlet.PortletPreferences prefs,
108: boolean addCommunityPermissions,
109: boolean addGuestPermissions,
110: com.liferay.portal.theme.ThemeDisplay themeDisplay)
111: throws com.liferay.portal.PortalException,
112: com.liferay.portal.SystemException,
113: java.rmi.RemoteException {
114: MBMessageService mbMessageService = MBMessageServiceFactory
115: .getService();
116:
117: return mbMessageService.addMessage(categoryId, subject, body,
118: files, anonymous, priority, tagsEntries, prefs,
119: addCommunityPermissions, addGuestPermissions,
120: themeDisplay);
121: }
122:
123: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
124: long categoryId, java.lang.String subject,
125: java.lang.String body, java.util.List files,
126: boolean anonymous, double priority,
127: java.lang.String[] tagsEntries,
128: javax.portlet.PortletPreferences prefs,
129: java.lang.String[] communityPermissions,
130: java.lang.String[] guestPermissions,
131: com.liferay.portal.theme.ThemeDisplay themeDisplay)
132: throws com.liferay.portal.PortalException,
133: com.liferay.portal.SystemException,
134: java.rmi.RemoteException {
135: MBMessageService mbMessageService = MBMessageServiceFactory
136: .getService();
137:
138: return mbMessageService.addMessage(categoryId, subject, body,
139: files, anonymous, priority, tagsEntries, prefs,
140: communityPermissions, guestPermissions, themeDisplay);
141: }
142:
143: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
144: long categoryId, long threadId, long parentMessageId,
145: java.lang.String subject, java.lang.String body,
146: java.util.List files, boolean anonymous, double priority,
147: java.lang.String[] tagsEntries,
148: boolean addCommunityPermissions, boolean addGuestPermissions)
149: throws com.liferay.portal.PortalException,
150: com.liferay.portal.SystemException,
151: java.rmi.RemoteException {
152: MBMessageService mbMessageService = MBMessageServiceFactory
153: .getService();
154:
155: return mbMessageService.addMessage(categoryId, threadId,
156: parentMessageId, subject, body, files, anonymous,
157: priority, tagsEntries, addCommunityPermissions,
158: addGuestPermissions);
159: }
160:
161: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
162: long categoryId, long threadId, long parentMessageId,
163: java.lang.String subject, java.lang.String body,
164: java.util.List files, boolean anonymous, double priority,
165: java.lang.String[] tagsEntries,
166: java.lang.String[] communityPermissions,
167: java.lang.String[] guestPermissions)
168: throws com.liferay.portal.PortalException,
169: com.liferay.portal.SystemException,
170: java.rmi.RemoteException {
171: MBMessageService mbMessageService = MBMessageServiceFactory
172: .getService();
173:
174: return mbMessageService.addMessage(categoryId, threadId,
175: parentMessageId, subject, body, files, anonymous,
176: priority, tagsEntries, communityPermissions,
177: guestPermissions);
178: }
179:
180: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
181: long categoryId, long threadId, long parentMessageId,
182: java.lang.String subject, java.lang.String body,
183: java.util.List files, boolean anonymous, double priority,
184: java.lang.String[] tagsEntries,
185: javax.portlet.PortletPreferences prefs,
186: boolean addCommunityPermissions,
187: boolean addGuestPermissions,
188: com.liferay.portal.theme.ThemeDisplay themeDisplay)
189: throws com.liferay.portal.PortalException,
190: com.liferay.portal.SystemException,
191: java.rmi.RemoteException {
192: MBMessageService mbMessageService = MBMessageServiceFactory
193: .getService();
194:
195: return mbMessageService.addMessage(categoryId, threadId,
196: parentMessageId, subject, body, files, anonymous,
197: priority, tagsEntries, prefs, addCommunityPermissions,
198: addGuestPermissions, themeDisplay);
199: }
200:
201: public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
202: long categoryId, long threadId, long parentMessageId,
203: java.lang.String subject, java.lang.String body,
204: java.util.List files, boolean anonymous, double priority,
205: java.lang.String[] tagsEntries,
206: javax.portlet.PortletPreferences prefs,
207: java.lang.String[] communityPermissions,
208: java.lang.String[] guestPermissions,
209: com.liferay.portal.theme.ThemeDisplay themeDisplay)
210: throws com.liferay.portal.PortalException,
211: com.liferay.portal.SystemException,
212: java.rmi.RemoteException {
213: MBMessageService mbMessageService = MBMessageServiceFactory
214: .getService();
215:
216: return mbMessageService.addMessage(categoryId, threadId,
217: parentMessageId, subject, body, files, anonymous,
218: priority, tagsEntries, prefs, communityPermissions,
219: guestPermissions, themeDisplay);
220: }
221:
222: public static void deleteDiscussionMessage(long groupId,
223: java.lang.String className, long classPK, long messageId)
224: throws com.liferay.portal.PortalException,
225: com.liferay.portal.SystemException,
226: java.rmi.RemoteException {
227: MBMessageService mbMessageService = MBMessageServiceFactory
228: .getService();
229:
230: mbMessageService.deleteDiscussionMessage(groupId, className,
231: classPK, messageId);
232: }
233:
234: public static void deleteMessage(long messageId)
235: throws com.liferay.portal.PortalException,
236: com.liferay.portal.SystemException,
237: java.rmi.RemoteException {
238: MBMessageService mbMessageService = MBMessageServiceFactory
239: .getService();
240:
241: mbMessageService.deleteMessage(messageId);
242: }
243:
244: public static java.util.List getCategoryMessages(long categoryId,
245: int begin, int end)
246: throws com.liferay.portal.PortalException,
247: com.liferay.portal.SystemException,
248: java.rmi.RemoteException {
249: MBMessageService mbMessageService = MBMessageServiceFactory
250: .getService();
251:
252: return mbMessageService.getCategoryMessages(categoryId, begin,
253: end);
254: }
255:
256: public static int getCategoryMessagesCount(long categoryId)
257: throws com.liferay.portal.PortalException,
258: com.liferay.portal.SystemException,
259: java.rmi.RemoteException {
260: MBMessageService mbMessageService = MBMessageServiceFactory
261: .getService();
262:
263: return mbMessageService.getCategoryMessagesCount(categoryId);
264: }
265:
266: public static java.lang.String getCategoryMessagesRSS(
267: long categoryId, int max, java.lang.String type,
268: double version, java.lang.String displayStyle,
269: java.lang.String feedURL, java.lang.String entryURL)
270: throws com.liferay.portal.PortalException,
271: com.liferay.portal.SystemException,
272: java.rmi.RemoteException {
273: MBMessageService mbMessageService = MBMessageServiceFactory
274: .getService();
275:
276: return mbMessageService.getCategoryMessagesRSS(categoryId, max,
277: type, version, displayStyle, feedURL, entryURL);
278: }
279:
280: public static java.lang.String getCompanyMessagesRSS(
281: long companyId, int max, java.lang.String type,
282: double version, java.lang.String displayStyle,
283: java.lang.String feedURL, java.lang.String entryURL)
284: throws com.liferay.portal.PortalException,
285: com.liferay.portal.SystemException,
286: java.rmi.RemoteException {
287: MBMessageService mbMessageService = MBMessageServiceFactory
288: .getService();
289:
290: return mbMessageService.getCompanyMessagesRSS(companyId, max,
291: type, version, displayStyle, feedURL, entryURL);
292: }
293:
294: public static java.lang.String getGroupMessagesRSS(long groupId,
295: int max, java.lang.String type, double version,
296: java.lang.String displayStyle, java.lang.String feedURL,
297: java.lang.String entryURL)
298: throws com.liferay.portal.PortalException,
299: com.liferay.portal.SystemException,
300: java.rmi.RemoteException {
301: MBMessageService mbMessageService = MBMessageServiceFactory
302: .getService();
303:
304: return mbMessageService.getGroupMessagesRSS(groupId, max, type,
305: version, displayStyle, feedURL, entryURL);
306: }
307:
308: public static java.lang.String getGroupMessagesRSS(long groupId,
309: long userId, int max, java.lang.String type,
310: double version, java.lang.String displayStyle,
311: java.lang.String feedURL, java.lang.String entryURL)
312: throws com.liferay.portal.PortalException,
313: com.liferay.portal.SystemException,
314: java.rmi.RemoteException {
315: MBMessageService mbMessageService = MBMessageServiceFactory
316: .getService();
317:
318: return mbMessageService.getGroupMessagesRSS(groupId, userId,
319: max, type, version, displayStyle, feedURL, entryURL);
320: }
321:
322: public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
323: long messageId) throws com.liferay.portal.PortalException,
324: com.liferay.portal.SystemException,
325: java.rmi.RemoteException {
326: MBMessageService mbMessageService = MBMessageServiceFactory
327: .getService();
328:
329: return mbMessageService.getMessage(messageId);
330: }
331:
332: public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
333: long messageId) throws com.liferay.portal.PortalException,
334: com.liferay.portal.SystemException,
335: java.rmi.RemoteException {
336: MBMessageService mbMessageService = MBMessageServiceFactory
337: .getService();
338:
339: return mbMessageService.getMessageDisplay(messageId);
340: }
341:
342: public static java.lang.String getThreadMessagesRSS(long threadId,
343: int max, java.lang.String type, double version,
344: java.lang.String displayStyle, java.lang.String feedURL,
345: java.lang.String entryURL)
346: throws com.liferay.portal.PortalException,
347: com.liferay.portal.SystemException,
348: java.rmi.RemoteException {
349: MBMessageService mbMessageService = MBMessageServiceFactory
350: .getService();
351:
352: return mbMessageService.getThreadMessagesRSS(threadId, max,
353: type, version, displayStyle, feedURL, entryURL);
354: }
355:
356: public static void subscribeMessage(long messageId)
357: throws com.liferay.portal.PortalException,
358: com.liferay.portal.SystemException,
359: java.rmi.RemoteException {
360: MBMessageService mbMessageService = MBMessageServiceFactory
361: .getService();
362:
363: mbMessageService.subscribeMessage(messageId);
364: }
365:
366: public static void unsubscribeMessage(long messageId)
367: throws com.liferay.portal.PortalException,
368: com.liferay.portal.SystemException,
369: java.rmi.RemoteException {
370: MBMessageService mbMessageService = MBMessageServiceFactory
371: .getService();
372:
373: mbMessageService.unsubscribeMessage(messageId);
374: }
375:
376: public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
377: long groupId, java.lang.String className, long classPK,
378: long messageId, java.lang.String subject,
379: java.lang.String body)
380: throws com.liferay.portal.PortalException,
381: com.liferay.portal.SystemException,
382: java.rmi.RemoteException {
383: MBMessageService mbMessageService = MBMessageServiceFactory
384: .getService();
385:
386: return mbMessageService.updateDiscussionMessage(groupId,
387: className, classPK, messageId, subject, body);
388: }
389:
390: public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
391: long messageId, java.lang.String subject,
392: java.lang.String body, java.util.List files,
393: double priority, java.lang.String[] tagsEntries)
394: throws com.liferay.portal.PortalException,
395: com.liferay.portal.SystemException,
396: java.rmi.RemoteException {
397: MBMessageService mbMessageService = MBMessageServiceFactory
398: .getService();
399:
400: return mbMessageService.updateMessage(messageId, subject, body,
401: files, priority, tagsEntries);
402: }
403:
404: public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
405: long messageId, java.lang.String subject,
406: java.lang.String body, java.util.List files,
407: double priority, java.lang.String[] tagsEntries,
408: javax.portlet.PortletPreferences prefs,
409: com.liferay.portal.theme.ThemeDisplay themeDisplay)
410: throws com.liferay.portal.PortalException,
411: com.liferay.portal.SystemException,
412: java.rmi.RemoteException {
413: MBMessageService mbMessageService = MBMessageServiceFactory
414: .getService();
415:
416: return mbMessageService.updateMessage(messageId, subject, body,
417: files, priority, tagsEntries, prefs, themeDisplay);
418: }
419: }
|