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="MBMessageService.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.MBMessageServiceImpl</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 remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portlet.messageboards.service.MBMessageServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface MBMessageService {
57      public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
58          long groupId, java.lang.String className, long classPK, long threadId,
59          long parentMessageId, java.lang.String subject, java.lang.String body,
60          com.liferay.portal.theme.ThemeDisplay themeDisplay)
61          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException;
63  
64      public com.liferay.portlet.messageboards.model.MBMessage addMessage(
65          long categoryId, java.lang.String subject, java.lang.String body,
66          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
67          boolean anonymous, double priority, java.lang.String[] tagsEntries,
68          boolean addCommunityPermissions, boolean addGuestPermissions)
69          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
70              com.liferay.portal.SystemException;
71  
72      public com.liferay.portlet.messageboards.model.MBMessage addMessage(
73          long categoryId, java.lang.String subject, java.lang.String body,
74          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
75          boolean anonymous, double priority, java.lang.String[] tagsEntries,
76          java.lang.String[] communityPermissions,
77          java.lang.String[] guestPermissions)
78          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException;
80  
81      public 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 java.rmi.RemoteException, com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException;
90  
91      public com.liferay.portlet.messageboards.model.MBMessage addMessage(
92          long categoryId, java.lang.String subject, java.lang.String body,
93          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
94          boolean anonymous, double priority, java.lang.String[] tagsEntries,
95          javax.portlet.PortletPreferences prefs,
96          java.lang.String[] communityPermissions,
97          java.lang.String[] guestPermissions,
98          com.liferay.portal.theme.ThemeDisplay themeDisplay)
99          throws java.rmi.RemoteException, com.liferay.portal.PortalException,
100             com.liferay.portal.SystemException;
101 
102     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
103         long categoryId, long threadId, long parentMessageId,
104         java.lang.String subject, java.lang.String body,
105         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
106         boolean anonymous, double priority, java.lang.String[] tagsEntries,
107         boolean addCommunityPermissions, boolean addGuestPermissions)
108         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
112         long categoryId, long threadId, long parentMessageId,
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, java.lang.String[] tagsEntries,
116         java.lang.String[] communityPermissions,
117         java.lang.String[] guestPermissions)
118         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException;
120 
121     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
122         long categoryId, long threadId, long parentMessageId,
123         java.lang.String subject, java.lang.String body,
124         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
125         boolean anonymous, double priority, java.lang.String[] tagsEntries,
126         javax.portlet.PortletPreferences prefs,
127         boolean addCommunityPermissions, boolean addGuestPermissions,
128         com.liferay.portal.theme.ThemeDisplay themeDisplay)
129         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException;
131 
132     public com.liferay.portlet.messageboards.model.MBMessage addMessage(
133         long categoryId, long threadId, long parentMessageId,
134         java.lang.String subject, java.lang.String body,
135         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
136         boolean anonymous, double priority, java.lang.String[] tagsEntries,
137         javax.portlet.PortletPreferences prefs,
138         java.lang.String[] communityPermissions,
139         java.lang.String[] guestPermissions,
140         com.liferay.portal.theme.ThemeDisplay themeDisplay)
141         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException;
143 
144     public void deleteDiscussionMessage(long groupId,
145         java.lang.String className, long classPK, long messageId)
146         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException;
148 
149     public void deleteMessage(long messageId)
150         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
155         long categoryId, int start, int end)
156         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public int getCategoryMessagesCount(long categoryId)
161         throws java.rmi.RemoteException, com.liferay.portal.SystemException;
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.lang.String getCategoryMessagesRSS(long categoryId, int max,
165         java.lang.String type, double version, java.lang.String displayStyle,
166         java.lang.String feedURL, java.lang.String entryURL,
167         com.liferay.portal.theme.ThemeDisplay themeDisplay)
168         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public java.lang.String getCompanyMessagesRSS(long companyId, int max,
173         java.lang.String type, double version, java.lang.String displayStyle,
174         java.lang.String feedURL, java.lang.String entryURL,
175         com.liferay.portal.theme.ThemeDisplay themeDisplay)
176         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public java.lang.String getGroupMessagesRSS(long groupId, int max,
181         java.lang.String type, double version, java.lang.String displayStyle,
182         java.lang.String feedURL, java.lang.String entryURL,
183         com.liferay.portal.theme.ThemeDisplay themeDisplay)
184         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException;
186 
187     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
188     public java.lang.String getGroupMessagesRSS(long groupId, long userId,
189         int max, java.lang.String type, double version,
190         java.lang.String displayStyle, java.lang.String feedURL,
191         java.lang.String entryURL,
192         com.liferay.portal.theme.ThemeDisplay themeDisplay)
193         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException;
195 
196     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197     public com.liferay.portlet.messageboards.model.MBMessage getMessage(
198         long messageId)
199         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException;
201 
202     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
203         long messageId)
204         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public java.lang.String getThreadMessagesRSS(long threadId, int max,
209         java.lang.String type, double version, java.lang.String displayStyle,
210         java.lang.String feedURL, java.lang.String entryURL,
211         com.liferay.portal.theme.ThemeDisplay themeDisplay)
212         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException;
214 
215     public void subscribeMessage(long messageId)
216         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException;
218 
219     public void unsubscribeMessage(long messageId)
220         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException;
222 
223     public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
224         long groupId, java.lang.String className, long classPK, long messageId,
225         java.lang.String subject, java.lang.String body)
226         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException;
228 
229     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
230         long messageId, java.lang.String subject, java.lang.String body,
231         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
232         java.util.List<String> existingFiles, double priority,
233         java.lang.String[] tagsEntries)
234         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException;
236 
237     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
238         long messageId, java.lang.String subject, java.lang.String body,
239         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
240         java.util.List<String> existingFiles, double priority,
241         java.lang.String[] tagsEntries, javax.portlet.PortletPreferences prefs,
242         com.liferay.portal.theme.ThemeDisplay themeDisplay)
243         throws java.rmi.RemoteException, com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException;
245 }