1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.messageboards.service;
16  
17  import com.liferay.portal.kernel.annotation.Isolation;
18  import com.liferay.portal.kernel.annotation.Propagation;
19  import com.liferay.portal.kernel.annotation.Transactional;
20  import com.liferay.portal.kernel.exception.PortalException;
21  import com.liferay.portal.kernel.exception.SystemException;
22  
23  /**
24   * <a href="MBMessageLocalService.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 interface defines the service. The default implementation is
33   * {@link
34   * com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl}}.
35   * Modify methods in that class and rerun ServiceBuilder to populate this class
36   * and all other generated classes.
37   * </p>
38   *
39   * <p>
40   * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       MBMessageLocalServiceUtil
45   * @generated
46   */
47  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
48      PortalException.class, SystemException.class})
49  public interface MBMessageLocalService {
50      public com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
51          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
52          throws com.liferay.portal.kernel.exception.SystemException;
53  
54      public com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
55          long messageId);
56  
57      public void deleteMBMessage(long messageId)
58          throws com.liferay.portal.kernel.exception.PortalException,
59              com.liferay.portal.kernel.exception.SystemException;
60  
61      public void deleteMBMessage(
62          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
63          throws com.liferay.portal.kernel.exception.SystemException;
64  
65      @SuppressWarnings("unchecked")
66      public java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.kernel.exception.SystemException;
69  
70      @SuppressWarnings("unchecked")
71      public java.util.List dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73          int end) throws com.liferay.portal.kernel.exception.SystemException;
74  
75      @SuppressWarnings("unchecked")
76      public java.util.List dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end,
79          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
80          throws com.liferay.portal.kernel.exception.SystemException;
81  
82      public long dynamicQueryCount(
83          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
84          throws com.liferay.portal.kernel.exception.SystemException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
88          long messageId)
89          throws com.liferay.portal.kernel.exception.PortalException,
90              com.liferay.portal.kernel.exception.SystemException;
91  
92      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
93      public com.liferay.portlet.messageboards.model.MBMessage getMBMessageByUuidAndGroupId(
94          java.lang.String uuid, long groupId)
95          throws com.liferay.portal.kernel.exception.PortalException,
96              com.liferay.portal.kernel.exception.SystemException;
97  
98      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
99      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
100         int start, int end)
101         throws com.liferay.portal.kernel.exception.SystemException;
102 
103     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
104     public int getMBMessagesCount()
105         throws com.liferay.portal.kernel.exception.SystemException;
106 
107     public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
108         com.liferay.portlet.messageboards.model.MBMessage mbMessage)
109         throws com.liferay.portal.kernel.exception.SystemException;
110 
111     public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
112         com.liferay.portlet.messageboards.model.MBMessage mbMessage,
113         boolean merge)
114         throws com.liferay.portal.kernel.exception.SystemException;
115 
116     public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
117         long userId, java.lang.String userName, long groupId,
118         java.lang.String className, long classPK, int workflowAction)
119         throws com.liferay.portal.kernel.exception.PortalException,
120             com.liferay.portal.kernel.exception.SystemException;
121 
122     public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
123         java.lang.String uuid, long userId, java.lang.String userName,
124         long groupId, java.lang.String className, long classPK, long threadId,
125         long parentMessageId, java.lang.String subject, java.lang.String body,
126         com.liferay.portal.service.ServiceContext serviceContext)
127         throws com.liferay.portal.kernel.exception.PortalException,
128             com.liferay.portal.kernel.exception.SystemException;
129 
130     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
131         long userId, java.lang.String userName, long groupId, long categoryId,
132         java.lang.String subject, java.lang.String body,
133         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
134         boolean anonymous, double priority, boolean allowPingbacks,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException;
138 
139     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
140         long userId, java.lang.String userName, long groupId, long categoryId,
141         long threadId, long parentMessageId, java.lang.String subject,
142         java.lang.String body,
143         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
144         boolean anonymous, double priority, boolean allowPingbacks,
145         com.liferay.portal.service.ServiceContext serviceContext)
146         throws com.liferay.portal.kernel.exception.PortalException,
147             com.liferay.portal.kernel.exception.SystemException;
148 
149     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
150         java.lang.String uuid, long userId, java.lang.String userName,
151         long groupId, long categoryId, long threadId, long parentMessageId,
152         java.lang.String subject, java.lang.String body,
153         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
154         boolean anonymous, double priority, boolean allowPingbacks,
155         com.liferay.portal.service.ServiceContext serviceContext)
156         throws com.liferay.portal.kernel.exception.PortalException,
157             com.liferay.portal.kernel.exception.SystemException;
158 
159     public void addMessageResources(long messageId,
160         boolean addCommunityPermissions, boolean addGuestPermissions)
161         throws com.liferay.portal.kernel.exception.PortalException,
162             com.liferay.portal.kernel.exception.SystemException;
163 
164     public void addMessageResources(
165         com.liferay.portlet.messageboards.model.MBMessage message,
166         boolean addCommunityPermissions, boolean addGuestPermissions)
167         throws com.liferay.portal.kernel.exception.PortalException,
168             com.liferay.portal.kernel.exception.SystemException;
169 
170     public void addMessageResources(long messageId,
171         java.lang.String[] communityPermissions,
172         java.lang.String[] guestPermissions)
173         throws com.liferay.portal.kernel.exception.PortalException,
174             com.liferay.portal.kernel.exception.SystemException;
175 
176     public void addMessageResources(
177         com.liferay.portlet.messageboards.model.MBMessage message,
178         java.lang.String[] communityPermissions,
179         java.lang.String[] guestPermissions)
180         throws com.liferay.portal.kernel.exception.PortalException,
181             com.liferay.portal.kernel.exception.SystemException;
182 
183     public void deleteDiscussionMessage(long messageId)
184         throws com.liferay.portal.kernel.exception.PortalException,
185             com.liferay.portal.kernel.exception.SystemException;
186 
187     public void deleteDiscussionMessages(java.lang.String className,
188         long classPK)
189         throws com.liferay.portal.kernel.exception.PortalException,
190             com.liferay.portal.kernel.exception.SystemException;
191 
192     public void deleteMessage(long messageId)
193         throws com.liferay.portal.kernel.exception.PortalException,
194             com.liferay.portal.kernel.exception.SystemException;
195 
196     public void deleteMessage(
197         com.liferay.portlet.messageboards.model.MBMessage message)
198         throws com.liferay.portal.kernel.exception.PortalException,
199             com.liferay.portal.kernel.exception.SystemException;
200 
201     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
203         long groupId, long categoryId, int status, int start, int end)
204         throws com.liferay.portal.kernel.exception.SystemException;
205 
206     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
208         long groupId, long categoryId, int status, int start, int end,
209         com.liferay.portal.kernel.util.OrderByComparator obc)
210         throws com.liferay.portal.kernel.exception.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public int getCategoryMessagesCount(long groupId, long categoryId,
214         int status) throws com.liferay.portal.kernel.exception.SystemException;
215 
216     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
218         long companyId, int status, int start, int end)
219         throws com.liferay.portal.kernel.exception.SystemException;
220 
221     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
223         long companyId, int status, int start, int end,
224         com.liferay.portal.kernel.util.OrderByComparator obc)
225         throws com.liferay.portal.kernel.exception.SystemException;
226 
227     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228     public int getCompanyMessagesCount(long companyId, int status)
229         throws com.liferay.portal.kernel.exception.SystemException;
230 
231     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
232     public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
233         long userId, long groupId, java.lang.String className, long classPK,
234         int status)
235         throws com.liferay.portal.kernel.exception.PortalException,
236             com.liferay.portal.kernel.exception.SystemException;
237 
238     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239     public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
240         long userId, long groupId, java.lang.String className, long classPK,
241         int status, java.lang.String threadView)
242         throws com.liferay.portal.kernel.exception.PortalException,
243             com.liferay.portal.kernel.exception.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public int getDiscussionMessagesCount(long classNameId, long classPK,
247         int status) throws com.liferay.portal.kernel.exception.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public int getDiscussionMessagesCount(java.lang.String className,
251         long classPK, int status)
252         throws com.liferay.portal.kernel.exception.SystemException;
253 
254     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
256         java.lang.String className)
257         throws com.liferay.portal.kernel.exception.SystemException;
258 
259     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
261         long groupId, int status, int start, int end)
262         throws com.liferay.portal.kernel.exception.SystemException;
263 
264     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
266         long groupId, int status, int start, int end,
267         com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.kernel.exception.SystemException;
269 
270     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
272         long groupId, long userId, int status, int start, int end)
273         throws com.liferay.portal.kernel.exception.SystemException;
274 
275     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
277         long groupId, long userId, int status, int start, int end,
278         com.liferay.portal.kernel.util.OrderByComparator obc)
279         throws com.liferay.portal.kernel.exception.SystemException;
280 
281     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282     public int getGroupMessagesCount(long groupId, int status)
283         throws com.liferay.portal.kernel.exception.SystemException;
284 
285     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286     public int getGroupMessagesCount(long groupId, long userId, int status)
287         throws com.liferay.portal.kernel.exception.SystemException;
288 
289     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
290     public com.liferay.portlet.messageboards.model.MBMessage getMessage(
291         long messageId)
292         throws com.liferay.portal.kernel.exception.PortalException,
293             com.liferay.portal.kernel.exception.SystemException;
294 
295     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
297         java.lang.String className, long classPK, int status)
298         throws com.liferay.portal.kernel.exception.SystemException;
299 
300     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
302         long messageId, int status, java.lang.String threadView,
303         boolean includePrevAndNext)
304         throws com.liferay.portal.kernel.exception.PortalException,
305             com.liferay.portal.kernel.exception.SystemException;
306 
307     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
309         com.liferay.portlet.messageboards.model.MBMessage message, int status,
310         java.lang.String threadView, boolean includePrevAndNext)
311         throws com.liferay.portal.kernel.exception.PortalException,
312             com.liferay.portal.kernel.exception.SystemException;
313 
314     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
316         throws com.liferay.portal.kernel.exception.SystemException;
317 
318     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319     public int getPositionInThread(long messageId)
320         throws com.liferay.portal.kernel.exception.PortalException,
321             com.liferay.portal.kernel.exception.SystemException;
322 
323     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
324     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
325         long threadId, int status)
326         throws com.liferay.portal.kernel.exception.SystemException;
327 
328     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
329     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
330         long threadId, int status,
331         java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
332         throws com.liferay.portal.kernel.exception.SystemException;
333 
334     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
335     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
336         long threadId, int status, int start, int end)
337         throws com.liferay.portal.kernel.exception.SystemException;
338 
339     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340     public int getThreadMessagesCount(long threadId, int status)
341         throws com.liferay.portal.kernel.exception.SystemException;
342 
343     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
345         long threadId, int status, int start, int end)
346         throws com.liferay.portal.kernel.exception.SystemException;
347 
348     public void subscribeMessage(long userId, long messageId)
349         throws com.liferay.portal.kernel.exception.PortalException,
350             com.liferay.portal.kernel.exception.SystemException;
351 
352     public void unsubscribeMessage(long userId, long messageId)
353         throws com.liferay.portal.kernel.exception.PortalException,
354             com.liferay.portal.kernel.exception.SystemException;
355 
356     public void updateAsset(long userId,
357         com.liferay.portlet.messageboards.model.MBMessage message,
358         long[] assetCategoryIds, java.lang.String[] assetTagNames)
359         throws com.liferay.portal.kernel.exception.PortalException,
360             com.liferay.portal.kernel.exception.SystemException;
361 
362     public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
363         long userId, long messageId, java.lang.String subject,
364         java.lang.String body, int workflowAction)
365         throws com.liferay.portal.kernel.exception.PortalException,
366             com.liferay.portal.kernel.exception.SystemException;
367 
368     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
369         long userId, long messageId, java.lang.String subject,
370         java.lang.String body,
371         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<java.lang.String, byte[]>> files,
372         java.util.List<java.lang.String> existingFiles, double priority,
373         boolean allowPingbacks,
374         com.liferay.portal.service.ServiceContext serviceContext)
375         throws com.liferay.portal.kernel.exception.PortalException,
376             com.liferay.portal.kernel.exception.SystemException;
377 
378     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
379         long messageId, java.lang.String body)
380         throws com.liferay.portal.kernel.exception.PortalException,
381             com.liferay.portal.kernel.exception.SystemException;
382 
383     public void updateUserName(long userId, java.lang.String userName)
384         throws com.liferay.portal.kernel.exception.SystemException;
385 
386     public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
387         long userId, long messageId, int status,
388         com.liferay.portal.service.ServiceContext serviceContext)
389         throws com.liferay.portal.kernel.exception.PortalException,
390             com.liferay.portal.kernel.exception.SystemException;
391 }