1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portal.service;
21  
22  
23  /**
24   * <a href="GroupLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portal.service.GroupLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portal.service.GroupLocalService
42   *
43   */
44  public class GroupLocalServiceUtil {
45      public static com.liferay.portal.model.Group addGroup(
46          com.liferay.portal.model.Group group)
47          throws com.liferay.portal.SystemException {
48          return getService().addGroup(group);
49      }
50  
51      public static com.liferay.portal.model.Group createGroup(long groupId) {
52          return getService().createGroup(groupId);
53      }
54  
55      public static void deleteGroup(long groupId)
56          throws com.liferay.portal.PortalException,
57              com.liferay.portal.SystemException {
58          getService().deleteGroup(groupId);
59      }
60  
61      public static void deleteGroup(com.liferay.portal.model.Group group)
62          throws com.liferay.portal.SystemException {
63          getService().deleteGroup(group);
64      }
65  
66      public static java.util.List<Object> dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      public static java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
74          int end) throws com.liferay.portal.SystemException {
75          return getService().dynamicQuery(dynamicQuery, start, end);
76      }
77  
78      public static com.liferay.portal.model.Group getGroup(long groupId)
79          throws com.liferay.portal.PortalException,
80              com.liferay.portal.SystemException {
81          return getService().getGroup(groupId);
82      }
83  
84      public static java.util.List<com.liferay.portal.model.Group> getGroups(
85          int start, int end) throws com.liferay.portal.SystemException {
86          return getService().getGroups(start, end);
87      }
88  
89      public static int getGroupsCount()
90          throws com.liferay.portal.SystemException {
91          return getService().getGroupsCount();
92      }
93  
94      public static com.liferay.portal.model.Group updateGroup(
95          com.liferay.portal.model.Group group)
96          throws com.liferay.portal.SystemException {
97          return getService().updateGroup(group);
98      }
99  
100     public static com.liferay.portal.model.Group updateGroup(
101         com.liferay.portal.model.Group group, boolean merge)
102         throws com.liferay.portal.SystemException {
103         return getService().updateGroup(group, merge);
104     }
105 
106     public static com.liferay.portal.model.Group addGroup(long userId,
107         java.lang.String className, long classPK, java.lang.String name,
108         java.lang.String description, int type, java.lang.String friendlyURL,
109         boolean active, com.liferay.portal.service.ServiceContext serviceContext)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException {
112         return getService()
113                    .addGroup(userId, className, classPK, name, description,
114             type, friendlyURL, active, serviceContext);
115     }
116 
117     public static com.liferay.portal.model.Group addGroup(long userId,
118         java.lang.String className, long classPK, long liveGroupId,
119         java.lang.String name, java.lang.String description, int type,
120         java.lang.String friendlyURL, boolean active,
121         com.liferay.portal.service.ServiceContext serviceContext)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         return getService()
125                    .addGroup(userId, className, classPK, liveGroupId, name,
126             description, type, friendlyURL, active, serviceContext);
127     }
128 
129     public static void addRoleGroups(long roleId, long[] groupIds)
130         throws com.liferay.portal.SystemException {
131         getService().addRoleGroups(roleId, groupIds);
132     }
133 
134     public static void addUserGroups(long userId, long[] groupIds)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException {
137         getService().addUserGroups(userId, groupIds);
138     }
139 
140     public static void checkSystemGroups(long companyId)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         getService().checkSystemGroups(companyId);
144     }
145 
146     public static com.liferay.portal.model.Group getFriendlyURLGroup(
147         long companyId, java.lang.String friendlyURL)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService().getFriendlyURLGroup(companyId, friendlyURL);
151     }
152 
153     public static com.liferay.portal.model.Group getGroup(long companyId,
154         java.lang.String name)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         return getService().getGroup(companyId, name);
158     }
159 
160     public static java.util.List<com.liferay.portal.model.Group> getGroups(
161         long[] groupIds)
162         throws com.liferay.portal.PortalException,
163             com.liferay.portal.SystemException {
164         return getService().getGroups(groupIds);
165     }
166 
167     public static com.liferay.portal.model.Group getLayoutGroup(
168         long companyId, long plid)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         return getService().getLayoutGroup(companyId, plid);
172     }
173 
174     public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
175         java.lang.String className, boolean privateLayout, int start, int end)
176         throws com.liferay.portal.SystemException {
177         return getService()
178                    .getNoLayoutsGroups(className, privateLayout, start, end);
179     }
180 
181     public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
182         throws com.liferay.portal.SystemException {
183         return getService().getNullFriendlyURLGroups();
184     }
185 
186     public static com.liferay.portal.model.Group getOrganizationGroup(
187         long companyId, long organizationId)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         return getService().getOrganizationGroup(companyId, organizationId);
191     }
192 
193     public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
194         java.util.List<com.liferay.portal.model.Organization> organizations) {
195         return getService().getOrganizationsGroups(organizations);
196     }
197 
198     public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
199         long roleId) throws com.liferay.portal.SystemException {
200         return getService().getRoleGroups(roleId);
201     }
202 
203     public static com.liferay.portal.model.Group getStagingGroup(
204         long liveGroupId)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         return getService().getStagingGroup(liveGroupId);
208     }
209 
210     public static com.liferay.portal.model.Group getUserGroup(long companyId,
211         long userId)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException {
214         return getService().getUserGroup(companyId, userId);
215     }
216 
217     public static com.liferay.portal.model.Group getUserGroupGroup(
218         long companyId, long userGroupId)
219         throws com.liferay.portal.PortalException,
220             com.liferay.portal.SystemException {
221         return getService().getUserGroupGroup(companyId, userGroupId);
222     }
223 
224     public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
225         long userId) throws com.liferay.portal.SystemException {
226         return getService().getUserGroups(userId);
227     }
228 
229     public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
230         java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
231         return getService().getUserGroupsGroups(userGroups);
232     }
233 
234     public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
235         long userId, int start, int end)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException {
238         return getService().getUserOrganizationsGroups(userId, start, end);
239     }
240 
241     public static boolean hasRoleGroup(long roleId, long groupId)
242         throws com.liferay.portal.SystemException {
243         return getService().hasRoleGroup(roleId, groupId);
244     }
245 
246     public static boolean hasStagingGroup(long liveGroupId)
247         throws com.liferay.portal.SystemException {
248         return getService().hasStagingGroup(liveGroupId);
249     }
250 
251     public static boolean hasUserGroup(long userId, long groupId)
252         throws com.liferay.portal.SystemException {
253         return getService().hasUserGroup(userId, groupId);
254     }
255 
256     public static java.util.List<com.liferay.portal.model.Group> search(
257         long companyId, java.lang.String name, java.lang.String description,
258         java.util.LinkedHashMap<String, Object> params, int start, int end)
259         throws com.liferay.portal.SystemException {
260         return getService()
261                    .search(companyId, name, description, params, start, end);
262     }
263 
264     public static java.util.List<com.liferay.portal.model.Group> search(
265         long companyId, java.lang.String name, java.lang.String description,
266         java.util.LinkedHashMap<String, Object> params, int start, int end,
267         com.liferay.portal.kernel.util.OrderByComparator obc)
268         throws com.liferay.portal.SystemException {
269         return getService()
270                    .search(companyId, name, description, params, start, end, obc);
271     }
272 
273     public static int searchCount(long companyId, java.lang.String name,
274         java.lang.String description,
275         java.util.LinkedHashMap<String, Object> params)
276         throws com.liferay.portal.SystemException {
277         return getService().searchCount(companyId, name, description, params);
278     }
279 
280     public static void setRoleGroups(long roleId, long[] groupIds)
281         throws com.liferay.portal.SystemException {
282         getService().setRoleGroups(roleId, groupIds);
283     }
284 
285     public static void unsetRoleGroups(long roleId, long[] groupIds)
286         throws com.liferay.portal.SystemException {
287         getService().unsetRoleGroups(roleId, groupIds);
288     }
289 
290     public static void unsetUserGroups(long userId, long[] groupIds)
291         throws com.liferay.portal.SystemException {
292         getService().unsetUserGroups(userId, groupIds);
293     }
294 
295     public static com.liferay.portal.model.Group updateFriendlyURL(
296         long groupId, java.lang.String friendlyURL)
297         throws com.liferay.portal.PortalException,
298             com.liferay.portal.SystemException {
299         return getService().updateFriendlyURL(groupId, friendlyURL);
300     }
301 
302     public static com.liferay.portal.model.Group updateGroup(long groupId,
303         java.lang.String name, java.lang.String description, int type,
304         java.lang.String friendlyURL, boolean active,
305         com.liferay.portal.service.ServiceContext serviceContext)
306         throws com.liferay.portal.PortalException,
307             com.liferay.portal.SystemException {
308         return getService()
309                    .updateGroup(groupId, name, description, type, friendlyURL,
310             active, serviceContext);
311     }
312 
313     public static com.liferay.portal.model.Group updateGroup(long groupId,
314         java.lang.String typeSettings)
315         throws com.liferay.portal.PortalException,
316             com.liferay.portal.SystemException {
317         return getService().updateGroup(groupId, typeSettings);
318     }
319 
320     public static void updateTagsAsset(long userId,
321         com.liferay.portal.model.Group group,
322         java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
323         throws com.liferay.portal.PortalException,
324             com.liferay.portal.SystemException {
325         getService().updateTagsAsset(userId, group, tagsCategories, tagsEntries);
326     }
327 
328     public static com.liferay.portal.model.Group updateWorkflow(long groupId,
329         boolean workflowEnabled, int workflowStages,
330         java.lang.String workflowRoleNames)
331         throws com.liferay.portal.PortalException,
332             com.liferay.portal.SystemException {
333         return getService()
334                    .updateWorkflow(groupId, workflowEnabled, workflowStages,
335             workflowRoleNames);
336     }
337 
338     public static GroupLocalService getService() {
339         if (_service == null) {
340             throw new RuntimeException("GroupLocalService is not set");
341         }
342 
343         return _service;
344     }
345 
346     public void setService(GroupLocalService service) {
347         _service = service;
348     }
349 
350     private static GroupLocalService _service;
351 }