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.portal.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="GroupLocalService.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.portal.service.impl.GroupLocalServiceImpl</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 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.
47   * </p>
48   *
49   * @author Brian Wing Shun Chan
50   *
51   * @see com.liferay.portal.service.GroupLocalServiceUtil
52   *
53   */
54  @Transactional(rollbackFor =  {
55      PortalException.class, SystemException.class})
56  public interface GroupLocalService {
57      public com.liferay.portal.model.Group addGroup(
58          com.liferay.portal.model.Group group)
59          throws com.liferay.portal.SystemException;
60  
61      public com.liferay.portal.model.Group createGroup(long groupId);
62  
63      public void deleteGroup(long groupId)
64          throws com.liferay.portal.SystemException,
65              com.liferay.portal.PortalException;
66  
67      public void deleteGroup(com.liferay.portal.model.Group group)
68          throws com.liferay.portal.SystemException;
69  
70      public java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException;
73  
74      public java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException;
77  
78      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
79      public com.liferay.portal.model.Group getGroup(long groupId)
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.portal.model.Group> getGroups(int start,
85          int end) throws com.liferay.portal.SystemException;
86  
87      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
88      public int getGroupsCount() throws com.liferay.portal.SystemException;
89  
90      public com.liferay.portal.model.Group updateGroup(
91          com.liferay.portal.model.Group group)
92          throws com.liferay.portal.SystemException;
93  
94      public com.liferay.portal.model.Group addGroup(long userId,
95          java.lang.String className, long classPK, java.lang.String name,
96          java.lang.String description, int type, java.lang.String friendlyURL,
97          boolean active)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException;
100 
101     public com.liferay.portal.model.Group addGroup(long userId,
102         java.lang.String className, long classPK, long liveGroupId,
103         java.lang.String name, java.lang.String description, int type,
104         java.lang.String friendlyURL, boolean active)
105         throws com.liferay.portal.PortalException,
106             com.liferay.portal.SystemException;
107 
108     public void addRoleGroups(long roleId, long[] groupIds)
109         throws com.liferay.portal.SystemException;
110 
111     public void addUserGroups(long userId, long[] groupIds)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException;
114 
115     public void checkSystemGroups(long companyId)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException;
118 
119     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
120     public com.liferay.portal.model.Group getFriendlyURLGroup(long companyId,
121         java.lang.String friendlyURL)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException;
124 
125     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126     public com.liferay.portal.model.Group getGroup(long companyId,
127         java.lang.String name)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException;
130 
131     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
132     public java.util.List<com.liferay.portal.model.Group> getGroups(
133         long[] groupIds)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException;
136 
137     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138     public com.liferay.portal.model.Group getLayoutGroup(long companyId,
139         long plid)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException;
142 
143     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
144     public java.util.List<com.liferay.portal.model.Group> getManageableGroups(
145         long userId)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
151         throws com.liferay.portal.SystemException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public com.liferay.portal.model.Group getOrganizationGroup(long companyId,
155         long organizationId)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException;
158 
159     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160     public java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
161         java.util.List<com.liferay.portal.model.Organization> organizations);
162 
163     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164     public java.util.List<com.liferay.portal.model.Group> getRoleGroups(
165         long roleId) throws com.liferay.portal.SystemException;
166 
167     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168     public com.liferay.portal.model.Group getStagingGroup(long liveGroupId)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public com.liferay.portal.model.Group getUserGroup(long companyId,
174         long userId)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException;
177 
178     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
179     public com.liferay.portal.model.Group getUserGroupGroup(long companyId,
180         long userGroupId)
181         throws com.liferay.portal.PortalException,
182             com.liferay.portal.SystemException;
183 
184     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185     public java.util.List<com.liferay.portal.model.Group> getUserGroups(
186         long userId) throws com.liferay.portal.SystemException;
187 
188     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
189     public java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
190         java.util.List<com.liferay.portal.model.UserGroup> userGroups);
191 
192     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193     public java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
194         long userId, int start, int end)
195         throws com.liferay.portal.PortalException,
196             com.liferay.portal.SystemException;
197 
198     public boolean hasRoleGroup(long roleId, long groupId)
199         throws com.liferay.portal.SystemException;
200 
201     public boolean hasStagingGroup(long liveGroupId)
202         throws com.liferay.portal.SystemException;
203 
204     public boolean hasUserGroup(long userId, long groupId)
205         throws com.liferay.portal.SystemException;
206 
207     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208     public java.util.List<com.liferay.portal.model.Group> search(
209         long companyId, java.lang.String name, java.lang.String description,
210         java.util.LinkedHashMap<String, Object> params, int start, int end)
211         throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portal.model.Group> search(
215         long companyId, java.lang.String name, java.lang.String description,
216         java.util.LinkedHashMap<String, Object> params, int start, int end,
217         com.liferay.portal.kernel.util.OrderByComparator obc)
218         throws com.liferay.portal.SystemException;
219 
220     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221     public int searchCount(long companyId, java.lang.String name,
222         java.lang.String description,
223         java.util.LinkedHashMap<String, Object> params)
224         throws com.liferay.portal.SystemException;
225 
226     public void setRoleGroups(long roleId, long[] groupIds)
227         throws com.liferay.portal.SystemException;
228 
229     public void unsetRoleGroups(long roleId, long[] groupIds)
230         throws com.liferay.portal.SystemException;
231 
232     public void unsetUserGroups(long userId, long[] groupIds)
233         throws com.liferay.portal.SystemException;
234 
235     public com.liferay.portal.model.Group updateFriendlyURL(long groupId,
236         java.lang.String friendlyURL)
237         throws com.liferay.portal.PortalException,
238             com.liferay.portal.SystemException;
239 
240     public com.liferay.portal.model.Group updateGroup(long groupId,
241         java.lang.String name, java.lang.String description, int type,
242         java.lang.String friendlyURL, boolean active)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException;
245 
246     public com.liferay.portal.model.Group updateGroup(long groupId,
247         java.lang.String typeSettings)
248         throws com.liferay.portal.PortalException,
249             com.liferay.portal.SystemException;
250 
251     public com.liferay.portal.model.Group updateWorkflow(long groupId,
252         boolean workflowEnabled, int workflowStages,
253         java.lang.String workflowRoleNames)
254         throws com.liferay.portal.PortalException,
255             com.liferay.portal.SystemException;
256 }