1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.messageboards.service;
21  
22  
23  /**
24   * <a href="MBMessageServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.messageboards.service.MBMessageService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.messageboards.service.MBMessageService
42   *
43   */
44  public class MBMessageServiceUtil {
45      public static com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
46          long groupId, java.lang.String className, long classPK, long threadId,
47          long parentMessageId, java.lang.String subject, java.lang.String body,
48          com.liferay.portal.theme.ThemeDisplay themeDisplay)
49          throws com.liferay.portal.PortalException,
50              com.liferay.portal.SystemException, java.rmi.RemoteException {
51          return getService()
52                     .addDiscussionMessage(groupId, className, classPK, threadId,
53              parentMessageId, subject, body, themeDisplay);
54      }
55  
56      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
57          long categoryId, java.lang.String subject, java.lang.String body,
58          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
59          boolean anonymous, double priority, java.lang.String[] tagsEntries,
60          boolean addCommunityPermissions, boolean addGuestPermissions)
61          throws com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException, java.rmi.RemoteException {
63          return getService()
64                     .addMessage(categoryId, subject, body, files, anonymous,
65              priority, tagsEntries, addCommunityPermissions, addGuestPermissions);
66      }
67  
68      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
69          long categoryId, java.lang.String subject, java.lang.String body,
70          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
71          boolean anonymous, double priority, java.lang.String[] tagsEntries,
72          java.lang.String[] communityPermissions,
73          java.lang.String[] guestPermissions)
74          throws com.liferay.portal.PortalException,
75              com.liferay.portal.SystemException, java.rmi.RemoteException {
76          return getService()
77                     .addMessage(categoryId, subject, body, files, anonymous,
78              priority, tagsEntries, communityPermissions, guestPermissions);
79      }
80  
81      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
82          long categoryId, java.lang.String subject, java.lang.String body,
83          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
84          boolean anonymous, double priority, java.lang.String[] tagsEntries,
85          javax.portlet.PortletPreferences prefs,
86          boolean addCommunityPermissions, boolean addGuestPermissions,
87          com.liferay.portal.theme.ThemeDisplay themeDisplay)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException, java.rmi.RemoteException {
90          return getService()
91                     .addMessage(categoryId, subject, body, files, anonymous,
92              priority, tagsEntries, prefs, addCommunityPermissions,
93              addGuestPermissions, themeDisplay);
94      }
95  
96      public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
97          long categoryId, java.lang.String subject, java.lang.String body,
98          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
99          boolean anonymous, double priority, java.lang.String[] tagsEntries,
100         javax.portlet.PortletPreferences prefs,
101         java.lang.String[] communityPermissions,
102         java.lang.String[] guestPermissions,
103         com.liferay.portal.theme.ThemeDisplay themeDisplay)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException, java.rmi.RemoteException {
106         return getService()
107                    .addMessage(categoryId, subject, body, files, anonymous,
108             priority, tagsEntries, prefs, communityPermissions,
109             guestPermissions, themeDisplay);
110     }
111 
112     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
113         long categoryId, long threadId, long parentMessageId,
114         java.lang.String subject, java.lang.String body,
115         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
116         boolean anonymous, double priority, java.lang.String[] tagsEntries,
117         boolean addCommunityPermissions, boolean addGuestPermissions)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException, java.rmi.RemoteException {
120         return getService()
121                    .addMessage(categoryId, threadId, parentMessageId, subject,
122             body, files, anonymous, priority, tagsEntries,
123             addCommunityPermissions, addGuestPermissions);
124     }
125 
126     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
127         long categoryId, long threadId, long parentMessageId,
128         java.lang.String subject, java.lang.String body,
129         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
130         boolean anonymous, double priority, java.lang.String[] tagsEntries,
131         java.lang.String[] communityPermissions,
132         java.lang.String[] guestPermissions)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException, java.rmi.RemoteException {
135         return getService()
136                    .addMessage(categoryId, threadId, parentMessageId, subject,
137             body, files, anonymous, priority, tagsEntries,
138             communityPermissions, guestPermissions);
139     }
140 
141     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
142         long categoryId, long threadId, long parentMessageId,
143         java.lang.String subject, java.lang.String body,
144         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
145         boolean anonymous, double priority, java.lang.String[] tagsEntries,
146         javax.portlet.PortletPreferences prefs,
147         boolean addCommunityPermissions, boolean addGuestPermissions,
148         com.liferay.portal.theme.ThemeDisplay themeDisplay)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException, java.rmi.RemoteException {
151         return getService()
152                    .addMessage(categoryId, threadId, parentMessageId, subject,
153             body, files, anonymous, priority, tagsEntries, prefs,
154             addCommunityPermissions, addGuestPermissions, themeDisplay);
155     }
156 
157     public static com.liferay.portlet.messageboards.model.MBMessage addMessage(
158         long categoryId, long threadId, long parentMessageId,
159         java.lang.String subject, java.lang.String body,
160         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
161         boolean anonymous, double priority, java.lang.String[] tagsEntries,
162         javax.portlet.PortletPreferences prefs,
163         java.lang.String[] communityPermissions,
164         java.lang.String[] guestPermissions,
165         com.liferay.portal.theme.ThemeDisplay themeDisplay)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException, java.rmi.RemoteException {
168         return getService()
169                    .addMessage(categoryId, threadId, parentMessageId, subject,
170             body, files, anonymous, priority, tagsEntries, prefs,
171             communityPermissions, guestPermissions, themeDisplay);
172     }
173 
174     public static void deleteDiscussionMessage(long groupId,
175         java.lang.String className, long classPK, long messageId)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException, java.rmi.RemoteException {
178         getService()
179             .deleteDiscussionMessage(groupId, className, classPK, messageId);
180     }
181 
182     public static void deleteMessage(long messageId)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException, java.rmi.RemoteException {
185         getService().deleteMessage(messageId);
186     }
187 
188     public static java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
189         long categoryId, int start, int end)
190         throws com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException, java.rmi.RemoteException {
192         return getService().getCategoryMessages(categoryId, start, end);
193     }
194 
195     public static int getCategoryMessagesCount(long categoryId)
196         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
197         return getService().getCategoryMessagesCount(categoryId);
198     }
199 
200     public static java.lang.String getCategoryMessagesRSS(long categoryId,
201         int max, java.lang.String type, double version,
202         java.lang.String displayStyle, java.lang.String feedURL,
203         java.lang.String entryURL,
204         com.liferay.portal.theme.ThemeDisplay themeDisplay)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException, java.rmi.RemoteException {
207         return getService()
208                    .getCategoryMessagesRSS(categoryId, max, type, version,
209             displayStyle, feedURL, entryURL, themeDisplay);
210     }
211 
212     public static java.lang.String getCompanyMessagesRSS(long companyId,
213         int max, java.lang.String type, double version,
214         java.lang.String displayStyle, java.lang.String feedURL,
215         java.lang.String entryURL,
216         com.liferay.portal.theme.ThemeDisplay themeDisplay)
217         throws com.liferay.portal.PortalException,
218             com.liferay.portal.SystemException, java.rmi.RemoteException {
219         return getService()
220                    .getCompanyMessagesRSS(companyId, max, type, version,
221             displayStyle, feedURL, entryURL, themeDisplay);
222     }
223 
224     public static java.lang.String getGroupMessagesRSS(long groupId, int max,
225         java.lang.String type, double version, java.lang.String displayStyle,
226         java.lang.String feedURL, java.lang.String entryURL,
227         com.liferay.portal.theme.ThemeDisplay themeDisplay)
228         throws com.liferay.portal.PortalException,
229             com.liferay.portal.SystemException, java.rmi.RemoteException {
230         return getService()
231                    .getGroupMessagesRSS(groupId, max, type, version,
232             displayStyle, feedURL, entryURL, themeDisplay);
233     }
234 
235     public static java.lang.String getGroupMessagesRSS(long groupId,
236         long userId, int max, java.lang.String type, double version,
237         java.lang.String displayStyle, java.lang.String feedURL,
238         java.lang.String entryURL,
239         com.liferay.portal.theme.ThemeDisplay themeDisplay)
240         throws com.liferay.portal.PortalException,
241             com.liferay.portal.SystemException, java.rmi.RemoteException {
242         return getService()
243                    .getGroupMessagesRSS(groupId, userId, max, type, version,
244             displayStyle, feedURL, entryURL, themeDisplay);
245     }
246 
247     public static com.liferay.portlet.messageboards.model.MBMessage getMessage(
248         long messageId)
249         throws com.liferay.portal.PortalException,
250             com.liferay.portal.SystemException, java.rmi.RemoteException {
251         return getService().getMessage(messageId);
252     }
253 
254     public static com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
255         long messageId)
256         throws com.liferay.portal.PortalException,
257             com.liferay.portal.SystemException, java.rmi.RemoteException {
258         return getService().getMessageDisplay(messageId);
259     }
260 
261     public static java.lang.String getThreadMessagesRSS(long threadId, int max,
262         java.lang.String type, double version, java.lang.String displayStyle,
263         java.lang.String feedURL, java.lang.String entryURL,
264         com.liferay.portal.theme.ThemeDisplay themeDisplay)
265         throws com.liferay.portal.PortalException,
266             com.liferay.portal.SystemException, java.rmi.RemoteException {
267         return getService()
268                    .getThreadMessagesRSS(threadId, max, type, version,
269             displayStyle, feedURL, entryURL, themeDisplay);
270     }
271 
272     public static void subscribeMessage(long messageId)
273         throws com.liferay.portal.PortalException,
274             com.liferay.portal.SystemException, java.rmi.RemoteException {
275         getService().subscribeMessage(messageId);
276     }
277 
278     public static void unsubscribeMessage(long messageId)
279         throws com.liferay.portal.PortalException,
280             com.liferay.portal.SystemException, java.rmi.RemoteException {
281         getService().unsubscribeMessage(messageId);
282     }
283 
284     public static com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
285         long groupId, java.lang.String className, long classPK, long messageId,
286         java.lang.String subject, java.lang.String body)
287         throws com.liferay.portal.PortalException,
288             com.liferay.portal.SystemException, java.rmi.RemoteException {
289         return getService()
290                    .updateDiscussionMessage(groupId, className, classPK,
291             messageId, subject, body);
292     }
293 
294     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
295         long messageId, java.lang.String subject, java.lang.String body,
296         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
297         java.util.List<String> existingFiles, double priority,
298         java.lang.String[] tagsEntries)
299         throws com.liferay.portal.PortalException,
300             com.liferay.portal.SystemException, java.rmi.RemoteException {
301         return getService()
302                    .updateMessage(messageId, subject, body, files,
303             existingFiles, priority, tagsEntries);
304     }
305 
306     public static com.liferay.portlet.messageboards.model.MBMessage updateMessage(
307         long messageId, java.lang.String subject, java.lang.String body,
308         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
309         java.util.List<String> existingFiles, double priority,
310         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
311         com.liferay.portal.theme.ThemeDisplay themeDisplay)
312         throws com.liferay.portal.PortalException,
313             com.liferay.portal.SystemException, java.rmi.RemoteException {
314         return getService()
315                    .updateMessage(messageId, subject, body, files,
316             existingFiles, priority, tagsEntries, prefs, themeDisplay);
317     }
318 
319     public static MBMessageService getService() {
320         if (_service == null) {
321             throw new RuntimeException("MBMessageService is not set");
322         }
323 
324         return _service;
325     }
326 
327     public void setService(MBMessageService service) {
328         _service = service;
329     }
330 
331     private static MBMessageService _service;
332 }