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  
26  /**
27   * <a href="GroupLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portal.service.GroupLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portal.service.GroupLocalService
45   *
46   */
47  public class GroupLocalServiceUtil {
48      public static com.liferay.portal.model.Group addGroup(
49          com.liferay.portal.model.Group group)
50          throws com.liferay.portal.SystemException {
51          return getService().addGroup(group);
52      }
53  
54      public static com.liferay.portal.model.Group createGroup(long groupId) {
55          return getService().createGroup(groupId);
56      }
57  
58      public static void deleteGroup(long groupId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteGroup(groupId);
62      }
63  
64      public static void deleteGroup(com.liferay.portal.model.Group group)
65          throws com.liferay.portal.SystemException {
66          getService().deleteGroup(group);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
71          throws com.liferay.portal.SystemException {
72          return getService().dynamicQuery(dynamicQuery);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end) throws com.liferay.portal.SystemException {
78          return getService().dynamicQuery(dynamicQuery, start, end);
79      }
80  
81      public static com.liferay.portal.model.Group getGroup(long groupId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getGroup(groupId);
85      }
86  
87      public static java.util.List<com.liferay.portal.model.Group> getGroups(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getGroups(start, end);
90      }
91  
92      public static int getGroupsCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getGroupsCount();
95      }
96  
97      public static com.liferay.portal.model.Group updateGroup(
98          com.liferay.portal.model.Group group)
99          throws com.liferay.portal.SystemException {
100         return getService().updateGroup(group);
101     }
102 
103     public static com.liferay.portal.model.Group addGroup(long userId,
104         java.lang.String className, long classPK, java.lang.String name,
105         java.lang.String description, int type, java.lang.String friendlyURL,
106         boolean active)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         return getService()
110                    .addGroup(userId, className, classPK, name, description,
111             type, friendlyURL, active);
112     }
113 
114     public static com.liferay.portal.model.Group addGroup(long userId,
115         java.lang.String className, long classPK, long liveGroupId,
116         java.lang.String name, java.lang.String description, int type,
117         java.lang.String friendlyURL, boolean active)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException {
120         return getService()
121                    .addGroup(userId, className, classPK, liveGroupId, name,
122             description, type, friendlyURL, active);
123     }
124 
125     public static void addRoleGroups(long roleId, long[] groupIds)
126         throws com.liferay.portal.SystemException {
127         getService().addRoleGroups(roleId, groupIds);
128     }
129 
130     public static void addUserGroups(long userId, long[] groupIds)
131         throws com.liferay.portal.PortalException,
132             com.liferay.portal.SystemException {
133         getService().addUserGroups(userId, groupIds);
134     }
135 
136     public static void checkSystemGroups(long companyId)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException {
139         getService().checkSystemGroups(companyId);
140     }
141 
142     public static com.liferay.portal.model.Group getFriendlyURLGroup(
143         long companyId, java.lang.String friendlyURL)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException {
146         return getService().getFriendlyURLGroup(companyId, friendlyURL);
147     }
148 
149     public static com.liferay.portal.model.Group getGroup(long companyId,
150         java.lang.String name)
151         throws com.liferay.portal.PortalException,
152             com.liferay.portal.SystemException {
153         return getService().getGroup(companyId, name);
154     }
155 
156     public static java.util.List<com.liferay.portal.model.Group> getGroups(
157         long[] groupIds)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         return getService().getGroups(groupIds);
161     }
162 
163     public static com.liferay.portal.model.Group getLayoutGroup(
164         long companyId, long plid)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         return getService().getLayoutGroup(companyId, plid);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.Group> getManageableGroups(
171         long userId)
172         throws com.liferay.portal.PortalException,
173             com.liferay.portal.SystemException {
174         return getService().getManageableGroups(userId);
175     }
176 
177     public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
178         throws com.liferay.portal.SystemException {
179         return getService().getNullFriendlyURLGroups();
180     }
181 
182     public static com.liferay.portal.model.Group getOrganizationGroup(
183         long companyId, long organizationId)
184         throws com.liferay.portal.PortalException,
185             com.liferay.portal.SystemException {
186         return getService().getOrganizationGroup(companyId, organizationId);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
190         java.util.List<com.liferay.portal.model.Organization> organizations) {
191         return getService().getOrganizationsGroups(organizations);
192     }
193 
194     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
195         long roleId) throws com.liferay.portal.SystemException {
196         return getService().getRoleGroups(roleId);
197     }
198 
199     public static com.liferay.portal.model.Group getStagingGroup(
200         long liveGroupId)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException {
203         return getService().getStagingGroup(liveGroupId);
204     }
205 
206     public static com.liferay.portal.model.Group getUserGroup(long companyId,
207         long userId)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException {
210         return getService().getUserGroup(companyId, userId);
211     }
212 
213     public static com.liferay.portal.model.Group getUserGroupGroup(
214         long companyId, long userGroupId)
215         throws com.liferay.portal.PortalException,
216             com.liferay.portal.SystemException {
217         return getService().getUserGroupGroup(companyId, userGroupId);
218     }
219 
220     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
221         long userId) throws com.liferay.portal.SystemException {
222         return getService().getUserGroups(userId);
223     }
224 
225     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
226         java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
227         return getService().getUserGroupsGroups(userGroups);
228     }
229 
230     public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
231         long userId, int start, int end)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException {
234         return getService().getUserOrganizationsGroups(userId, start, end);
235     }
236 
237     public static boolean hasRoleGroup(long roleId, long groupId)
238         throws com.liferay.portal.SystemException {
239         return getService().hasRoleGroup(roleId, groupId);
240     }
241 
242     public static boolean hasStagingGroup(long liveGroupId)
243         throws com.liferay.portal.SystemException {
244         return getService().hasStagingGroup(liveGroupId);
245     }
246 
247     public static boolean hasUserGroup(long userId, long groupId)
248         throws com.liferay.portal.SystemException {
249         return getService().hasUserGroup(userId, groupId);
250     }
251 
252     public static java.util.List<com.liferay.portal.model.Group> search(
253         long companyId, java.lang.String name, java.lang.String description,
254         java.util.LinkedHashMap<String, Object> params, int start, int end)
255         throws com.liferay.portal.SystemException {
256         return getService()
257                    .search(companyId, name, description, params, start, end);
258     }
259 
260     public static java.util.List<com.liferay.portal.model.Group> search(
261         long companyId, java.lang.String name, java.lang.String description,
262         java.util.LinkedHashMap<String, Object> params, int start, int end,
263         com.liferay.portal.kernel.util.OrderByComparator obc)
264         throws com.liferay.portal.SystemException {
265         return getService()
266                    .search(companyId, name, description, params, start, end, obc);
267     }
268 
269     public static int searchCount(long companyId, java.lang.String name,
270         java.lang.String description,
271         java.util.LinkedHashMap<String, Object> params)
272         throws com.liferay.portal.SystemException {
273         return getService().searchCount(companyId, name, description, params);
274     }
275 
276     public static void setRoleGroups(long roleId, long[] groupIds)
277         throws com.liferay.portal.SystemException {
278         getService().setRoleGroups(roleId, groupIds);
279     }
280 
281     public static void unsetRoleGroups(long roleId, long[] groupIds)
282         throws com.liferay.portal.SystemException {
283         getService().unsetRoleGroups(roleId, groupIds);
284     }
285 
286     public static void unsetUserGroups(long userId, long[] groupIds)
287         throws com.liferay.portal.SystemException {
288         getService().unsetUserGroups(userId, groupIds);
289     }
290 
291     public static com.liferay.portal.model.Group updateFriendlyURL(
292         long groupId, java.lang.String friendlyURL)
293         throws com.liferay.portal.PortalException,
294             com.liferay.portal.SystemException {
295         return getService().updateFriendlyURL(groupId, friendlyURL);
296     }
297 
298     public static com.liferay.portal.model.Group updateGroup(long groupId,
299         java.lang.String name, java.lang.String description, int type,
300         java.lang.String friendlyURL, boolean active)
301         throws com.liferay.portal.PortalException,
302             com.liferay.portal.SystemException {
303         return getService()
304                    .updateGroup(groupId, name, description, type, friendlyURL,
305             active);
306     }
307 
308     public static com.liferay.portal.model.Group updateGroup(long groupId,
309         java.lang.String typeSettings)
310         throws com.liferay.portal.PortalException,
311             com.liferay.portal.SystemException {
312         return getService().updateGroup(groupId, typeSettings);
313     }
314 
315     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
316         boolean workflowEnabled, int workflowStages,
317         java.lang.String workflowRoleNames)
318         throws com.liferay.portal.PortalException,
319             com.liferay.portal.SystemException {
320         return getService()
321                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
322             workflowRoleNames);
323     }
324 
325     public static GroupLocalService getService() {
326         if (_service == null) {
327             throw new RuntimeException("GroupLocalService is not set");
328         }
329 
330         return _service;
331     }
332 
333     public void setService(GroupLocalService service) {
334         _service = service;
335     }
336 
337     private static GroupLocalService _service;
338 }