1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.messageboards.service;
24  
25  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="MBMessageLocalService.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This interface defines the service. The default implementation is
40   * <code>com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl</code>.
41   * Modify methods in that class and rerun ServiceBuilder to populate this class
42   * and all other generated classes.
43   * </p>
44   *
45   * <p>
46   * 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.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface MBMessageLocalService {
57      public com.liferay.portlet.messageboards.model.MBMessage addMBMessage(
58          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portlet.messageboards.model.MBMessage createMBMessage(
62          long messageId);
63  
64      public void deleteMBMessage(long messageId)
65          throws com.liferay.portal.SystemException,
66              com.liferay.portal.PortalException;
67  
68      public void deleteMBMessage(
69          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
70          throws com.liferay.portal.SystemException;
71  
72      public java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
74          throws com.liferay.portal.SystemException;
75  
76      public java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException;
79  
80      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81      public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
82          long messageId)
83          throws com.liferay.portal.SystemException,
84              com.liferay.portal.PortalException;
85  
86      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
88          int start, int end) throws com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public int getMBMessagesCount() throws com.liferay.portal.SystemException;
92  
93      public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
94          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
95          throws com.liferay.portal.SystemException;
96  
97      public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
98          long userId, java.lang.String userName, java.lang.String subject,
99          java.lang.String body)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException;
102 
103     public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
104         long userId, java.lang.String userName, long groupId,
105         java.lang.String className, long classPK, long threadId,
106         long parentMessageId, java.lang.String subject, java.lang.String body)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException;
109 
110     public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
111         long userId, java.lang.String userName, long groupId,
112         java.lang.String className, long classPK, long threadId,
113         long parentMessageId, java.lang.String subject, java.lang.String body,
114         com.liferay.portal.theme.ThemeDisplay themeDisplay)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException;
117 
118     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
119         long userId, java.lang.String userName, long categoryId,
120         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         javax.portlet.PortletPreferences prefs,
124         boolean addCommunityPermissions, boolean addGuestPermissions,
125         com.liferay.portal.theme.ThemeDisplay themeDisplay)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException;
128 
129     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
130         long userId, java.lang.String userName, long categoryId,
131         java.lang.String subject, java.lang.String body,
132         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
133         boolean anonymous, double priority, java.lang.String[] tagsEntries,
134         javax.portlet.PortletPreferences prefs,
135         java.lang.String[] communityPermissions,
136         java.lang.String[] guestPermissions,
137         com.liferay.portal.theme.ThemeDisplay themeDisplay)
138         throws com.liferay.portal.PortalException,
139             com.liferay.portal.SystemException;
140 
141     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
142         long userId, java.lang.String userName, long categoryId,
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         java.lang.Boolean addCommunityPermissions,
148         java.lang.Boolean addGuestPermissions,
149         java.lang.String[] communityPermissions,
150         java.lang.String[] guestPermissions,
151         com.liferay.portal.theme.ThemeDisplay themeDisplay)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException;
154 
155     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
156         long userId, java.lang.String userName, long categoryId, long threadId,
157         long parentMessageId, java.lang.String subject, java.lang.String body,
158         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
159         boolean anonymous, double priority, java.lang.String[] tagsEntries,
160         javax.portlet.PortletPreferences prefs,
161         boolean addCommunityPermissions, boolean addGuestPermissions,
162         com.liferay.portal.theme.ThemeDisplay themeDisplay)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException;
165 
166     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
167         long userId, java.lang.String userName, long categoryId, long threadId,
168         long parentMessageId, java.lang.String subject, java.lang.String body,
169         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
170         boolean anonymous, double priority, java.lang.String[] tagsEntries,
171         javax.portlet.PortletPreferences prefs,
172         java.lang.String[] communityPermissions,
173         java.lang.String[] guestPermissions,
174         com.liferay.portal.theme.ThemeDisplay themeDisplay)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException;
177 
178     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
179         java.lang.String uuid, long userId, java.lang.String userName,
180         long categoryId, long threadId, long parentMessageId,
181         java.lang.String subject, java.lang.String body,
182         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
183         boolean anonymous, double priority, java.lang.String[] tagsEntries,
184         javax.portlet.PortletPreferences prefs,
185         boolean addCommunityPermissions, boolean addGuestPermissions,
186         com.liferay.portal.theme.ThemeDisplay themeDisplay)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
191         java.lang.String uuid, long userId, java.lang.String userName,
192         long categoryId, long threadId, long parentMessageId,
193         java.lang.String subject, java.lang.String body,
194         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
195         boolean anonymous, double priority, java.lang.String[] tagsEntries,
196         javax.portlet.PortletPreferences prefs,
197         java.lang.Boolean addCommunityPermissions,
198         java.lang.Boolean addGuestPermissions,
199         java.lang.String[] communityPermissions,
200         java.lang.String[] guestPermissions,
201         com.liferay.portal.theme.ThemeDisplay themeDisplay)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException;
204 
205     public void addMessageResources(long categoryId, long messageId,
206         boolean addCommunityPermissions, boolean addGuestPermissions)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException;
209 
210     public void addMessageResources(long categoryId, java.lang.String topicId,
211         long messageId, boolean addCommunityPermissions,
212         boolean addGuestPermissions)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException;
215 
216     public void addMessageResources(
217         com.liferay.portlet.messageboards.model.MBCategory category,
218         com.liferay.portlet.messageboards.model.MBMessage message,
219         boolean addCommunityPermissions, boolean addGuestPermissions)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException;
222 
223     public void addMessageResources(long categoryId, long messageId,
224         java.lang.String[] communityPermissions,
225         java.lang.String[] guestPermissions)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException;
228 
229     public void addMessageResources(long categoryId, java.lang.String topicId,
230         long messageId, java.lang.String[] communityPermissions,
231         java.lang.String[] guestPermissions)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException;
234 
235     public void addMessageResources(
236         com.liferay.portlet.messageboards.model.MBCategory category,
237         com.liferay.portlet.messageboards.model.MBMessage message,
238         java.lang.String[] communityPermissions,
239         java.lang.String[] guestPermissions)
240         throws com.liferay.portal.PortalException,
241             com.liferay.portal.SystemException;
242 
243     public void deleteDiscussionMessage(long messageId)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException;
246 
247     public void deleteDiscussionMessages(java.lang.String className,
248         long classPK)
249         throws com.liferay.portal.PortalException,
250             com.liferay.portal.SystemException;
251 
252     public void deleteMessage(long messageId)
253         throws com.liferay.portal.PortalException,
254             com.liferay.portal.SystemException;
255 
256     public void deleteMessage(
257         com.liferay.portlet.messageboards.model.MBMessage message)
258         throws com.liferay.portal.PortalException,
259             com.liferay.portal.SystemException;
260 
261     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
263         long categoryId, int start, int end)
264         throws com.liferay.portal.SystemException;
265 
266     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
268         long categoryId, int start, int end,
269         com.liferay.portal.kernel.util.OrderByComparator obc)
270         throws com.liferay.portal.SystemException;
271 
272     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273     public int getCategoryMessagesCount(long categoryId)
274         throws com.liferay.portal.SystemException;
275 
276     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277     public int getCategoriesMessagesCount(java.util.List<Long> categoryIds)
278         throws com.liferay.portal.SystemException;
279 
280     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
282         long companyId, int start, int end)
283         throws com.liferay.portal.SystemException;
284 
285     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
286     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
287         long companyId, int start, int end,
288         com.liferay.portal.kernel.util.OrderByComparator obc)
289         throws com.liferay.portal.SystemException;
290 
291     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292     public int getCompanyMessagesCount(long companyId)
293         throws com.liferay.portal.SystemException;
294 
295     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
296     public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
297         long userId, java.lang.String className, long classPK)
298         throws com.liferay.portal.PortalException,
299             com.liferay.portal.SystemException;
300 
301     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302     public int getDiscussionMessagesCount(long classNameId, long classPK)
303         throws com.liferay.portal.SystemException;
304 
305     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
306     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
307         java.lang.String className) throws com.liferay.portal.SystemException;
308 
309     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
311         long groupId, int start, int end)
312         throws com.liferay.portal.SystemException;
313 
314     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
315     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
316         long groupId, int start, int end,
317         com.liferay.portal.kernel.util.OrderByComparator obc)
318         throws com.liferay.portal.SystemException;
319 
320     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
322         long groupId, long userId, int start, int end)
323         throws com.liferay.portal.SystemException;
324 
325     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
326     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
327         long groupId, long userId, int start, int end,
328         com.liferay.portal.kernel.util.OrderByComparator obc)
329         throws com.liferay.portal.SystemException;
330 
331     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
332     public int getGroupMessagesCount(long groupId)
333         throws com.liferay.portal.SystemException;
334 
335     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336     public int getGroupMessagesCount(long groupId, long userId)
337         throws com.liferay.portal.SystemException;
338 
339     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
340     public com.liferay.portlet.messageboards.model.MBMessage getMessage(
341         long messageId)
342         throws com.liferay.portal.PortalException,
343             com.liferay.portal.SystemException;
344 
345     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
346     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
347         java.lang.String className, long classPK)
348         throws com.liferay.portal.SystemException;
349 
350     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
351         long messageId)
352         throws com.liferay.portal.PortalException,
353             com.liferay.portal.SystemException;
354 
355     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
356         com.liferay.portlet.messageboards.model.MBMessage message)
357         throws com.liferay.portal.PortalException,
358             com.liferay.portal.SystemException;
359 
360     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
361     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
362         throws com.liferay.portal.SystemException;
363 
364     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
366         long threadId) throws com.liferay.portal.SystemException;
367 
368     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
370         long threadId,
371         java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
372         throws com.liferay.portal.SystemException;
373 
374     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
375     public int getThreadMessagesCount(long threadId)
376         throws com.liferay.portal.SystemException;
377 
378     public void subscribeMessage(long userId, long messageId)
379         throws com.liferay.portal.PortalException,
380             com.liferay.portal.SystemException;
381 
382     public void unsubscribeMessage(long userId, long messageId)
383         throws com.liferay.portal.PortalException,
384             com.liferay.portal.SystemException;
385 
386     public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
387         long userId, long messageId, java.lang.String subject,
388         java.lang.String body)
389         throws com.liferay.portal.PortalException,
390             com.liferay.portal.SystemException;
391 
392     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
393         long userId, long messageId, java.lang.String subject,
394         java.lang.String body,
395         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
396         java.util.List<String> existingFiles, double priority,
397         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
398         com.liferay.portal.theme.ThemeDisplay themeDisplay)
399         throws com.liferay.portal.PortalException,
400             com.liferay.portal.SystemException;
401 
402     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
403         long messageId, java.util.Date createDate, java.util.Date modifiedDate)
404         throws com.liferay.portal.PortalException,
405             com.liferay.portal.SystemException;
406 
407     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
408         long messageId, java.lang.String body)
409         throws com.liferay.portal.PortalException,
410             com.liferay.portal.SystemException;
411 
412     public void updateTagsAsset(long userId,
413         com.liferay.portlet.messageboards.model.MBMessage message,
414         java.lang.String[] tagsEntries)
415         throws com.liferay.portal.PortalException,
416             com.liferay.portal.SystemException;
417 }