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