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.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  
27  /**
28   * <a href="MBThreadLocalService.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This interface defines the service. The default implementation is
37   * <code>com.liferay.portlet.messageboards.service.impl.MBThreadLocalServiceImpl</code>.
38   * Modify methods in that class and rerun ServiceBuilder to populate this class
39   * and all other generated classes.
40   * </p>
41   *
42   * <p>
43   * 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.
44   * </p>
45   *
46   * @author Brian Wing Shun Chan
47   *
48   * @see com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil
49   *
50   */
51  @Transactional(rollbackFor =  {
52      PortalException.class, SystemException.class})
53  public interface MBThreadLocalService {
54      public com.liferay.portlet.messageboards.model.MBThread addMBThread(
55          com.liferay.portlet.messageboards.model.MBThread mbThread)
56          throws com.liferay.portal.SystemException;
57  
58      public com.liferay.portlet.messageboards.model.MBThread createMBThread(
59          long threadId);
60  
61      public void deleteMBThread(long threadId)
62          throws com.liferay.portal.SystemException,
63              com.liferay.portal.PortalException;
64  
65      public void deleteMBThread(
66          com.liferay.portlet.messageboards.model.MBThread mbThread)
67          throws com.liferay.portal.SystemException;
68  
69      public java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
71          throws com.liferay.portal.SystemException;
72  
73      public java.util.List<Object> dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException;
76  
77      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
78      public com.liferay.portlet.messageboards.model.MBThread getMBThread(
79          long threadId)
80          throws com.liferay.portal.SystemException,
81              com.liferay.portal.PortalException;
82  
83      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
84      public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getMBThreads(
85          int start, int end) throws com.liferay.portal.SystemException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public int getMBThreadsCount() throws com.liferay.portal.SystemException;
89  
90      public com.liferay.portlet.messageboards.model.MBThread updateMBThread(
91          com.liferay.portlet.messageboards.model.MBThread mbThread)
92          throws com.liferay.portal.SystemException;
93  
94      public void deleteThread(long threadId)
95          throws com.liferay.portal.PortalException,
96              com.liferay.portal.SystemException;
97  
98      public void deleteThread(
99          com.liferay.portlet.messageboards.model.MBThread thread)
100         throws com.liferay.portal.PortalException,
101             com.liferay.portal.SystemException;
102 
103     public void deleteThreads(long categoryId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException;
106 
107     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
108     public int getCategoriesThreadsCount(java.util.List<Long> categoryIds)
109         throws com.liferay.portal.SystemException;
110 
111     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
113         long groupId, int start, int end)
114         throws com.liferay.portal.SystemException;
115 
116     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
117     public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
118         long groupId, long userId, int start, int end)
119         throws com.liferay.portal.SystemException;
120 
121     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122     public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getGroupThreads(
123         long groupId, long userId, boolean subscribed, int start, int end)
124         throws com.liferay.portal.SystemException;
125 
126     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
127     public int getGroupThreadsCount(long groupId)
128         throws com.liferay.portal.SystemException;
129 
130     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131     public int getGroupThreadsCount(long groupId, long userId)
132         throws com.liferay.portal.SystemException;
133 
134     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
135     public int getGroupThreadsCount(long groupId, long userId,
136         boolean subscribed) throws com.liferay.portal.SystemException;
137 
138     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139     public com.liferay.portlet.messageboards.model.MBThread getThread(
140         long threadId)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException;
143 
144     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
145     public java.util.List<com.liferay.portlet.messageboards.model.MBThread> getThreads(
146         long categoryId, int start, int end)
147         throws com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public int getThreadsCount(long categoryId)
151         throws com.liferay.portal.SystemException;
152 
153     public boolean hasReadThread(long userId, long threadId)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException;
156 
157     public com.liferay.portlet.messageboards.model.MBThread moveThread(
158         long categoryId, long threadId)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException;
161 
162     public com.liferay.portlet.messageboards.model.MBThread splitThread(
163         long messageId, javax.portlet.PortletPreferences prefs,
164         com.liferay.portal.theme.ThemeDisplay themeDisplay)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException;
167 
168     public com.liferay.portlet.messageboards.model.MBThread updateThread(
169         long threadId, int viewCount)
170         throws com.liferay.portal.PortalException,
171             com.liferay.portal.SystemException;
172 }