1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.messageboards.service;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Isolation;
25  import com.liferay.portal.kernel.annotation.Propagation;
26  import com.liferay.portal.kernel.annotation.Transactional;
27  
28  /**
29   * <a href="MBMessageService.java.html"><b><i>View Source</i></b></a>
30   *
31   * <p>
32   * ServiceBuilder generated this class. Modifications in this class will be
33   * overwritten the next time is generated.
34   * </p>
35   *
36   * <p>
37   * This interface defines the service. The default implementation is
38   * <code>com.liferay.portlet.messageboards.service.impl.MBMessageServiceImpl</code>.
39   * Modify methods in that class and rerun ServiceBuilder to populate this class
40   * and all other generated classes.
41   * </p>
42   *
43   * <p>
44   * 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.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.messageboards.service.MBMessageServiceUtil
50   *
51   */
52  @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
53      PortalException.class, SystemException.class})
54  public interface MBMessageService {
55      public com.liferay.portlet.messageboards.model.MBMessage addDiscussionMessage(
56          java.lang.String className, long classPK, long threadId,
57          long parentMessageId, java.lang.String subject, java.lang.String body,
58          com.liferay.portal.service.ServiceContext serviceContext)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException;
61  
62      public com.liferay.portlet.messageboards.model.MBMessage addMessage(
63          long categoryId, java.lang.String subject, java.lang.String body,
64          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
65          boolean anonymous, double priority,
66          com.liferay.portal.service.ServiceContext serviceContext)
67          throws com.liferay.portal.PortalException,
68              com.liferay.portal.SystemException;
69  
70      public com.liferay.portlet.messageboards.model.MBMessage addMessage(
71          long categoryId, long threadId, long parentMessageId,
72          java.lang.String subject, java.lang.String body,
73          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
74          boolean anonymous, double priority,
75          com.liferay.portal.service.ServiceContext serviceContext)
76          throws com.liferay.portal.PortalException,
77              com.liferay.portal.SystemException;
78  
79      public void deleteDiscussionMessage(long groupId,
80          java.lang.String className, long classPK, long messageId)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException;
83  
84      public void deleteMessage(long messageId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
90          long categoryId, int start, int end)
91          throws com.liferay.portal.PortalException,
92              com.liferay.portal.SystemException;
93  
94      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
95      public int getCategoryMessagesCount(long categoryId)
96          throws com.liferay.portal.SystemException;
97  
98      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
99      public java.lang.String getCategoryMessagesRSS(long categoryId, int max,
100         java.lang.String type, double version, java.lang.String displayStyle,
101         java.lang.String feedURL, java.lang.String entryURL,
102         com.liferay.portal.theme.ThemeDisplay themeDisplay)
103         throws com.liferay.portal.PortalException,
104             com.liferay.portal.SystemException;
105 
106     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
107     public java.lang.String getCompanyMessagesRSS(long companyId, int max,
108         java.lang.String type, double version, java.lang.String displayStyle,
109         java.lang.String feedURL, java.lang.String entryURL,
110         com.liferay.portal.theme.ThemeDisplay themeDisplay)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException;
113 
114     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115     public java.lang.String getGroupMessagesRSS(long groupId, int max,
116         java.lang.String type, double version, java.lang.String displayStyle,
117         java.lang.String feedURL, java.lang.String entryURL,
118         com.liferay.portal.theme.ThemeDisplay themeDisplay)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public java.lang.String getGroupMessagesRSS(long groupId, long userId,
124         int max, java.lang.String type, double version,
125         java.lang.String displayStyle, java.lang.String feedURL,
126         java.lang.String entryURL,
127         com.liferay.portal.theme.ThemeDisplay themeDisplay)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public com.liferay.portlet.messageboards.model.MBMessage getMessage(
133         long messageId)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
139         long messageId, java.lang.String threadView)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public java.lang.String getThreadMessagesRSS(long threadId, int max,
145         java.lang.String type, double version, java.lang.String displayStyle,
146         java.lang.String feedURL, java.lang.String entryURL,
147         com.liferay.portal.theme.ThemeDisplay themeDisplay)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException;
150 
151     public void subscribeMessage(long messageId)
152         throws com.liferay.portal.PortalException,
153             com.liferay.portal.SystemException;
154 
155     public void unsubscribeMessage(long messageId)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException;
158 
159     public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
160         java.lang.String className, long classPK, long messageId,
161         java.lang.String subject, java.lang.String body,
162         com.liferay.portal.service.ServiceContext serviceContext)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException;
165 
166     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
167         long messageId, java.lang.String subject, java.lang.String body,
168         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
169         java.util.List<String> existingFiles, double priority,
170         com.liferay.portal.service.ServiceContext serviceContext)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException;
173 }