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 updateGroup(
104         com.liferay.portal.model.Group group, boolean merge)
105         throws com.liferay.portal.SystemException {
106         return getService().updateGroup(group, merge);
107     }
108 
109     public static com.liferay.portal.model.Group addGroup(long userId,
110         java.lang.String className, long classPK, java.lang.String name,
111         java.lang.String description, int type, java.lang.String friendlyURL,
112         boolean active)
113         throws com.liferay.portal.PortalException,
114             com.liferay.portal.SystemException {
115         return getService()
116                    .addGroup(userId, className, classPK, name, description,
117             type, friendlyURL, active);
118     }
119 
120     public static com.liferay.portal.model.Group addGroup(long userId,
121         java.lang.String className, long classPK, long liveGroupId,
122         java.lang.String name, java.lang.String description, int type,
123         java.lang.String friendlyURL, boolean active)
124         throws com.liferay.portal.PortalException,
125             com.liferay.portal.SystemException {
126         return getService()
127                    .addGroup(userId, className, classPK, liveGroupId, name,
128             description, type, friendlyURL, active);
129     }
130 
131     public static void addRoleGroups(long roleId, long[] groupIds)
132         throws com.liferay.portal.SystemException {
133         getService().addRoleGroups(roleId, groupIds);
134     }
135 
136     public static void addUserGroups(long userId, long[] groupIds)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException {
139         getService().addUserGroups(userId, groupIds);
140     }
141 
142     public static void checkSystemGroups(long companyId)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         getService().checkSystemGroups(companyId);
146     }
147 
148     public static com.liferay.portal.model.Group getFriendlyURLGroup(
149         long companyId, java.lang.String friendlyURL)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException {
152         return getService().getFriendlyURLGroup(companyId, friendlyURL);
153     }
154 
155     public static com.liferay.portal.model.Group getGroup(long companyId,
156         java.lang.String name)
157         throws com.liferay.portal.PortalException,
158             com.liferay.portal.SystemException {
159         return getService().getGroup(companyId, name);
160     }
161 
162     public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
163         java.lang.String className, boolean privateLayout, int start, int end)
164         throws com.liferay.portal.SystemException {
165         return getService()
166                    .getNoLayoutsGroups(className, privateLayout, start, end);
167     }
168 
169     public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
170         throws com.liferay.portal.SystemException {
171         return getService().getNullFriendlyURLGroups();
172     }
173 
174     public static com.liferay.portal.model.Group getOrganizationGroup(
175         long companyId, long organizationId)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         return getService().getOrganizationGroup(companyId, organizationId);
179     }
180 
181     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
182         java.util.List<com.liferay.portal.model.Organization> organizations) {
183         return getService().getOrganizationsGroups(organizations);
184     }
185 
186     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
187         long roleId) throws com.liferay.portal.SystemException {
188         return getService().getRoleGroups(roleId);
189     }
190 
191     public static com.liferay.portal.model.Group getStagingGroup(
192         long liveGroupId)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException {
195         return getService().getStagingGroup(liveGroupId);
196     }
197 
198     public static com.liferay.portal.model.Group getUserGroup(long companyId,
199         long userId)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         return getService().getUserGroup(companyId, userId);
203     }
204 
205     public static com.liferay.portal.model.Group getUserGroupGroup(
206         long companyId, long userGroupId)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         return getService().getUserGroupGroup(companyId, userGroupId);
210     }
211 
212     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
213         long userId) throws com.liferay.portal.SystemException {
214         return getService().getUserGroups(userId);
215     }
216 
217     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
218         java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
219         return getService().getUserGroupsGroups(userGroups);
220     }
221 
222     public static boolean hasRoleGroup(long roleId, long groupId)
223         throws com.liferay.portal.SystemException {
224         return getService().hasRoleGroup(roleId, groupId);
225     }
226 
227     public static boolean hasStagingGroup(long liveGroupId)
228         throws com.liferay.portal.SystemException {
229         return getService().hasStagingGroup(liveGroupId);
230     }
231 
232     public static boolean hasUserGroup(long userId, long groupId)
233         throws com.liferay.portal.SystemException {
234         return getService().hasUserGroup(userId, groupId);
235     }
236 
237     public static java.util.List<com.liferay.portal.model.Group> search(
238         long companyId, java.lang.String name, java.lang.String description,
239         java.util.LinkedHashMap<String, Object> params, int start, int end)
240         throws com.liferay.portal.SystemException {
241         return getService()
242                    .search(companyId, name, description, params, start, end);
243     }
244 
245     public static java.util.List<com.liferay.portal.model.Group> search(
246         long companyId, java.lang.String name, java.lang.String description,
247         java.util.LinkedHashMap<String, Object> params, int start, int end,
248         com.liferay.portal.kernel.util.OrderByComparator obc)
249         throws com.liferay.portal.SystemException {
250         return getService()
251                    .search(companyId, name, description, params, start, end, obc);
252     }
253 
254     public static int searchCount(long companyId, java.lang.String name,
255         java.lang.String description,
256         java.util.LinkedHashMap<String, Object> params)
257         throws com.liferay.portal.SystemException {
258         return getService().searchCount(companyId, name, description, params);
259     }
260 
261     public static void setRoleGroups(long roleId, long[] groupIds)
262         throws com.liferay.portal.SystemException {
263         getService().setRoleGroups(roleId, groupIds);
264     }
265 
266     public static void unsetRoleGroups(long roleId, long[] groupIds)
267         throws com.liferay.portal.SystemException {
268         getService().unsetRoleGroups(roleId, groupIds);
269     }
270 
271     public static void unsetUserGroups(long userId, long[] groupIds)
272         throws com.liferay.portal.SystemException {
273         getService().unsetUserGroups(userId, groupIds);
274     }
275 
276     public static com.liferay.portal.model.Group updateFriendlyURL(
277         long groupId, java.lang.String friendlyURL)
278         throws com.liferay.portal.PortalException,
279             com.liferay.portal.SystemException {
280         return getService().updateFriendlyURL(groupId, friendlyURL);
281     }
282 
283     public static com.liferay.portal.model.Group updateGroup(long groupId,
284         java.lang.String name, java.lang.String description, int type,
285         java.lang.String friendlyURL, boolean active)
286         throws com.liferay.portal.PortalException,
287             com.liferay.portal.SystemException {
288         return getService()
289                    .updateGroup(groupId, name, description, type, friendlyURL,
290             active);
291     }
292 
293     public static com.liferay.portal.model.Group updateGroup(long groupId,
294         java.lang.String typeSettings)
295         throws com.liferay.portal.PortalException,
296             com.liferay.portal.SystemException {
297         return getService().updateGroup(groupId, typeSettings);
298     }
299 
300     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
301         boolean workflowEnabled, int workflowStages,
302         java.lang.String workflowRoleNames)
303         throws com.liferay.portal.PortalException,
304             com.liferay.portal.SystemException {
305         return getService()
306                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
307             workflowRoleNames);
308     }
309 
310     public static GroupLocalService getService() {
311         if (_service == null) {
312             throw new RuntimeException("GroupLocalService is not set");
313         }
314 
315         return _service;
316     }
317 
318     public void setService(GroupLocalService service) {
319         _service = service;
320     }
321 
322     private static GroupLocalService _service;
323 }