1   /**
2    * Copyright (c) 2000-2009 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, 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.PortalException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
112         long userId, java.lang.String userName, 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,
116         com.liferay.portal.service.ServiceContext serviceContext)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException;
119 
120     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
121         long userId, java.lang.String userName, long categoryId, long threadId,
122         long parentMessageId, java.lang.String subject, java.lang.String body,
123         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
124         boolean anonymous, double priority,
125         com.liferay.portal.service.ServiceContext serviceContext)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException;
128 
129     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
130         java.lang.String uuid, long userId, java.lang.String userName,
131         long categoryId, long threadId, long parentMessageId,
132         java.lang.String subject, java.lang.String body,
133         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
134         boolean anonymous, double priority,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException;
138 
139     public void addMessageResources(long categoryId, long messageId,
140         boolean addCommunityPermissions, boolean addGuestPermissions)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException;
143 
144     public void addMessageResources(long categoryId, java.lang.String topicId,
145         long messageId, boolean addCommunityPermissions,
146         boolean addGuestPermissions)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException;
149 
150     public void addMessageResources(
151         com.liferay.portlet.messageboards.model.MBCategory category,
152         com.liferay.portlet.messageboards.model.MBMessage message,
153         boolean addCommunityPermissions, boolean addGuestPermissions)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException;
156 
157     public void addMessageResources(long categoryId, long messageId,
158         java.lang.String[] communityPermissions,
159         java.lang.String[] guestPermissions)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException;
162 
163     public void addMessageResources(long categoryId, java.lang.String topicId,
164         long messageId, java.lang.String[] communityPermissions,
165         java.lang.String[] guestPermissions)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException;
168 
169     public void addMessageResources(
170         com.liferay.portlet.messageboards.model.MBCategory category,
171         com.liferay.portlet.messageboards.model.MBMessage message,
172         java.lang.String[] communityPermissions,
173         java.lang.String[] guestPermissions)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException;
176 
177     public void deleteDiscussionMessage(long messageId)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException;
180 
181     public void deleteDiscussionMessages(java.lang.String className,
182         long classPK)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException;
185 
186     public void deleteMessage(long messageId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     public void deleteMessage(
191         com.liferay.portlet.messageboards.model.MBMessage message)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException;
194 
195     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
197         long categoryId, int start, int end)
198         throws com.liferay.portal.SystemException;
199 
200     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
201     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
202         long categoryId, int start, int end,
203         com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException;
205 
206     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207     public int getCategoryMessagesCount(long categoryId)
208         throws com.liferay.portal.SystemException;
209 
210     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211     public int getCategoriesMessagesCount(java.util.List<Long> categoryIds)
212         throws com.liferay.portal.SystemException;
213 
214     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
216         long companyId, int start, int end)
217         throws com.liferay.portal.SystemException;
218 
219     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCompanyMessages(
221         long companyId, int start, int end,
222         com.liferay.portal.kernel.util.OrderByComparator obc)
223         throws com.liferay.portal.SystemException;
224 
225     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226     public int getCompanyMessagesCount(long companyId)
227         throws com.liferay.portal.SystemException;
228 
229     public com.liferay.portlet.messageboards.model.MBMessageDisplay getDiscussionMessageDisplay(
230         long userId, java.lang.String className, long classPK)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException;
233 
234     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235     public int getDiscussionMessagesCount(long classNameId, long classPK)
236         throws com.liferay.portal.SystemException;
237 
238     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239     public java.util.List<com.liferay.portlet.messageboards.model.MBDiscussion> getDiscussions(
240         java.lang.String className) throws com.liferay.portal.SystemException;
241 
242     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
244         long groupId, int start, int end)
245         throws com.liferay.portal.SystemException;
246 
247     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
249         long groupId, int start, int end,
250         com.liferay.portal.kernel.util.OrderByComparator obc)
251         throws com.liferay.portal.SystemException;
252 
253     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
255         long groupId, long userId, int start, int end)
256         throws com.liferay.portal.SystemException;
257 
258     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getGroupMessages(
260         long groupId, long userId, int start, int end,
261         com.liferay.portal.kernel.util.OrderByComparator obc)
262         throws com.liferay.portal.SystemException;
263 
264     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265     public int getGroupMessagesCount(long groupId)
266         throws com.liferay.portal.SystemException;
267 
268     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269     public int getGroupMessagesCount(long groupId, long userId)
270         throws com.liferay.portal.SystemException;
271 
272     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273     public com.liferay.portlet.messageboards.model.MBMessage getMessage(
274         long messageId)
275         throws com.liferay.portal.PortalException,
276             com.liferay.portal.SystemException;
277 
278     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getMessages(
280         java.lang.String className, long classPK)
281         throws com.liferay.portal.SystemException;
282 
283     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
284         long messageId)
285         throws com.liferay.portal.PortalException,
286             com.liferay.portal.SystemException;
287 
288     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
289         com.liferay.portlet.messageboards.model.MBMessage message)
290         throws com.liferay.portal.PortalException,
291             com.liferay.portal.SystemException;
292 
293     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getNoAssetMessages()
295         throws com.liferay.portal.SystemException;
296 
297     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
299         long threadId) throws com.liferay.portal.SystemException;
300 
301     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getThreadMessages(
303         long threadId,
304         java.util.Comparator<com.liferay.portlet.messageboards.model.MBMessage> comparator)
305         throws com.liferay.portal.SystemException;
306 
307     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308     public int getThreadMessagesCount(long threadId)
309         throws com.liferay.portal.SystemException;
310 
311     public void reIndex(long messageId)
312         throws com.liferay.portal.SystemException;
313 
314     public void subscribeMessage(long userId, long messageId)
315         throws com.liferay.portal.PortalException,
316             com.liferay.portal.SystemException;
317 
318     public void unsubscribeMessage(long userId, long messageId)
319         throws com.liferay.portal.PortalException,
320             com.liferay.portal.SystemException;
321 
322     public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
323         long userId, long messageId, java.lang.String subject,
324         java.lang.String body)
325         throws com.liferay.portal.PortalException,
326             com.liferay.portal.SystemException;
327 
328     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
329         long userId, long messageId, java.lang.String subject,
330         java.lang.String body,
331         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
332         java.util.List<String> existingFiles, double priority,
333         com.liferay.portal.service.ServiceContext serviceContext)
334         throws com.liferay.portal.PortalException,
335             com.liferay.portal.SystemException;
336 
337     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
338         long messageId, java.util.Date createDate, java.util.Date modifiedDate)
339         throws com.liferay.portal.PortalException,
340             com.liferay.portal.SystemException;
341 
342     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
343         long messageId, java.lang.String body)
344         throws com.liferay.portal.PortalException,
345             com.liferay.portal.SystemException;
346 
347     public void updateTagsAsset(long userId,
348         com.liferay.portlet.messageboards.model.MBMessage message,
349         java.lang.String[] tagsEntries)
350         throws com.liferay.portal.PortalException,
351             com.liferay.portal.SystemException;
352 }