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