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.polls.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="PollsQuestionLocalService.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.polls.service.impl.PollsQuestionLocalServiceImpl</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.polls.service.PollsQuestionLocalServiceUtil
49   *
50   */
51  @Transactional(rollbackFor =  {
52      PortalException.class, SystemException.class})
53  public interface PollsQuestionLocalService {
54      public com.liferay.portlet.polls.model.PollsQuestion addPollsQuestion(
55          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
56          throws com.liferay.portal.SystemException;
57  
58      public com.liferay.portlet.polls.model.PollsQuestion createPollsQuestion(
59          long questionId);
60  
61      public void deletePollsQuestion(long questionId)
62          throws com.liferay.portal.SystemException,
63              com.liferay.portal.PortalException;
64  
65      public void deletePollsQuestion(
66          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
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.polls.model.PollsQuestion getPollsQuestion(
79          long questionId)
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.polls.model.PollsQuestion> getPollsQuestions(
85          int start, int end) throws com.liferay.portal.SystemException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public int getPollsQuestionsCount()
89          throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portlet.polls.model.PollsQuestion updatePollsQuestion(
92          com.liferay.portlet.polls.model.PollsQuestion pollsQuestion)
93          throws com.liferay.portal.SystemException;
94  
95      public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
96          long userId, long plid, java.lang.String title,
97          java.lang.String description, int expirationDateMonth,
98          int expirationDateDay, int expirationDateYear, int expirationDateHour,
99          int expirationDateMinute, boolean neverExpire,
100         boolean addCommunityPermissions, boolean addGuestPermissions)
101         throws com.liferay.portal.PortalException,
102             com.liferay.portal.SystemException;
103 
104     public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
105         java.lang.String uuid, long userId, long plid, java.lang.String title,
106         java.lang.String description, int expirationDateMonth,
107         int expirationDateDay, int expirationDateYear, int expirationDateHour,
108         int expirationDateMinute, boolean neverExpire,
109         boolean addCommunityPermissions, boolean addGuestPermissions)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException;
112 
113     public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
114         long userId, long plid, java.lang.String title,
115         java.lang.String description, int expirationDateMonth,
116         int expirationDateDay, int expirationDateYear, int expirationDateHour,
117         int expirationDateMinute, boolean neverExpire,
118         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
119         boolean addCommunityPermissions, boolean addGuestPermissions)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException;
122 
123     public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
124         long userId, long plid, java.lang.String title,
125         java.lang.String description, int expirationDateMonth,
126         int expirationDateDay, int expirationDateYear, int expirationDateHour,
127         int expirationDateMinute, boolean neverExpire,
128         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
129         java.lang.String[] communityPermissions,
130         java.lang.String[] guestPermissions)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException;
133 
134     public com.liferay.portlet.polls.model.PollsQuestion addQuestion(
135         java.lang.String uuid, long userId, long plid, java.lang.String title,
136         java.lang.String description, int expirationDateMonth,
137         int expirationDateDay, int expirationDateYear, int expirationDateHour,
138         int expirationDateMinute, boolean neverExpire,
139         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices,
140         java.lang.Boolean addCommunityPermissions,
141         java.lang.Boolean addGuestPermissions,
142         java.lang.String[] communityPermissions,
143         java.lang.String[] guestPermissions)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException;
146 
147     public void addQuestionResources(long questionId,
148         boolean addCommunityPermissions, boolean addGuestPermissions)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException;
151 
152     public void addQuestionResources(
153         com.liferay.portlet.polls.model.PollsQuestion question,
154         boolean addCommunityPermissions, boolean addGuestPermissions)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException;
157 
158     public void addQuestionResources(long questionId,
159         java.lang.String[] communityPermissions,
160         java.lang.String[] guestPermissions)
161         throws com.liferay.portal.PortalException,
162             com.liferay.portal.SystemException;
163 
164     public void addQuestionResources(
165         com.liferay.portlet.polls.model.PollsQuestion question,
166         java.lang.String[] communityPermissions,
167         java.lang.String[] guestPermissions)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException;
170 
171     public void deleteQuestion(long questionId)
172         throws com.liferay.portal.PortalException,
173             com.liferay.portal.SystemException;
174 
175     public void deleteQuestion(
176         com.liferay.portlet.polls.model.PollsQuestion question)
177         throws com.liferay.portal.PortalException,
178             com.liferay.portal.SystemException;
179 
180     public void deleteQuestions(long groupId)
181         throws com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException;
183 
184     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185     public com.liferay.portlet.polls.model.PollsQuestion getQuestion(
186         long questionId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException;
189 
190     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
191     public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
192         long groupId) throws com.liferay.portal.SystemException;
193 
194     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195     public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getQuestions(
196         long groupId, int start, int end)
197         throws com.liferay.portal.SystemException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public int getQuestionsCount(long groupId)
201         throws com.liferay.portal.SystemException;
202 
203     public com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
204         long userId, long questionId, java.lang.String title,
205         java.lang.String description, int expirationDateMonth,
206         int expirationDateDay, int expirationDateYear, int expirationDateHour,
207         int expirationDateMinute, boolean neverExpire)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException;
210 
211     public com.liferay.portlet.polls.model.PollsQuestion updateQuestion(
212         long userId, long questionId, java.lang.String title,
213         java.lang.String description, int expirationDateMonth,
214         int expirationDateDay, int expirationDateYear, int expirationDateHour,
215         int expirationDateMinute, boolean neverExpire,
216         java.util.List<com.liferay.portlet.polls.model.PollsChoice> choices)
217         throws com.liferay.portal.PortalException,
218             com.liferay.portal.SystemException;
219 }