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      public static java.util.List<Object> dynamicQuery(
62          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
63          throws com.liferay.portal.kernel.exception.SystemException {
64          return getService().dynamicQuery(dynamicQuery);
65      }
66  
67      public static java.util.List<Object> dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69          int end) throws com.liferay.portal.kernel.exception.SystemException {
70          return getService().dynamicQuery(dynamicQuery, start, end);
71      }
72  
73      public static com.liferay.portal.model.Group getGroup(long groupId)
74          throws com.liferay.portal.kernel.exception.PortalException,
75              com.liferay.portal.kernel.exception.SystemException {
76          return getService().getGroup(groupId);
77      }
78  
79      public static java.util.List<com.liferay.portal.model.Group> getGroups(
80          int start, int end)
81          throws com.liferay.portal.kernel.exception.SystemException {
82          return getService().getGroups(start, end);
83      }
84  
85      public static int getGroupsCount()
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().getGroupsCount();
88      }
89  
90      public static com.liferay.portal.model.Group updateGroup(
91          com.liferay.portal.model.Group group)
92          throws com.liferay.portal.kernel.exception.SystemException {
93          return getService().updateGroup(group);
94      }
95  
96      public static com.liferay.portal.model.Group updateGroup(
97          com.liferay.portal.model.Group group, boolean merge)
98          throws com.liferay.portal.kernel.exception.SystemException {
99          return getService().updateGroup(group, merge);
100     }
101 
102     public static com.liferay.portal.model.Group addGroup(long userId,
103         java.lang.String className, long classPK, java.lang.String name,
104         java.lang.String description, int type, java.lang.String friendlyURL,
105         boolean active, com.liferay.portal.service.ServiceContext serviceContext)
106         throws com.liferay.portal.kernel.exception.PortalException,
107             com.liferay.portal.kernel.exception.SystemException {
108         return getService()
109                    .addGroup(userId, className, classPK, name, description,
110             type, friendlyURL, active, serviceContext);
111     }
112 
113     public static com.liferay.portal.model.Group addGroup(long userId,
114         java.lang.String className, long classPK, long liveGroupId,
115         java.lang.String name, java.lang.String description, int type,
116         java.lang.String friendlyURL, boolean active,
117         com.liferay.portal.service.ServiceContext serviceContext)
118         throws com.liferay.portal.kernel.exception.PortalException,
119             com.liferay.portal.kernel.exception.SystemException {
120         return getService()
121                    .addGroup(userId, className, classPK, liveGroupId, name,
122             description, type, friendlyURL, active, serviceContext);
123     }
124 
125     public static void addRoleGroups(long roleId, long[] groupIds)
126         throws com.liferay.portal.kernel.exception.SystemException {
127         getService().addRoleGroups(roleId, groupIds);
128     }
129 
130     public static void addUserGroups(long userId, long[] groupIds)
131         throws com.liferay.portal.kernel.exception.SystemException {
132         getService().addUserGroups(userId, groupIds);
133     }
134 
135     public static void checkCompanyGroup(long companyId)
136         throws com.liferay.portal.kernel.exception.PortalException,
137             com.liferay.portal.kernel.exception.SystemException {
138         getService().checkCompanyGroup(companyId);
139     }
140 
141     public static void checkSystemGroups(long companyId)
142         throws com.liferay.portal.kernel.exception.PortalException,
143             com.liferay.portal.kernel.exception.SystemException {
144         getService().checkSystemGroups(companyId);
145     }
146 
147     public static com.liferay.portal.model.Group getCompanyGroup(long companyId)
148         throws com.liferay.portal.kernel.exception.PortalException,
149             com.liferay.portal.kernel.exception.SystemException {
150         return getService().getCompanyGroup(companyId);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
154         long companyId, int start, int end)
155         throws com.liferay.portal.kernel.exception.SystemException {
156         return getService().getCompanyGroups(companyId, start, end);
157     }
158 
159     public static int getCompanyGroupsCount(long companyId)
160         throws com.liferay.portal.kernel.exception.SystemException {
161         return getService().getCompanyGroupsCount(companyId);
162     }
163 
164     public static com.liferay.portal.model.Group getFriendlyURLGroup(
165         long companyId, java.lang.String friendlyURL)
166         throws com.liferay.portal.kernel.exception.PortalException,
167             com.liferay.portal.kernel.exception.SystemException {
168         return getService().getFriendlyURLGroup(companyId, friendlyURL);
169     }
170 
171     public static com.liferay.portal.model.Group getGroup(long companyId,
172         java.lang.String name)
173         throws com.liferay.portal.kernel.exception.PortalException,
174             com.liferay.portal.kernel.exception.SystemException {
175         return getService().getGroup(companyId, name);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.Group> getGroups(
179         long[] groupIds)
180         throws com.liferay.portal.kernel.exception.PortalException,
181             com.liferay.portal.kernel.exception.SystemException {
182         return getService().getGroups(groupIds);
183     }
184 
185     public static com.liferay.portal.model.Group getLayoutGroup(
186         long companyId, long plid)
187         throws com.liferay.portal.kernel.exception.PortalException,
188             com.liferay.portal.kernel.exception.SystemException {
189         return getService().getLayoutGroup(companyId, plid);
190     }
191 
192     public static com.liferay.portal.model.Group getLayoutPrototypeGroup(
193         long companyId, long layoutPrototypeId)
194         throws com.liferay.portal.kernel.exception.PortalException,
195             com.liferay.portal.kernel.exception.SystemException {
196         return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId);
197     }
198 
199     public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
200         long companyId, long layoutSetPrototypeId)
201         throws com.liferay.portal.kernel.exception.PortalException,
202             com.liferay.portal.kernel.exception.SystemException {
203         return getService()
204                    .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId);
205     }
206 
207     public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
208         java.lang.String className, boolean privateLayout, int start, int end)
209         throws com.liferay.portal.kernel.exception.SystemException {
210         return getService()
211                    .getNoLayoutsGroups(className, privateLayout, start, end);
212     }
213 
214     public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
215         throws com.liferay.portal.kernel.exception.SystemException {
216         return getService().getNullFriendlyURLGroups();
217     }
218 
219     public static com.liferay.portal.model.Group getOrganizationGroup(
220         long companyId, long organizationId)
221         throws com.liferay.portal.kernel.exception.PortalException,
222             com.liferay.portal.kernel.exception.SystemException {
223         return getService().getOrganizationGroup(companyId, organizationId);
224     }
225 
226     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
227         java.util.List<com.liferay.portal.model.Organization> organizations) {
228         return getService().getOrganizationsGroups(organizations);
229     }
230 
231     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
232         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
233         return getService().getRoleGroups(roleId);
234     }
235 
236     public static com.liferay.portal.model.Group getStagingGroup(
237         long liveGroupId)
238         throws com.liferay.portal.kernel.exception.PortalException,
239             com.liferay.portal.kernel.exception.SystemException {
240         return getService().getStagingGroup(liveGroupId);
241     }
242 
243     public static com.liferay.portal.model.Group getUserGroup(long companyId,
244         long userId)
245         throws com.liferay.portal.kernel.exception.PortalException,
246             com.liferay.portal.kernel.exception.SystemException {
247         return getService().getUserGroup(companyId, userId);
248     }
249 
250     public static com.liferay.portal.model.Group getUserGroupGroup(
251         long companyId, long userGroupId)
252         throws com.liferay.portal.kernel.exception.PortalException,
253             com.liferay.portal.kernel.exception.SystemException {
254         return getService().getUserGroupGroup(companyId, userGroupId);
255     }
256 
257     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
258         long userId)
259         throws com.liferay.portal.kernel.exception.PortalException,
260             com.liferay.portal.kernel.exception.SystemException {
261         return getService().getUserGroups(userId);
262     }
263 
264     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
265         long userId, boolean inherit)
266         throws com.liferay.portal.kernel.exception.PortalException,
267             com.liferay.portal.kernel.exception.SystemException {
268         return getService().getUserGroups(userId, inherit);
269     }
270 
271     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
272         long userId, int start, int end)
273         throws com.liferay.portal.kernel.exception.PortalException,
274             com.liferay.portal.kernel.exception.SystemException {
275         return getService().getUserGroups(userId, start, end);
276     }
277 
278     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
279         long userId, boolean inherit, int start, int end)
280         throws com.liferay.portal.kernel.exception.PortalException,
281             com.liferay.portal.kernel.exception.SystemException {
282         return getService().getUserGroups(userId, inherit, start, end);
283     }
284 
285     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
286         java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
287         return getService().getUserGroupsGroups(userGroups);
288     }
289 
290     public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
291         long userId, int start, int end)
292         throws com.liferay.portal.kernel.exception.PortalException,
293             com.liferay.portal.kernel.exception.SystemException {
294         return getService().getUserOrganizationsGroups(userId, start, end);
295     }
296 
297     public static boolean hasRoleGroup(long roleId, long groupId)
298         throws com.liferay.portal.kernel.exception.SystemException {
299         return getService().hasRoleGroup(roleId, groupId);
300     }
301 
302     public static boolean hasStagingGroup(long liveGroupId)
303         throws com.liferay.portal.kernel.exception.SystemException {
304         return getService().hasStagingGroup(liveGroupId);
305     }
306 
307     public static boolean hasUserGroup(long userId, long groupId)
308         throws com.liferay.portal.kernel.exception.SystemException {
309         return getService().hasUserGroup(userId, groupId);
310     }
311 
312     public static java.util.List<com.liferay.portal.model.Group> search(
313         long companyId, java.lang.String name, java.lang.String description,
314         java.util.LinkedHashMap<String, Object> params, int start, int end)
315         throws com.liferay.portal.kernel.exception.SystemException {
316         return getService()
317                    .search(companyId, name, description, params, start, end);
318     }
319 
320     public static java.util.List<com.liferay.portal.model.Group> search(
321         long companyId, java.lang.String name, java.lang.String description,
322         java.util.LinkedHashMap<String, Object> params, int start, int end,
323         com.liferay.portal.kernel.util.OrderByComparator obc)
324         throws com.liferay.portal.kernel.exception.SystemException {
325         return getService()
326                    .search(companyId, name, description, params, start, end, obc);
327     }
328 
329     public static int searchCount(long companyId, java.lang.String name,
330         java.lang.String description,
331         java.util.LinkedHashMap<String, Object> params)
332         throws com.liferay.portal.kernel.exception.SystemException {
333         return getService().searchCount(companyId, name, description, params);
334     }
335 
336     public static void setRoleGroups(long roleId, long[] groupIds)
337         throws com.liferay.portal.kernel.exception.SystemException {
338         getService().setRoleGroups(roleId, groupIds);
339     }
340 
341     public static void unsetRoleGroups(long roleId, long[] groupIds)
342         throws com.liferay.portal.kernel.exception.SystemException {
343         getService().unsetRoleGroups(roleId, groupIds);
344     }
345 
346     public static void unsetUserGroups(long userId, long[] groupIds)
347         throws com.liferay.portal.kernel.exception.SystemException {
348         getService().unsetUserGroups(userId, groupIds);
349     }
350 
351     public static void updateAsset(long userId,
352         com.liferay.portal.model.Group group, long[] assetCategoryIds,
353         java.lang.String[] assetTagNames)
354         throws com.liferay.portal.kernel.exception.PortalException,
355             com.liferay.portal.kernel.exception.SystemException {
356         getService().updateAsset(userId, group, assetCategoryIds, assetTagNames);
357     }
358 
359     public static com.liferay.portal.model.Group updateFriendlyURL(
360         long groupId, java.lang.String friendlyURL)
361         throws com.liferay.portal.kernel.exception.PortalException,
362             com.liferay.portal.kernel.exception.SystemException {
363         return getService().updateFriendlyURL(groupId, friendlyURL);
364     }
365 
366     public static com.liferay.portal.model.Group updateGroup(long groupId,
367         java.lang.String name, java.lang.String description, int type,
368         java.lang.String friendlyURL, boolean active,
369         com.liferay.portal.service.ServiceContext serviceContext)
370         throws com.liferay.portal.kernel.exception.PortalException,
371             com.liferay.portal.kernel.exception.SystemException {
372         return getService()
373                    .updateGroup(groupId, name, description, type, friendlyURL,
374             active, serviceContext);
375     }
376 
377     public static com.liferay.portal.model.Group updateGroup(long groupId,
378         java.lang.String typeSettings)
379         throws com.liferay.portal.kernel.exception.PortalException,
380             com.liferay.portal.kernel.exception.SystemException {
381         return getService().updateGroup(groupId, typeSettings);
382     }
383 
384     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
385         boolean workflowEnabled, int workflowStages,
386         java.lang.String workflowRoleNames)
387         throws com.liferay.portal.kernel.exception.PortalException,
388             com.liferay.portal.kernel.exception.SystemException {
389         return getService()
390                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
391             workflowRoleNames);
392     }
393 
394     public static GroupLocalService getService() {
395         if (_service == null) {
396             _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName());
397         }
398 
399         return _service;
400     }
401 
402     public void setService(GroupLocalService service) {
403         _service = service;
404     }
405 
406     private static GroupLocalService _service;
407 }