1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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   * {@link GroupLocalService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       GroupLocalService
44   * @generated
45   */
46  public class GroupLocalServiceUtil {
47      public static com.liferay.portal.model.Group addGroup(
48          com.liferay.portal.model.Group group)
49          throws com.liferay.portal.SystemException {
50          return getService().addGroup(group);
51      }
52  
53      public static com.liferay.portal.model.Group createGroup(long groupId) {
54          return getService().createGroup(groupId);
55      }
56  
57      public static void deleteGroup(long groupId)
58          throws com.liferay.portal.PortalException,
59              com.liferay.portal.SystemException {
60          getService().deleteGroup(groupId);
61      }
62  
63      public static void deleteGroup(com.liferay.portal.model.Group group)
64          throws com.liferay.portal.SystemException {
65          getService().deleteGroup(group);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portal.model.Group getGroup(long groupId)
81          throws com.liferay.portal.PortalException,
82              com.liferay.portal.SystemException {
83          return getService().getGroup(groupId);
84      }
85  
86      public static java.util.List<com.liferay.portal.model.Group> getGroups(
87          int start, int end) throws com.liferay.portal.SystemException {
88          return getService().getGroups(start, end);
89      }
90  
91      public static int getGroupsCount()
92          throws com.liferay.portal.SystemException {
93          return getService().getGroupsCount();
94      }
95  
96      public static com.liferay.portal.model.Group updateGroup(
97          com.liferay.portal.model.Group group)
98          throws com.liferay.portal.SystemException {
99          return getService().updateGroup(group);
100     }
101 
102     public static com.liferay.portal.model.Group updateGroup(
103         com.liferay.portal.model.Group group, boolean merge)
104         throws com.liferay.portal.SystemException {
105         return getService().updateGroup(group, merge);
106     }
107 
108     public static com.liferay.portal.model.Group addGroup(long userId,
109         java.lang.String className, long classPK, java.lang.String name,
110         java.lang.String description, int type, java.lang.String friendlyURL,
111         boolean active)
112         throws com.liferay.portal.PortalException,
113             com.liferay.portal.SystemException {
114         return getService()
115                    .addGroup(userId, className, classPK, name, description,
116             type, friendlyURL, active);
117     }
118 
119     public static com.liferay.portal.model.Group addGroup(long userId,
120         java.lang.String className, long classPK, long liveGroupId,
121         java.lang.String name, java.lang.String description, int type,
122         java.lang.String friendlyURL, boolean active)
123         throws com.liferay.portal.PortalException,
124             com.liferay.portal.SystemException {
125         return getService()
126                    .addGroup(userId, className, classPK, liveGroupId, name,
127             description, type, friendlyURL, active);
128     }
129 
130     public static void addRoleGroups(long roleId, long[] groupIds)
131         throws com.liferay.portal.SystemException {
132         getService().addRoleGroups(roleId, groupIds);
133     }
134 
135     public static void addUserGroups(long userId, long[] groupIds)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         getService().addUserGroups(userId, groupIds);
139     }
140 
141     public static void checkSystemGroups(long companyId)
142         throws com.liferay.portal.PortalException,
143             com.liferay.portal.SystemException {
144         getService().checkSystemGroups(companyId);
145     }
146 
147     public static com.liferay.portal.model.Group getFriendlyURLGroup(
148         long companyId, java.lang.String friendlyURL)
149         throws com.liferay.portal.PortalException,
150             com.liferay.portal.SystemException {
151         return getService().getFriendlyURLGroup(companyId, friendlyURL);
152     }
153 
154     public static com.liferay.portal.model.Group getGroup(long companyId,
155         java.lang.String name)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException {
158         return getService().getGroup(companyId, name);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
162         java.lang.String className, boolean privateLayout, int start, int end)
163         throws com.liferay.portal.SystemException {
164         return getService()
165                    .getNoLayoutsGroups(className, privateLayout, start, end);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
169         throws com.liferay.portal.SystemException {
170         return getService().getNullFriendlyURLGroups();
171     }
172 
173     public static com.liferay.portal.model.Group getOrganizationGroup(
174         long companyId, long organizationId)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         return getService().getOrganizationGroup(companyId, organizationId);
178     }
179 
180     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
181         java.util.List<com.liferay.portal.model.Organization> organizations) {
182         return getService().getOrganizationsGroups(organizations);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
186         long roleId) throws com.liferay.portal.SystemException {
187         return getService().getRoleGroups(roleId);
188     }
189 
190     public static com.liferay.portal.model.Group getStagingGroup(
191         long liveGroupId)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException {
194         return getService().getStagingGroup(liveGroupId);
195     }
196 
197     public static com.liferay.portal.model.Group getUserGroup(long companyId,
198         long userId)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         return getService().getUserGroup(companyId, userId);
202     }
203 
204     public static com.liferay.portal.model.Group getUserGroupGroup(
205         long companyId, long userGroupId)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException {
208         return getService().getUserGroupGroup(companyId, userGroupId);
209     }
210 
211     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
212         long userId)
213         throws com.liferay.portal.PortalException,
214             com.liferay.portal.SystemException {
215         return getService().getUserGroups(userId);
216     }
217 
218     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
219         long userId, boolean inherit)
220         throws com.liferay.portal.PortalException,
221             com.liferay.portal.SystemException {
222         return getService().getUserGroups(userId, inherit);
223     }
224 
225     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
226         long userId, int start, int end)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         return getService().getUserGroups(userId, start, end);
230     }
231 
232     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
233         long userId, boolean inherit, int start, int end)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException {
236         return getService().getUserGroups(userId, inherit, start, end);
237     }
238 
239     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
240         java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
241         return getService().getUserGroupsGroups(userGroups);
242     }
243 
244     public static boolean hasRoleGroup(long roleId, long groupId)
245         throws com.liferay.portal.SystemException {
246         return getService().hasRoleGroup(roleId, groupId);
247     }
248 
249     public static boolean hasStagingGroup(long liveGroupId)
250         throws com.liferay.portal.SystemException {
251         return getService().hasStagingGroup(liveGroupId);
252     }
253 
254     public static boolean hasUserGroup(long userId, long groupId)
255         throws com.liferay.portal.SystemException {
256         return getService().hasUserGroup(userId, groupId);
257     }
258 
259     public static java.util.List<com.liferay.portal.model.Group> search(
260         long companyId, java.lang.String name, java.lang.String description,
261         java.util.LinkedHashMap<String, Object> params, int start, int end)
262         throws com.liferay.portal.SystemException {
263         return getService()
264                    .search(companyId, name, description, params, start, end);
265     }
266 
267     public static java.util.List<com.liferay.portal.model.Group> search(
268         long companyId, java.lang.String name, java.lang.String description,
269         java.util.LinkedHashMap<String, Object> params, int start, int end,
270         com.liferay.portal.kernel.util.OrderByComparator obc)
271         throws com.liferay.portal.SystemException {
272         return getService()
273                    .search(companyId, name, description, params, start, end, obc);
274     }
275 
276     public static int searchCount(long companyId, java.lang.String name,
277         java.lang.String description,
278         java.util.LinkedHashMap<String, Object> params)
279         throws com.liferay.portal.SystemException {
280         return getService().searchCount(companyId, name, description, params);
281     }
282 
283     public static void setRoleGroups(long roleId, long[] groupIds)
284         throws com.liferay.portal.SystemException {
285         getService().setRoleGroups(roleId, groupIds);
286     }
287 
288     public static void unsetRoleGroups(long roleId, long[] groupIds)
289         throws com.liferay.portal.SystemException {
290         getService().unsetRoleGroups(roleId, groupIds);
291     }
292 
293     public static void unsetUserGroups(long userId, long[] groupIds)
294         throws com.liferay.portal.SystemException {
295         getService().unsetUserGroups(userId, groupIds);
296     }
297 
298     public static com.liferay.portal.model.Group updateFriendlyURL(
299         long groupId, java.lang.String friendlyURL)
300         throws com.liferay.portal.PortalException,
301             com.liferay.portal.SystemException {
302         return getService().updateFriendlyURL(groupId, friendlyURL);
303     }
304 
305     public static com.liferay.portal.model.Group updateGroup(long groupId,
306         java.lang.String name, java.lang.String description, int type,
307         java.lang.String friendlyURL, boolean active)
308         throws com.liferay.portal.PortalException,
309             com.liferay.portal.SystemException {
310         return getService()
311                    .updateGroup(groupId, name, description, type, friendlyURL,
312             active);
313     }
314 
315     public static com.liferay.portal.model.Group updateGroup(long groupId,
316         java.lang.String typeSettings)
317         throws com.liferay.portal.PortalException,
318             com.liferay.portal.SystemException {
319         return getService().updateGroup(groupId, typeSettings);
320     }
321 
322     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
323         boolean workflowEnabled, int workflowStages,
324         java.lang.String workflowRoleNames)
325         throws com.liferay.portal.PortalException,
326             com.liferay.portal.SystemException {
327         return getService()
328                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
329             workflowRoleNames);
330     }
331 
332     public static GroupLocalService getService() {
333         if (_service == null) {
334             throw new RuntimeException("GroupLocalService is not set");
335         }
336 
337         return _service;
338     }
339 
340     public void setService(GroupLocalService service) {
341         _service = service;
342     }
343 
344     private static GroupLocalService _service;
345 }