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="GroupServiceUtil.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 GroupService} 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       GroupService
37   * @generated
38   */
39  public class GroupServiceUtil {
40      public static com.liferay.portal.model.Group addGroup(
41          java.lang.String name, java.lang.String description, int type,
42          java.lang.String friendlyURL, boolean active)
43          throws com.liferay.portal.PortalException,
44              com.liferay.portal.SystemException, java.rmi.RemoteException {
45          return getService()
46                     .addGroup(name, description, type, friendlyURL, active);
47      }
48  
49      public static com.liferay.portal.model.Group addGroup(long liveGroupId,
50          java.lang.String name, java.lang.String description, int type,
51          java.lang.String friendlyURL, boolean active)
52          throws com.liferay.portal.PortalException,
53              com.liferay.portal.SystemException, java.rmi.RemoteException {
54          return getService()
55                     .addGroup(liveGroupId, name, description, type, friendlyURL,
56              active);
57      }
58  
59      public static void addRoleGroups(long roleId, long[] groupIds)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException, java.rmi.RemoteException {
62          getService().addRoleGroups(roleId, groupIds);
63      }
64  
65      public static void deleteGroup(long groupId)
66          throws com.liferay.portal.PortalException,
67              com.liferay.portal.SystemException, java.rmi.RemoteException {
68          getService().deleteGroup(groupId);
69      }
70  
71      public static com.liferay.portal.model.Group getGroup(long groupId)
72          throws com.liferay.portal.PortalException,
73              com.liferay.portal.SystemException, java.rmi.RemoteException {
74          return getService().getGroup(groupId);
75      }
76  
77      public static com.liferay.portal.model.Group getGroup(long companyId,
78          java.lang.String name)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException, java.rmi.RemoteException {
81          return getService().getGroup(companyId, name);
82      }
83  
84      public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
85          java.util.List<com.liferay.portal.model.Organization> organizations)
86          throws java.rmi.RemoteException {
87          return getService().getOrganizationsGroups(organizations);
88      }
89  
90      public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
91          java.util.List<com.liferay.portal.model.UserGroup> userGroups)
92          throws java.rmi.RemoteException {
93          return getService().getUserGroupsGroups(userGroups);
94      }
95  
96      public static boolean hasUserGroup(long userId, long groupId)
97          throws com.liferay.portal.SystemException, java.rmi.RemoteException {
98          return getService().hasUserGroup(userId, groupId);
99      }
100 
101     public static java.util.List<com.liferay.portal.model.Group> search(
102         long companyId, java.lang.String name, java.lang.String description,
103         java.lang.String[] params, int start, int end)
104         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
105         return getService()
106                    .search(companyId, name, description, params, start, end);
107     }
108 
109     public static int searchCount(long companyId, java.lang.String name,
110         java.lang.String description, java.lang.String[] params)
111         throws com.liferay.portal.SystemException, java.rmi.RemoteException {
112         return getService().searchCount(companyId, name, description, params);
113     }
114 
115     public static void setRoleGroups(long roleId, long[] groupIds)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException, java.rmi.RemoteException {
118         getService().setRoleGroups(roleId, groupIds);
119     }
120 
121     public static void unsetRoleGroups(long roleId, long[] groupIds)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException, java.rmi.RemoteException {
124         getService().unsetRoleGroups(roleId, groupIds);
125     }
126 
127     public static com.liferay.portal.model.Group updateFriendlyURL(
128         long groupId, java.lang.String friendlyURL)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException, java.rmi.RemoteException {
131         return getService().updateFriendlyURL(groupId, friendlyURL);
132     }
133 
134     public static com.liferay.portal.model.Group updateGroup(long groupId,
135         java.lang.String name, java.lang.String description, int type,
136         java.lang.String friendlyURL, boolean active)
137         throws com.liferay.portal.PortalException,
138             com.liferay.portal.SystemException, java.rmi.RemoteException {
139         return getService()
140                    .updateGroup(groupId, name, description, type, friendlyURL,
141             active);
142     }
143 
144     public static com.liferay.portal.model.Group updateGroup(long groupId,
145         java.lang.String typeSettings)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException, java.rmi.RemoteException {
148         return getService().updateGroup(groupId, typeSettings);
149     }
150 
151     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
152         boolean workflowEnabled, int workflowStages,
153         java.lang.String workflowRoleNames)
154         throws com.liferay.portal.PortalException,
155             com.liferay.portal.SystemException, java.rmi.RemoteException {
156         return getService()
157                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
158             workflowRoleNames);
159     }
160 
161     public static GroupService getService() {
162         if (_service == null) {
163             _service = (GroupService)PortalBeanLocatorUtil.locate(GroupService.class.getName());
164         }
165 
166         return _service;
167     }
168 
169     public void setService(GroupService service) {
170         _service = service;
171     }
172 
173     private static GroupService _service;
174 }