1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="GroupLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link GroupLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       GroupLocalService
37   * @generated
38   */
39  public class GroupLocalServiceUtil {
40      public static com.liferay.portal.model.Group addGroup(
41          com.liferay.portal.model.Group group)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addGroup(group);
44      }
45  
46      public static com.liferay.portal.model.Group createGroup(long groupId) {
47          return getService().createGroup(groupId);
48      }
49  
50      public static void deleteGroup(long groupId)
51          throws com.liferay.portal.kernel.exception.PortalException,
52              com.liferay.portal.kernel.exception.SystemException {
53          getService().deleteGroup(groupId);
54      }
55  
56      public static void deleteGroup(com.liferay.portal.model.Group group)
57          throws com.liferay.portal.kernel.exception.SystemException {
58          getService().deleteGroup(group);
59      }
60  
61      @SuppressWarnings("unchecked")
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
64          throws com.liferay.portal.kernel.exception.SystemException {
65          return getService().dynamicQuery(dynamicQuery);
66      }
67  
68      @SuppressWarnings("unchecked")
69      public static java.util.List dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      @SuppressWarnings("unchecked")
76      public static java.util.List dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end,
79          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
80          throws com.liferay.portal.kernel.exception.SystemException {
81          return getService()
82                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
83      }
84  
85      public static long dynamicQueryCount(
86          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
87          throws com.liferay.portal.kernel.exception.SystemException {
88          return getService().dynamicQueryCount(dynamicQuery);
89      }
90  
91      public static com.liferay.portal.model.Group getGroup(long groupId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getGroup(groupId);
95      }
96  
97      public static java.util.List<com.liferay.portal.model.Group> getGroups(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getGroups(start, end);
101     }
102 
103     public static int getGroupsCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getGroupsCount();
106     }
107 
108     public static com.liferay.portal.model.Group updateGroup(
109         com.liferay.portal.model.Group group)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateGroup(group);
112     }
113 
114     public static com.liferay.portal.model.Group updateGroup(
115         com.liferay.portal.model.Group group, boolean merge)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getService().updateGroup(group, merge);
118     }
119 
120     public static com.liferay.portal.model.Group addGroup(long userId,
121         java.lang.String className, long classPK, java.lang.String name,
122         java.lang.String description, int type, java.lang.String friendlyURL,
123         boolean active, com.liferay.portal.service.ServiceContext serviceContext)
124         throws com.liferay.portal.kernel.exception.PortalException,
125             com.liferay.portal.kernel.exception.SystemException {
126         return getService()
127                    .addGroup(userId, className, classPK, name, description,
128             type, friendlyURL, active, serviceContext);
129     }
130 
131     public static com.liferay.portal.model.Group addGroup(long userId,
132         java.lang.String className, long classPK, long liveGroupId,
133         java.lang.String name, java.lang.String description, int type,
134         java.lang.String friendlyURL, boolean active,
135         com.liferay.portal.service.ServiceContext serviceContext)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException {
138         return getService()
139                    .addGroup(userId, className, classPK, liveGroupId, name,
140             description, type, friendlyURL, active, serviceContext);
141     }
142 
143     public static void addRoleGroups(long roleId, long[] groupIds)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         getService().addRoleGroups(roleId, groupIds);
146     }
147 
148     public static void addUserGroups(long userId, long[] groupIds)
149         throws com.liferay.portal.kernel.exception.SystemException {
150         getService().addUserGroups(userId, groupIds);
151     }
152 
153     public static void checkCompanyGroup(long companyId)
154         throws com.liferay.portal.kernel.exception.PortalException,
155             com.liferay.portal.kernel.exception.SystemException {
156         getService().checkCompanyGroup(companyId);
157     }
158 
159     public static void checkSystemGroups(long companyId)
160         throws com.liferay.portal.kernel.exception.PortalException,
161             com.liferay.portal.kernel.exception.SystemException {
162         getService().checkSystemGroups(companyId);
163     }
164 
165     public static com.liferay.portal.model.Group getCompanyGroup(long companyId)
166         throws com.liferay.portal.kernel.exception.PortalException,
167             com.liferay.portal.kernel.exception.SystemException {
168         return getService().getCompanyGroup(companyId);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
172         long companyId, int start, int end)
173         throws com.liferay.portal.kernel.exception.SystemException {
174         return getService().getCompanyGroups(companyId, start, end);
175     }
176 
177     public static int getCompanyGroupsCount(long companyId)
178         throws com.liferay.portal.kernel.exception.SystemException {
179         return getService().getCompanyGroupsCount(companyId);
180     }
181 
182     public static com.liferay.portal.model.Group getFriendlyURLGroup(
183         long companyId, java.lang.String friendlyURL)
184         throws com.liferay.portal.kernel.exception.PortalException,
185             com.liferay.portal.kernel.exception.SystemException {
186         return getService().getFriendlyURLGroup(companyId, friendlyURL);
187     }
188 
189     public static com.liferay.portal.model.Group getGroup(long companyId,
190         java.lang.String name)
191         throws com.liferay.portal.kernel.exception.PortalException,
192             com.liferay.portal.kernel.exception.SystemException {
193         return getService().getGroup(companyId, name);
194     }
195 
196     public static java.util.List<com.liferay.portal.model.Group> getGroups(
197         long[] groupIds)
198         throws com.liferay.portal.kernel.exception.PortalException,
199             com.liferay.portal.kernel.exception.SystemException {
200         return getService().getGroups(groupIds);
201     }
202 
203     public static com.liferay.portal.model.Group getLayoutGroup(
204         long companyId, long plid)
205         throws com.liferay.portal.kernel.exception.PortalException,
206             com.liferay.portal.kernel.exception.SystemException {
207         return getService().getLayoutGroup(companyId, plid);
208     }
209 
210     public static com.liferay.portal.model.Group getLayoutPrototypeGroup(
211         long companyId, long layoutPrototypeId)
212         throws com.liferay.portal.kernel.exception.PortalException,
213             com.liferay.portal.kernel.exception.SystemException {
214         return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId);
215     }
216 
217     public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
218         long companyId, long layoutSetPrototypeId)
219         throws com.liferay.portal.kernel.exception.PortalException,
220             com.liferay.portal.kernel.exception.SystemException {
221         return getService()
222                    .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId);
223     }
224 
225     public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
226         java.lang.String className, boolean privateLayout, int start, int end)
227         throws com.liferay.portal.kernel.exception.SystemException {
228         return getService()
229                    .getNoLayoutsGroups(className, privateLayout, start, end);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
233         throws com.liferay.portal.kernel.exception.SystemException {
234         return getService().getNullFriendlyURLGroups();
235     }
236 
237     public static com.liferay.portal.model.Group getOrganizationGroup(
238         long companyId, long organizationId)
239         throws com.liferay.portal.kernel.exception.PortalException,
240             com.liferay.portal.kernel.exception.SystemException {
241         return getService().getOrganizationGroup(companyId, organizationId);
242     }
243 
244     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
245         java.util.List<com.liferay.portal.model.Organization> organizations) {
246         return getService().getOrganizationsGroups(organizations);
247     }
248 
249     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
250         java.util.List<com.liferay.portal.model.Organization> organizations)
251         throws com.liferay.portal.kernel.exception.SystemException {
252         return getService().getOrganizationsRelatedGroups(organizations);
253     }
254 
255     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
256         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
257         return getService().getRoleGroups(roleId);
258     }
259 
260     public static com.liferay.portal.model.Group getStagingGroup(
261         long liveGroupId)
262         throws com.liferay.portal.kernel.exception.PortalException,
263             com.liferay.portal.kernel.exception.SystemException {
264         return getService().getStagingGroup(liveGroupId);
265     }
266 
267     public static com.liferay.portal.model.Group getUserGroup(long companyId,
268         long userId)
269         throws com.liferay.portal.kernel.exception.PortalException,
270             com.liferay.portal.kernel.exception.SystemException {
271         return getService().getUserGroup(companyId, userId);
272     }
273 
274     public static com.liferay.portal.model.Group getUserGroupGroup(
275         long companyId, long userGroupId)
276         throws com.liferay.portal.kernel.exception.PortalException,
277             com.liferay.portal.kernel.exception.SystemException {
278         return getService().getUserGroupGroup(companyId, userGroupId);
279     }
280 
281     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
282         long userId)
283         throws com.liferay.portal.kernel.exception.PortalException,
284             com.liferay.portal.kernel.exception.SystemException {
285         return getService().getUserGroups(userId);
286     }
287 
288     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
289         long userId, boolean inherit)
290         throws com.liferay.portal.kernel.exception.PortalException,
291             com.liferay.portal.kernel.exception.SystemException {
292         return getService().getUserGroups(userId, inherit);
293     }
294 
295     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
296         long userId, int start, int end)
297         throws com.liferay.portal.kernel.exception.PortalException,
298             com.liferay.portal.kernel.exception.SystemException {
299         return getService().getUserGroups(userId, start, end);
300     }
301 
302     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
303         long userId, boolean inherit, int start, int end)
304         throws com.liferay.portal.kernel.exception.PortalException,
305             com.liferay.portal.kernel.exception.SystemException {
306         return getService().getUserGroups(userId, inherit, start, end);
307     }
308 
309     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
310         java.util.List<com.liferay.portal.model.UserGroup> userGroups)
311         throws com.liferay.portal.kernel.exception.PortalException,
312             com.liferay.portal.kernel.exception.SystemException {
313         return getService().getUserGroupsGroups(userGroups);
314     }
315 
316     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
317         java.util.List<com.liferay.portal.model.UserGroup> userGroups)
318         throws com.liferay.portal.kernel.exception.SystemException {
319         return getService().getUserGroupsRelatedGroups(userGroups);
320     }
321 
322     public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
323         long userId, int start, int end)
324         throws com.liferay.portal.kernel.exception.PortalException,
325             com.liferay.portal.kernel.exception.SystemException {
326         return getService().getUserOrganizationsGroups(userId, start, end);
327     }
328 
329     public static boolean hasRoleGroup(long roleId, long groupId)
330         throws com.liferay.portal.kernel.exception.SystemException {
331         return getService().hasRoleGroup(roleId, groupId);
332     }
333 
334     public static boolean hasStagingGroup(long liveGroupId)
335         throws com.liferay.portal.kernel.exception.SystemException {
336         return getService().hasStagingGroup(liveGroupId);
337     }
338 
339     public static boolean hasUserGroup(long userId, long groupId)
340         throws com.liferay.portal.kernel.exception.SystemException {
341         return getService().hasUserGroup(userId, groupId);
342     }
343 
344     public static java.util.List<com.liferay.portal.model.Group> search(
345         long companyId, java.lang.String name, java.lang.String description,
346         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
347         int start, int end)
348         throws com.liferay.portal.kernel.exception.SystemException {
349         return getService()
350                    .search(companyId, name, description, params, start, end);
351     }
352 
353     public static java.util.List<com.liferay.portal.model.Group> search(
354         long companyId, java.lang.String name, java.lang.String description,
355         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
356         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
357         throws com.liferay.portal.kernel.exception.SystemException {
358         return getService()
359                    .search(companyId, name, description, params, start, end, obc);
360     }
361 
362     public static int searchCount(long companyId, java.lang.String name,
363         java.lang.String description,
364         java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
365         throws com.liferay.portal.kernel.exception.SystemException {
366         return getService().searchCount(companyId, name, description, params);
367     }
368 
369     public static void setRoleGroups(long roleId, long[] groupIds)
370         throws com.liferay.portal.kernel.exception.SystemException {
371         getService().setRoleGroups(roleId, groupIds);
372     }
373 
374     public static void unsetRoleGroups(long roleId, long[] groupIds)
375         throws com.liferay.portal.kernel.exception.SystemException {
376         getService().unsetRoleGroups(roleId, groupIds);
377     }
378 
379     public static void unsetUserGroups(long userId, long[] groupIds)
380         throws com.liferay.portal.kernel.exception.SystemException {
381         getService().unsetUserGroups(userId, groupIds);
382     }
383 
384     public static void updateAsset(long userId,
385         com.liferay.portal.model.Group group, long[] assetCategoryIds,
386         java.lang.String[] assetTagNames)
387         throws com.liferay.portal.kernel.exception.PortalException,
388             com.liferay.portal.kernel.exception.SystemException {
389         getService().updateAsset(userId, group, assetCategoryIds, assetTagNames);
390     }
391 
392     public static com.liferay.portal.model.Group updateFriendlyURL(
393         long groupId, java.lang.String friendlyURL)
394         throws com.liferay.portal.kernel.exception.PortalException,
395             com.liferay.portal.kernel.exception.SystemException {
396         return getService().updateFriendlyURL(groupId, friendlyURL);
397     }
398 
399     public static com.liferay.portal.model.Group updateGroup(long groupId,
400         java.lang.String name, java.lang.String description, int type,
401         java.lang.String friendlyURL, boolean active,
402         com.liferay.portal.service.ServiceContext serviceContext)
403         throws com.liferay.portal.kernel.exception.PortalException,
404             com.liferay.portal.kernel.exception.SystemException {
405         return getService()
406                    .updateGroup(groupId, name, description, type, friendlyURL,
407             active, serviceContext);
408     }
409 
410     public static com.liferay.portal.model.Group updateGroup(long groupId,
411         java.lang.String typeSettings)
412         throws com.liferay.portal.kernel.exception.PortalException,
413             com.liferay.portal.kernel.exception.SystemException {
414         return getService().updateGroup(groupId, typeSettings);
415     }
416 
417     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
418         boolean workflowEnabled, int workflowStages,
419         java.lang.String workflowRoleNames)
420         throws com.liferay.portal.kernel.exception.PortalException,
421             com.liferay.portal.kernel.exception.SystemException {
422         return getService()
423                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
424             workflowRoleNames);
425     }
426 
427     public static GroupLocalService getService() {
428         if (_service == null) {
429             _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName());
430         }
431 
432         return _service;
433     }
434 
435     public void setService(GroupLocalService service) {
436         _service = service;
437     }
438 
439     private static GroupLocalService _service;
440 }