1   /**
2    * Copyright (c) 2000-2008 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> getNullFriendlyURLGroups()
157         throws com.liferay.portal.SystemException {
158         return getService().getNullFriendlyURLGroups();
159     }
160 
161     public static com.liferay.portal.model.Group getOrganizationGroup(
162         long companyId, long organizationId)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException {
165         return getService().getOrganizationGroup(companyId, organizationId);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
169         java.util.List<com.liferay.portal.model.Organization> organizations) {
170         return getService().getOrganizationsGroups(organizations);
171     }
172 
173     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
174         long roleId) throws com.liferay.portal.SystemException {
175         return getService().getRoleGroups(roleId);
176     }
177 
178     public static com.liferay.portal.model.Group getStagingGroup(
179         long liveGroupId)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         return getService().getStagingGroup(liveGroupId);
183     }
184 
185     public static com.liferay.portal.model.Group getUserGroup(long companyId,
186         long userId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         return getService().getUserGroup(companyId, userId);
190     }
191 
192     public static com.liferay.portal.model.Group getUserGroupGroup(
193         long companyId, long userGroupId)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         return getService().getUserGroupGroup(companyId, userGroupId);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
200         long userId) throws com.liferay.portal.SystemException {
201         return getService().getUserGroups(userId);
202     }
203 
204     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
205         java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
206         return getService().getUserGroupsGroups(userGroups);
207     }
208 
209     public static boolean hasRoleGroup(long roleId, long groupId)
210         throws com.liferay.portal.SystemException {
211         return getService().hasRoleGroup(roleId, groupId);
212     }
213 
214     public static boolean hasStagingGroup(long liveGroupId)
215         throws com.liferay.portal.SystemException {
216         return getService().hasStagingGroup(liveGroupId);
217     }
218 
219     public static boolean hasUserGroup(long userId, long groupId)
220         throws com.liferay.portal.SystemException {
221         return getService().hasUserGroup(userId, groupId);
222     }
223 
224     public static java.util.List<com.liferay.portal.model.Group> search(
225         long companyId, java.lang.String name, java.lang.String description,
226         java.util.LinkedHashMap<String, Object> params, int start, int end)
227         throws com.liferay.portal.SystemException {
228         return getService()
229                    .search(companyId, name, description, params, start, end);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.Group> search(
233         long companyId, java.lang.String name, java.lang.String description,
234         java.util.LinkedHashMap<String, Object> params, int start, int end,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException {
237         return getService()
238                    .search(companyId, name, description, params, start, end, obc);
239     }
240 
241     public static int searchCount(long companyId, java.lang.String name,
242         java.lang.String description,
243         java.util.LinkedHashMap<String, Object> params)
244         throws com.liferay.portal.SystemException {
245         return getService().searchCount(companyId, name, description, params);
246     }
247 
248     public static void setRoleGroups(long roleId, long[] groupIds)
249         throws com.liferay.portal.SystemException {
250         getService().setRoleGroups(roleId, groupIds);
251     }
252 
253     public static void unsetRoleGroups(long roleId, long[] groupIds)
254         throws com.liferay.portal.SystemException {
255         getService().unsetRoleGroups(roleId, groupIds);
256     }
257 
258     public static void unsetUserGroups(long userId, long[] groupIds)
259         throws com.liferay.portal.SystemException {
260         getService().unsetUserGroups(userId, groupIds);
261     }
262 
263     public static com.liferay.portal.model.Group updateFriendlyURL(
264         long groupId, java.lang.String friendlyURL)
265         throws com.liferay.portal.PortalException,
266             com.liferay.portal.SystemException {
267         return getService().updateFriendlyURL(groupId, friendlyURL);
268     }
269 
270     public static com.liferay.portal.model.Group updateGroup(long groupId,
271         java.lang.String name, java.lang.String description, int type,
272         java.lang.String friendlyURL, boolean active)
273         throws com.liferay.portal.PortalException,
274             com.liferay.portal.SystemException {
275         return getService()
276                    .updateGroup(groupId, name, description, type, friendlyURL,
277             active);
278     }
279 
280     public static com.liferay.portal.model.Group updateGroup(long groupId,
281         java.lang.String typeSettings)
282         throws com.liferay.portal.PortalException,
283             com.liferay.portal.SystemException {
284         return getService().updateGroup(groupId, typeSettings);
285     }
286 
287     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
288         boolean workflowEnabled, int workflowStages,
289         java.lang.String workflowRoleNames)
290         throws com.liferay.portal.PortalException,
291             com.liferay.portal.SystemException {
292         return getService()
293                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
294             workflowRoleNames);
295     }
296 
297     public static GroupLocalService getService() {
298         if (_service == null) {
299             throw new RuntimeException("GroupLocalService is not set");
300         }
301 
302         return _service;
303     }
304 
305     public void setService(GroupLocalService service) {
306         _service = service;
307     }
308 
309     private static GroupLocalService _service;
310 }