001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class GroupLocalServiceUtil {
037
044 public static com.liferay.portal.model.Group addGroup(
045 com.liferay.portal.model.Group group)
046 throws com.liferay.portal.kernel.exception.SystemException {
047 return getService().addGroup(group);
048 }
049
050
056 public static com.liferay.portal.model.Group createGroup(long groupId) {
057 return getService().createGroup(groupId);
058 }
059
060
067 public static void deleteGroup(long groupId)
068 throws com.liferay.portal.kernel.exception.PortalException,
069 com.liferay.portal.kernel.exception.SystemException {
070 getService().deleteGroup(groupId);
071 }
072
073
079 public static void deleteGroup(com.liferay.portal.model.Group group)
080 throws com.liferay.portal.kernel.exception.SystemException {
081 getService().deleteGroup(group);
082 }
083
084
091 @SuppressWarnings("rawtypes")
092 public static java.util.List dynamicQuery(
093 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
094 throws com.liferay.portal.kernel.exception.SystemException {
095 return getService().dynamicQuery(dynamicQuery);
096 }
097
098
111 @SuppressWarnings("rawtypes")
112 public static java.util.List dynamicQuery(
113 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
114 int end) throws com.liferay.portal.kernel.exception.SystemException {
115 return getService().dynamicQuery(dynamicQuery, start, end);
116 }
117
118
132 @SuppressWarnings("rawtypes")
133 public static java.util.List dynamicQuery(
134 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
135 int end,
136 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
137 throws com.liferay.portal.kernel.exception.SystemException {
138 return getService()
139 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
140 }
141
142
149 public static long dynamicQueryCount(
150 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151 throws com.liferay.portal.kernel.exception.SystemException {
152 return getService().dynamicQueryCount(dynamicQuery);
153 }
154
155
163 public static com.liferay.portal.model.Group getGroup(long groupId)
164 throws com.liferay.portal.kernel.exception.PortalException,
165 com.liferay.portal.kernel.exception.SystemException {
166 return getService().getGroup(groupId);
167 }
168
169
181 public static java.util.List<com.liferay.portal.model.Group> getGroups(
182 int start, int end)
183 throws com.liferay.portal.kernel.exception.SystemException {
184 return getService().getGroups(start, end);
185 }
186
187
193 public static int getGroupsCount()
194 throws com.liferay.portal.kernel.exception.SystemException {
195 return getService().getGroupsCount();
196 }
197
198
205 public static com.liferay.portal.model.Group updateGroup(
206 com.liferay.portal.model.Group group)
207 throws com.liferay.portal.kernel.exception.SystemException {
208 return getService().updateGroup(group);
209 }
210
211
219 public static com.liferay.portal.model.Group updateGroup(
220 com.liferay.portal.model.Group group, boolean merge)
221 throws com.liferay.portal.kernel.exception.SystemException {
222 return getService().updateGroup(group, merge);
223 }
224
225 public static com.liferay.portal.model.Group addGroup(long userId,
226 java.lang.String className, long classPK, java.lang.String name,
227 java.lang.String description, int type, java.lang.String friendlyURL,
228 boolean active, com.liferay.portal.service.ServiceContext serviceContext)
229 throws com.liferay.portal.kernel.exception.PortalException,
230 com.liferay.portal.kernel.exception.SystemException {
231 return getService()
232 .addGroup(userId, className, classPK, name, description,
233 type, friendlyURL, active, serviceContext);
234 }
235
236 public static com.liferay.portal.model.Group addGroup(long userId,
237 java.lang.String className, long classPK, long liveGroupId,
238 java.lang.String name, java.lang.String description, int type,
239 java.lang.String friendlyURL, boolean active,
240 com.liferay.portal.service.ServiceContext serviceContext)
241 throws com.liferay.portal.kernel.exception.PortalException,
242 com.liferay.portal.kernel.exception.SystemException {
243 return getService()
244 .addGroup(userId, className, classPK, liveGroupId, name,
245 description, type, friendlyURL, active, serviceContext);
246 }
247
248 public static void addRoleGroups(long roleId, long[] groupIds)
249 throws com.liferay.portal.kernel.exception.SystemException {
250 getService().addRoleGroups(roleId, groupIds);
251 }
252
253 public static void addUserGroups(long userId, long[] groupIds)
254 throws com.liferay.portal.kernel.exception.SystemException {
255 getService().addUserGroups(userId, groupIds);
256 }
257
258 public static void checkCompanyGroup(long companyId)
259 throws com.liferay.portal.kernel.exception.PortalException,
260 com.liferay.portal.kernel.exception.SystemException {
261 getService().checkCompanyGroup(companyId);
262 }
263
264 public static void checkSystemGroups(long companyId)
265 throws com.liferay.portal.kernel.exception.PortalException,
266 com.liferay.portal.kernel.exception.SystemException {
267 getService().checkSystemGroups(companyId);
268 }
269
270 public static com.liferay.portal.model.Group getCompanyGroup(long companyId)
271 throws com.liferay.portal.kernel.exception.PortalException,
272 com.liferay.portal.kernel.exception.SystemException {
273 return getService().getCompanyGroup(companyId);
274 }
275
276 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
277 long companyId, int start, int end)
278 throws com.liferay.portal.kernel.exception.SystemException {
279 return getService().getCompanyGroups(companyId, start, end);
280 }
281
282 public static int getCompanyGroupsCount(long companyId)
283 throws com.liferay.portal.kernel.exception.SystemException {
284 return getService().getCompanyGroupsCount(companyId);
285 }
286
287 public static com.liferay.portal.model.Group getFriendlyURLGroup(
288 long companyId, java.lang.String friendlyURL)
289 throws com.liferay.portal.kernel.exception.PortalException,
290 com.liferay.portal.kernel.exception.SystemException {
291 return getService().getFriendlyURLGroup(companyId, friendlyURL);
292 }
293
294 public static com.liferay.portal.model.Group getGroup(long companyId,
295 java.lang.String name)
296 throws com.liferay.portal.kernel.exception.PortalException,
297 com.liferay.portal.kernel.exception.SystemException {
298 return getService().getGroup(companyId, name);
299 }
300
301 public static java.util.List<com.liferay.portal.model.Group> getGroups(
302 long[] groupIds)
303 throws com.liferay.portal.kernel.exception.PortalException,
304 com.liferay.portal.kernel.exception.SystemException {
305 return getService().getGroups(groupIds);
306 }
307
308 public static com.liferay.portal.model.Group getLayoutGroup(
309 long companyId, long plid)
310 throws com.liferay.portal.kernel.exception.PortalException,
311 com.liferay.portal.kernel.exception.SystemException {
312 return getService().getLayoutGroup(companyId, plid);
313 }
314
315 public static com.liferay.portal.model.Group getLayoutPrototypeGroup(
316 long companyId, long layoutPrototypeId)
317 throws com.liferay.portal.kernel.exception.PortalException,
318 com.liferay.portal.kernel.exception.SystemException {
319 return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId);
320 }
321
322 public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
323 long companyId, long layoutSetPrototypeId)
324 throws com.liferay.portal.kernel.exception.PortalException,
325 com.liferay.portal.kernel.exception.SystemException {
326 return getService()
327 .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId);
328 }
329
330 public static java.util.List<com.liferay.portal.model.Group> getLiveGroups()
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getService().getLiveGroups();
333 }
334
335 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
336 java.lang.String className, boolean privateLayout, int start, int end)
337 throws com.liferay.portal.kernel.exception.SystemException {
338 return getService()
339 .getNoLayoutsGroups(className, privateLayout, start, end);
340 }
341
342 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
343 throws com.liferay.portal.kernel.exception.SystemException {
344 return getService().getNullFriendlyURLGroups();
345 }
346
347 public static com.liferay.portal.model.Group getOrganizationGroup(
348 long companyId, long organizationId)
349 throws com.liferay.portal.kernel.exception.PortalException,
350 com.liferay.portal.kernel.exception.SystemException {
351 return getService().getOrganizationGroup(companyId, organizationId);
352 }
353
354 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
355 java.util.List<com.liferay.portal.model.Organization> organizations) {
356 return getService().getOrganizationsGroups(organizations);
357 }
358
359 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
360 java.util.List<com.liferay.portal.model.Organization> organizations)
361 throws com.liferay.portal.kernel.exception.SystemException {
362 return getService().getOrganizationsRelatedGroups(organizations);
363 }
364
365 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
366 long roleId) throws com.liferay.portal.kernel.exception.SystemException {
367 return getService().getRoleGroups(roleId);
368 }
369
370 public static com.liferay.portal.model.Group getStagingGroup(
371 long liveGroupId)
372 throws com.liferay.portal.kernel.exception.PortalException,
373 com.liferay.portal.kernel.exception.SystemException {
374 return getService().getStagingGroup(liveGroupId);
375 }
376
377 public static com.liferay.portal.model.Group getUserGroup(long companyId,
378 long userId)
379 throws com.liferay.portal.kernel.exception.PortalException,
380 com.liferay.portal.kernel.exception.SystemException {
381 return getService().getUserGroup(companyId, userId);
382 }
383
384 public static com.liferay.portal.model.Group getUserGroupGroup(
385 long companyId, long userGroupId)
386 throws com.liferay.portal.kernel.exception.PortalException,
387 com.liferay.portal.kernel.exception.SystemException {
388 return getService().getUserGroupGroup(companyId, userGroupId);
389 }
390
391 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
392 long userId)
393 throws com.liferay.portal.kernel.exception.PortalException,
394 com.liferay.portal.kernel.exception.SystemException {
395 return getService().getUserGroups(userId);
396 }
397
398 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
399 long userId, boolean inherit)
400 throws com.liferay.portal.kernel.exception.PortalException,
401 com.liferay.portal.kernel.exception.SystemException {
402 return getService().getUserGroups(userId, inherit);
403 }
404
405 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
406 long userId, int start, int end)
407 throws com.liferay.portal.kernel.exception.PortalException,
408 com.liferay.portal.kernel.exception.SystemException {
409 return getService().getUserGroups(userId, start, end);
410 }
411
412 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
413 long userId, boolean inherit, int start, int end)
414 throws com.liferay.portal.kernel.exception.PortalException,
415 com.liferay.portal.kernel.exception.SystemException {
416 return getService().getUserGroups(userId, inherit, start, end);
417 }
418
419 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
420 java.util.List<com.liferay.portal.model.UserGroup> userGroups)
421 throws com.liferay.portal.kernel.exception.PortalException,
422 com.liferay.portal.kernel.exception.SystemException {
423 return getService().getUserGroupsGroups(userGroups);
424 }
425
426 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
427 java.util.List<com.liferay.portal.model.UserGroup> userGroups)
428 throws com.liferay.portal.kernel.exception.SystemException {
429 return getService().getUserGroupsRelatedGroups(userGroups);
430 }
431
432 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
433 long userId, int start, int end)
434 throws com.liferay.portal.kernel.exception.PortalException,
435 com.liferay.portal.kernel.exception.SystemException {
436 return getService().getUserOrganizationsGroups(userId, start, end);
437 }
438
439 public static boolean hasRoleGroup(long roleId, long groupId)
440 throws com.liferay.portal.kernel.exception.SystemException {
441 return getService().hasRoleGroup(roleId, groupId);
442 }
443
444 public static boolean hasStagingGroup(long liveGroupId)
445 throws com.liferay.portal.kernel.exception.SystemException {
446 return getService().hasStagingGroup(liveGroupId);
447 }
448
449 public static boolean hasUserGroup(long userId, long groupId)
450 throws com.liferay.portal.kernel.exception.SystemException {
451 return getService().hasUserGroup(userId, groupId);
452 }
453
454 public static java.util.List<com.liferay.portal.model.Group> search(
455 long companyId, java.lang.String name, java.lang.String description,
456 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
457 int start, int end)
458 throws com.liferay.portal.kernel.exception.SystemException {
459 return getService()
460 .search(companyId, name, description, params, start, end);
461 }
462
463 public static java.util.List<com.liferay.portal.model.Group> search(
464 long companyId, java.lang.String name, java.lang.String description,
465 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
466 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
467 throws com.liferay.portal.kernel.exception.SystemException {
468 return getService()
469 .search(companyId, name, description, params, start, end, obc);
470 }
471
472 public static int searchCount(long companyId, java.lang.String name,
473 java.lang.String description,
474 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
475 throws com.liferay.portal.kernel.exception.SystemException {
476 return getService().searchCount(companyId, name, description, params);
477 }
478
479 public static void setRoleGroups(long roleId, long[] groupIds)
480 throws com.liferay.portal.kernel.exception.SystemException {
481 getService().setRoleGroups(roleId, groupIds);
482 }
483
484 public static void unsetRoleGroups(long roleId, long[] groupIds)
485 throws com.liferay.portal.kernel.exception.SystemException {
486 getService().unsetRoleGroups(roleId, groupIds);
487 }
488
489 public static void unsetUserGroups(long userId, long[] groupIds)
490 throws com.liferay.portal.kernel.exception.SystemException {
491 getService().unsetUserGroups(userId, groupIds);
492 }
493
494 public static void updateAsset(long userId,
495 com.liferay.portal.model.Group group, long[] assetCategoryIds,
496 java.lang.String[] assetTagNames)
497 throws com.liferay.portal.kernel.exception.PortalException,
498 com.liferay.portal.kernel.exception.SystemException {
499 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames);
500 }
501
502 public static com.liferay.portal.model.Group updateFriendlyURL(
503 long groupId, java.lang.String friendlyURL)
504 throws com.liferay.portal.kernel.exception.PortalException,
505 com.liferay.portal.kernel.exception.SystemException {
506 return getService().updateFriendlyURL(groupId, friendlyURL);
507 }
508
509 public static com.liferay.portal.model.Group updateGroup(long groupId,
510 java.lang.String name, java.lang.String description, int type,
511 java.lang.String friendlyURL, boolean active,
512 com.liferay.portal.service.ServiceContext serviceContext)
513 throws com.liferay.portal.kernel.exception.PortalException,
514 com.liferay.portal.kernel.exception.SystemException {
515 return getService()
516 .updateGroup(groupId, name, description, type, friendlyURL,
517 active, serviceContext);
518 }
519
520 public static com.liferay.portal.model.Group updateGroup(long groupId,
521 java.lang.String typeSettings)
522 throws com.liferay.portal.kernel.exception.PortalException,
523 com.liferay.portal.kernel.exception.SystemException {
524 return getService().updateGroup(groupId, typeSettings);
525 }
526
527 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
528 boolean workflowEnabled, int workflowStages,
529 java.lang.String workflowRoleNames)
530 throws com.liferay.portal.kernel.exception.PortalException,
531 com.liferay.portal.kernel.exception.SystemException {
532 return getService()
533 .updateWorkflow(groupId, workflowEnabled, workflowStages,
534 workflowRoleNames);
535 }
536
537 public static GroupLocalService getService() {
538 if (_service == null) {
539 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName());
540 }
541
542 return _service;
543 }
544
545 public void setService(GroupLocalService service) {
546 _service = service;
547 }
548
549 private static GroupLocalService _service;
550 }