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      public java.util.List<Object> dynamicQuery(
66          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
67          throws com.liferay.portal.kernel.exception.SystemException;
68  
69      public java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException;
72  
73      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
74      public com.liferay.portlet.messageboards.model.MBMessage getMBMessage(
75          long messageId)
76          throws com.liferay.portal.kernel.exception.PortalException,
77              com.liferay.portal.kernel.exception.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMBMessages(
81          int start, int end)
82          throws com.liferay.portal.kernel.exception.SystemException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public int getMBMessagesCount()
86          throws com.liferay.portal.kernel.exception.SystemException;
87  
88      public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
89          com.liferay.portlet.messageboards.model.MBMessage mbMessage)
90          throws com.liferay.portal.kernel.exception.SystemException;
91  
92      public com.liferay.portlet.messageboards.model.MBMessage updateMBMessage(
93          com.liferay.portlet.messageboards.model.MBMessage mbMessage,
94          boolean merge)
95          throws com.liferay.portal.kernel.exception.SystemException;
96  
97      public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
98          long userId, java.lang.String userName, java.lang.String className,
99          long classPK, int status)
100         throws com.liferay.portal.kernel.exception.PortalException,
101             com.liferay.portal.kernel.exception.SystemException;
102 
103     public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
104         long userId, java.lang.String userName, java.lang.String className,
105         long classPK, long threadId, long parentMessageId,
106         java.lang.String subject, java.lang.String body,
107         com.liferay.portal.service.ServiceContext serviceContext)
108         throws com.liferay.portal.kernel.exception.PortalException,
109             com.liferay.portal.kernel.exception.SystemException;
110 
111     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
112         long userId, java.lang.String userName, long groupId, long categoryId,
113         java.lang.String subject, java.lang.String body,
114         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
115         boolean anonymous, double priority, boolean allowPingbacks,
116         com.liferay.portal.service.ServiceContext serviceContext)
117         throws com.liferay.portal.kernel.exception.PortalException,
118             com.liferay.portal.kernel.exception.SystemException;
119 
120     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
121         long userId, java.lang.String userName, long groupId, long categoryId,
122         long threadId, long parentMessageId, java.lang.String subject,
123         java.lang.String body,
124         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
125         boolean anonymous, double priority, boolean allowPingbacks,
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         java.lang.String uuid, long userId, java.lang.String userName,
132         long groupId, long categoryId, long threadId, long parentMessageId,
133         java.lang.String subject, java.lang.String body,
134         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
135         boolean anonymous, double priority, boolean allowPingbacks,
136         com.liferay.portal.service.ServiceContext serviceContext)
137         throws com.liferay.portal.kernel.exception.PortalException,
138             com.liferay.portal.kernel.exception.SystemException;
139 
140     public void addMessageResources(long messageId,
141         boolean addCommunityPermissions, boolean addGuestPermissions)
142         throws com.liferay.portal.kernel.exception.PortalException,
143             com.liferay.portal.kernel.exception.SystemException;
144 
145     public void addMessageResources(
146         com.liferay.portlet.messageboards.model.MBMessage message,
147         boolean addCommunityPermissions, boolean addGuestPermissions)
148         throws com.liferay.portal.kernel.exception.PortalException,
149             com.liferay.portal.kernel.exception.SystemException;
150 
151     public void addMessageResources(long messageId,
152         java.lang.String[] communityPermissions,
153         java.lang.String[] guestPermissions)
154         throws com.liferay.portal.kernel.exception.PortalException,
155             com.liferay.portal.kernel.exception.SystemException;
156 
157     public void addMessageResources(
158         com.liferay.portlet.messageboards.model.MBMessage message,
159         java.lang.String[] communityPermissions,
160         java.lang.String[] guestPermissions)
161         throws com.liferay.portal.kernel.exception.PortalException,
162             com.liferay.portal.kernel.exception.SystemException;
163 
164     public void deleteDiscussionMessage(long messageId)
165         throws com.liferay.portal.kernel.exception.PortalException,
166             com.liferay.portal.kernel.exception.SystemException;
167 
168     public void deleteDiscussionMessages(java.lang.String className,
169         long classPK)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException;
172 
173     public void deleteMessage(long messageId)
174         throws com.liferay.portal.kernel.exception.PortalException,
175             com.liferay.portal.kernel.exception.SystemException;
176 
177     public void deleteMessage(
178         com.liferay.portlet.messageboards.model.MBMessage message)
179         throws com.liferay.portal.kernel.exception.PortalException,
180             com.liferay.portal.kernel.exception.SystemException;
181 
182     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
184         long groupId, long categoryId, int status, int start, int end)
185         throws com.liferay.portal.kernel.exception.SystemException;
186 
187     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
189         long groupId, long categoryId, int status, int start, int end,
190         com.liferay.portal.kernel.util.OrderByComparator obc)
191         throws com.liferay.portal.kernel.exception.SystemException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public int getCategoryMessagesCount(long groupId, long categoryId,
195         int status) throws com.liferay.portal.kernel.exception.SystemException;
196 
197     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
199         long companyId, int status, int start, int end)
200         throws com.liferay.portal.kernel.exception.SystemException;
201 
202     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
204         long companyId, int status, int start, int end,
205         com.liferay.portal.kernel.util.OrderByComparator obc)
206         throws com.liferay.portal.kernel.exception.SystemException;
207 
208     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209     public int getCompanyMessagesCount(long companyId, int status)
210         throws com.liferay.portal.kernel.exception.SystemException;
211 
212     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
213     public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
214         long userId, java.lang.String className, long classPK, int status)
215         throws com.liferay.portal.kernel.exception.PortalException,
216             com.liferay.portal.kernel.exception.SystemException;
217 
218     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219     public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
220         long userId, java.lang.String className, long classPK, int status,
221         java.lang.String threadView)
222         throws com.liferay.portal.kernel.exception.PortalException,
223             com.liferay.portal.kernel.exception.SystemException;
224 
225     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226     public int getDiscussionMessagesCount(long classNameId, long classPK,
227         int status) throws com.liferay.portal.kernel.exception.SystemException;
228 
229     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
231         java.lang.String className)
232         throws com.liferay.portal.kernel.exception.SystemException;
233 
234     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
236         long groupId, int status, int start, int end)
237         throws com.liferay.portal.kernel.exception.SystemException;
238 
239     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
241         long groupId, int status, int start, int end,
242         com.liferay.portal.kernel.util.OrderByComparator obc)
243         throws com.liferay.portal.kernel.exception.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
247         long groupId, long userId, int status, int start, int end)
248         throws com.liferay.portal.kernel.exception.SystemException;
249 
250     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
252         long groupId, long userId, int status, int start, int end,
253         com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.kernel.exception.SystemException;
255 
256     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257     public int getGroupMessagesCount(long groupId, int status)
258         throws com.liferay.portal.kernel.exception.SystemException;
259 
260     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261     public int getGroupMessagesCount(long groupId, long userId, int status)
262         throws com.liferay.portal.kernel.exception.SystemException;
263 
264     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265     public com.liferay.portlet.messageboards.model.MBMessage getMessage(
266         long messageId)
267         throws com.liferay.portal.kernel.exception.PortalException,
268             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> getMessages(
272         java.lang.String className, long classPK, int status)
273         throws com.liferay.portal.kernel.exception.SystemException;
274 
275     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
277         long messageId, int status, java.lang.String threadView)
278         throws com.liferay.portal.kernel.exception.PortalException,
279             com.liferay.portal.kernel.exception.SystemException;
280 
281     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
283         com.liferay.portlet.messageboards.model.MBMessage message, int status,
284         java.lang.String threadView)
285         throws com.liferay.portal.kernel.exception.PortalException,
286             com.liferay.portal.kernel.exception.SystemException;
287 
288     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
290         throws com.liferay.portal.kernel.exception.SystemException;
291 
292     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293     public int getPositionInThread(long messageId)
294         throws com.liferay.portal.kernel.exception.PortalException,
295             com.liferay.portal.kernel.exception.SystemException;
296 
297     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
299         long threadId, int status)
300         throws com.liferay.portal.kernel.exception.SystemException;
301 
302     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
303     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
304         long threadId, int status,
305         java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
306         throws com.liferay.portal.kernel.exception.SystemException;
307 
308     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
310         long threadId, int status, int start, int end)
311         throws com.liferay.portal.kernel.exception.SystemException;
312 
313     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
314     public int getThreadMessagesCount(long threadId, int status)
315         throws com.liferay.portal.kernel.exception.SystemException;
316 
317     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadRepliesMessages(
319         long threadId, int status, int start, int end)
320         throws com.liferay.portal.kernel.exception.SystemException;
321 
322     public void subscribeMessage(long userId, long messageId)
323         throws com.liferay.portal.kernel.exception.PortalException,
324             com.liferay.portal.kernel.exception.SystemException;
325 
326     public void unsubscribeMessage(long userId, long messageId)
327         throws com.liferay.portal.kernel.exception.PortalException,
328             com.liferay.portal.kernel.exception.SystemException;
329 
330     public void updateAsset(long userId,
331         com.liferay.portlet.messageboards.model.MBMessage message,
332         long[] assetCategoryIds, java.lang.String[] assetTagNames)
333         throws com.liferay.portal.kernel.exception.PortalException,
334             com.liferay.portal.kernel.exception.SystemException;
335 
336     public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
337         long userId, long messageId, java.lang.String subject,
338         java.lang.String body, int status)
339         throws com.liferay.portal.kernel.exception.PortalException,
340             com.liferay.portal.kernel.exception.SystemException;
341 
342     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
343         long userId, long messageId, java.lang.String subject,
344         java.lang.String body,
345         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
346         java.util.List<String> existingFiles, double priority,
347         boolean allowPingbacks,
348         com.liferay.portal.service.ServiceContext serviceContext)
349         throws com.liferay.portal.kernel.exception.PortalException,
350             com.liferay.portal.kernel.exception.SystemException;
351 
352     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
353         long messageId, java.util.Date createDate, java.util.Date modifiedDate)
354         throws com.liferay.portal.kernel.exception.PortalException,
355             com.liferay.portal.kernel.exception.SystemException;
356 
357     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
358         long messageId, java.lang.String body)
359         throws com.liferay.portal.kernel.exception.PortalException,
360             com.liferay.portal.kernel.exception.SystemException;
361 
362     public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
363         long userId, com.liferay.portlet.messageboards.model.MBMessage message,
364         com.liferay.portal.service.ServiceContext serviceContext,
365         boolean reindex)
366         throws com.liferay.portal.kernel.exception.PortalException,
367             com.liferay.portal.kernel.exception.SystemException;
368 
369     public com.liferay.portlet.messageboards.model.MBMessage updateStatus(
370         long userId, long messageId,
371         com.liferay.portal.service.ServiceContext serviceContext)
372         throws com.liferay.portal.kernel.exception.PortalException,
373             com.liferay.portal.kernel.exception.SystemException;
374 }