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, com.liferay.portal.service.ServiceContext serviceContext)
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, serviceContext);
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         com.liferay.portal.service.ServiceContext serviceContext)
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, serviceContext);
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> getGroups(
163         long[] groupIds)
164         throws com.liferay.portal.PortalException,
165             com.liferay.portal.SystemException {
166         return getService().getGroups(groupIds);
167     }
168 
169     public static com.liferay.portal.model.Group getLayoutGroup(
170         long companyId, long plid)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         return getService().getLayoutGroup(companyId, plid);
174     }
175 
176     public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
177         java.lang.String className, boolean privateLayout, int start, int end)
178         throws com.liferay.portal.SystemException {
179         return getService()
180                    .getNoLayoutsGroups(className, privateLayout, start, end);
181     }
182 
183     public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
184         throws com.liferay.portal.SystemException {
185         return getService().getNullFriendlyURLGroups();
186     }
187 
188     public static com.liferay.portal.model.Group getOrganizationGroup(
189         long companyId, long organizationId)
190         throws com.liferay.portal.PortalException,
191             com.liferay.portal.SystemException {
192         return getService().getOrganizationGroup(companyId, organizationId);
193     }
194 
195     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
196         java.util.List<com.liferay.portal.model.Organization> organizations) {
197         return getService().getOrganizationsGroups(organizations);
198     }
199 
200     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
201         long roleId) throws com.liferay.portal.SystemException {
202         return getService().getRoleGroups(roleId);
203     }
204 
205     public static com.liferay.portal.model.Group getStagingGroup(
206         long liveGroupId)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         return getService().getStagingGroup(liveGroupId);
210     }
211 
212     public static com.liferay.portal.model.Group getUserGroup(long companyId,
213         long userId)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException {
216         return getService().getUserGroup(companyId, userId);
217     }
218 
219     public static com.liferay.portal.model.Group getUserGroupGroup(
220         long companyId, long userGroupId)
221         throws com.liferay.portal.PortalException,
222             com.liferay.portal.SystemException {
223         return getService().getUserGroupGroup(companyId, userGroupId);
224     }
225 
226     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
227         long userId)
228         throws com.liferay.portal.PortalException,
229             com.liferay.portal.SystemException {
230         return getService().getUserGroups(userId);
231     }
232 
233     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
234         long userId, boolean inherit)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException {
237         return getService().getUserGroups(userId, inherit);
238     }
239 
240     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
241         long userId, int start, int end)
242         throws com.liferay.portal.PortalException,
243             com.liferay.portal.SystemException {
244         return getService().getUserGroups(userId, start, end);
245     }
246 
247     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
248         long userId, boolean inherit, int start, int end)
249         throws com.liferay.portal.PortalException,
250             com.liferay.portal.SystemException {
251         return getService().getUserGroups(userId, inherit, start, end);
252     }
253 
254     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
255         java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
256         return getService().getUserGroupsGroups(userGroups);
257     }
258 
259     public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
260         long userId, int start, int end)
261         throws com.liferay.portal.PortalException,
262             com.liferay.portal.SystemException {
263         return getService().getUserOrganizationsGroups(userId, start, end);
264     }
265 
266     public static boolean hasRoleGroup(long roleId, long groupId)
267         throws com.liferay.portal.SystemException {
268         return getService().hasRoleGroup(roleId, groupId);
269     }
270 
271     public static boolean hasStagingGroup(long liveGroupId)
272         throws com.liferay.portal.SystemException {
273         return getService().hasStagingGroup(liveGroupId);
274     }
275 
276     public static boolean hasUserGroup(long userId, long groupId)
277         throws com.liferay.portal.SystemException {
278         return getService().hasUserGroup(userId, groupId);
279     }
280 
281     public static java.util.List<com.liferay.portal.model.Group> search(
282         long companyId, java.lang.String name, java.lang.String description,
283         java.util.LinkedHashMap<String, Object> params, int start, int end)
284         throws com.liferay.portal.SystemException {
285         return getService()
286                    .search(companyId, name, description, params, start, end);
287     }
288 
289     public static java.util.List<com.liferay.portal.model.Group> search(
290         long companyId, java.lang.String name, java.lang.String description,
291         java.util.LinkedHashMap<String, Object> params, int start, int end,
292         com.liferay.portal.kernel.util.OrderByComparator obc)
293         throws com.liferay.portal.SystemException {
294         return getService()
295                    .search(companyId, name, description, params, start, end, obc);
296     }
297 
298     public static int searchCount(long companyId, java.lang.String name,
299         java.lang.String description,
300         java.util.LinkedHashMap<String, Object> params)
301         throws com.liferay.portal.SystemException {
302         return getService().searchCount(companyId, name, description, params);
303     }
304 
305     public static void setRoleGroups(long roleId, long[] groupIds)
306         throws com.liferay.portal.SystemException {
307         getService().setRoleGroups(roleId, groupIds);
308     }
309 
310     public static void unsetRoleGroups(long roleId, long[] groupIds)
311         throws com.liferay.portal.SystemException {
312         getService().unsetRoleGroups(roleId, groupIds);
313     }
314 
315     public static void unsetUserGroups(long userId, long[] groupIds)
316         throws com.liferay.portal.SystemException {
317         getService().unsetUserGroups(userId, groupIds);
318     }
319 
320     public static com.liferay.portal.model.Group updateFriendlyURL(
321         long groupId, java.lang.String friendlyURL)
322         throws com.liferay.portal.PortalException,
323             com.liferay.portal.SystemException {
324         return getService().updateFriendlyURL(groupId, friendlyURL);
325     }
326 
327     public static com.liferay.portal.model.Group updateGroup(long groupId,
328         java.lang.String name, java.lang.String description, int type,
329         java.lang.String friendlyURL, boolean active,
330         com.liferay.portal.service.ServiceContext serviceContext)
331         throws com.liferay.portal.PortalException,
332             com.liferay.portal.SystemException {
333         return getService()
334                    .updateGroup(groupId, name, description, type, friendlyURL,
335             active, serviceContext);
336     }
337 
338     public static com.liferay.portal.model.Group updateGroup(long groupId,
339         java.lang.String typeSettings)
340         throws com.liferay.portal.PortalException,
341             com.liferay.portal.SystemException {
342         return getService().updateGroup(groupId, typeSettings);
343     }
344 
345     public static void updateTagsAsset(long userId,
346         com.liferay.portal.model.Group group,
347         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
348         throws com.liferay.portal.PortalException,
349             com.liferay.portal.SystemException {
350         getService().updateTagsAsset(userId, group, tagsCategories, tagsEntries);
351     }
352 
353     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
354         boolean workflowEnabled, int workflowStages,
355         java.lang.String workflowRoleNames)
356         throws com.liferay.portal.PortalException,
357             com.liferay.portal.SystemException {
358         return getService()
359                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
360             workflowRoleNames);
361     }
362 
363     public static GroupLocalService getService() {
364         if (_service == null) {
365             throw new RuntimeException("GroupLocalService is not set");
366         }
367 
368         return _service;
369     }
370 
371     public void setService(GroupLocalService service) {
372         _service = service;
373     }
374 
375     private static GroupLocalService _service;
376 }