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="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          java.lang.String className, long classPK, long threadId,
59          long parentMessageId, java.lang.String subject, java.lang.String body,
60          com.liferay.portal.service.ServiceContext serviceContext)
61          throws 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,
68          com.liferay.portal.service.ServiceContext serviceContext)
69          throws com.liferay.portal.PortalException,
70              com.liferay.portal.SystemException;
71  
72      public com.liferay.portlet.messageboards.model.MBMessage addMessage(
73          long categoryId, long threadId, long parentMessageId,
74          java.lang.String subject, java.lang.String body,
75          java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
76          boolean anonymous, double priority,
77          com.liferay.portal.service.ServiceContext serviceContext)
78          throws com.liferay.portal.PortalException,
79              com.liferay.portal.SystemException;
80  
81      public void deleteDiscussionMessage(long groupId,
82          java.lang.String className, long classPK, long messageId)
83          throws com.liferay.portal.PortalException,
84              com.liferay.portal.SystemException;
85  
86      public void deleteMessage(long messageId)
87          throws com.liferay.portal.PortalException,
88              com.liferay.portal.SystemException;
89  
90      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
91      public java.util.List<com.liferay.portlet.messageboards.model.MBMessage> getCategoryMessages(
92          long categoryId, int start, int end)
93          throws com.liferay.portal.PortalException,
94              com.liferay.portal.SystemException;
95  
96      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
97      public int getCategoryMessagesCount(long categoryId)
98          throws com.liferay.portal.SystemException;
99  
100     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
101     public java.lang.String getCategoryMessagesRSS(long categoryId, int max,
102         java.lang.String type, double version, java.lang.String displayStyle,
103         java.lang.String feedURL, java.lang.String entryURL,
104         com.liferay.portal.theme.ThemeDisplay themeDisplay)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException;
107 
108     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
109     public java.lang.String getCompanyMessagesRSS(long companyId, int max,
110         java.lang.String type, double version, java.lang.String displayStyle,
111         java.lang.String feedURL, java.lang.String entryURL,
112         com.liferay.portal.theme.ThemeDisplay themeDisplay)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException;
115 
116     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117     public java.lang.String getGroupMessagesRSS(long groupId, int max,
118         java.lang.String type, double version, java.lang.String displayStyle,
119         java.lang.String feedURL, java.lang.String entryURL,
120         com.liferay.portal.theme.ThemeDisplay themeDisplay)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException;
123 
124     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
125     public java.lang.String getGroupMessagesRSS(long groupId, long userId,
126         int max, java.lang.String type, double version,
127         java.lang.String displayStyle, java.lang.String feedURL,
128         java.lang.String entryURL,
129         com.liferay.portal.theme.ThemeDisplay themeDisplay)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException;
132 
133     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134     public com.liferay.portlet.messageboards.model.MBMessage getMessage(
135         long messageId)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException;
138 
139     public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay(
140         long messageId)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException;
143 
144     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145     public java.lang.String getThreadMessagesRSS(long threadId, int max,
146         java.lang.String type, double version, java.lang.String displayStyle,
147         java.lang.String feedURL, java.lang.String entryURL,
148         com.liferay.portal.theme.ThemeDisplay themeDisplay)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException;
151 
152     public void subscribeMessage(long messageId)
153         throws com.liferay.portal.PortalException,
154             com.liferay.portal.SystemException;
155 
156     public void unsubscribeMessage(long messageId)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException;
159 
160     public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage(
161         java.lang.String className, long classPK, long messageId,
162         java.lang.String subject, java.lang.String body,
163         com.liferay.portal.service.ServiceContext serviceContext)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException;
166 
167     public com.liferay.portlet.messageboards.model.MBMessage updateMessage(
168         long messageId, java.lang.String subject, java.lang.String body,
169         java.util.List<com.liferay.portal.kernel.util.ObjectValuePair<String, byte[]>> files,
170         java.util.List<String> existingFiles, double priority,
171         com.liferay.portal.service.ServiceContext serviceContext)
172         throws com.liferay.portal.PortalException,
173             com.liferay.portal.SystemException;
174 }