001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class GroupLocalServiceUtil {
035
040
041
048 public static com.liferay.portal.model.Group addGroup(
049 com.liferay.portal.model.Group group)
050 throws com.liferay.portal.kernel.exception.SystemException {
051 return getService().addGroup(group);
052 }
053
054
060 public static com.liferay.portal.model.Group createGroup(long groupId) {
061 return getService().createGroup(groupId);
062 }
063
064
071 public static void deleteGroup(long groupId)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException {
074 getService().deleteGroup(groupId);
075 }
076
077
084 public static void deleteGroup(com.liferay.portal.model.Group group)
085 throws com.liferay.portal.kernel.exception.PortalException,
086 com.liferay.portal.kernel.exception.SystemException {
087 getService().deleteGroup(group);
088 }
089
090
097 @SuppressWarnings("rawtypes")
098 public static java.util.List dynamicQuery(
099 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().dynamicQuery(dynamicQuery);
102 }
103
104
117 @SuppressWarnings("rawtypes")
118 public static java.util.List dynamicQuery(
119 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
120 int end) throws com.liferay.portal.kernel.exception.SystemException {
121 return getService().dynamicQuery(dynamicQuery, start, end);
122 }
123
124
138 @SuppressWarnings("rawtypes")
139 public static java.util.List dynamicQuery(
140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141 int end,
142 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143 throws com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
146 }
147
148
155 public static long dynamicQueryCount(
156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157 throws com.liferay.portal.kernel.exception.SystemException {
158 return getService().dynamicQueryCount(dynamicQuery);
159 }
160
161
169 public static com.liferay.portal.model.Group getGroup(long groupId)
170 throws com.liferay.portal.kernel.exception.PortalException,
171 com.liferay.portal.kernel.exception.SystemException {
172 return getService().getGroup(groupId);
173 }
174
175 public static com.liferay.portal.model.PersistedModel getPersistedModel(
176 java.io.Serializable primaryKeyObj)
177 throws com.liferay.portal.kernel.exception.PortalException,
178 com.liferay.portal.kernel.exception.SystemException {
179 return getService().getPersistedModel(primaryKeyObj);
180 }
181
182
194 public static java.util.List<com.liferay.portal.model.Group> getGroups(
195 int start, int end)
196 throws com.liferay.portal.kernel.exception.SystemException {
197 return getService().getGroups(start, end);
198 }
199
200
206 public static int getGroupsCount()
207 throws com.liferay.portal.kernel.exception.SystemException {
208 return getService().getGroupsCount();
209 }
210
211
218 public static com.liferay.portal.model.Group updateGroup(
219 com.liferay.portal.model.Group group)
220 throws com.liferay.portal.kernel.exception.SystemException {
221 return getService().updateGroup(group);
222 }
223
224
232 public static com.liferay.portal.model.Group updateGroup(
233 com.liferay.portal.model.Group group, boolean merge)
234 throws com.liferay.portal.kernel.exception.SystemException {
235 return getService().updateGroup(group, merge);
236 }
237
238
243 public static java.lang.String getBeanIdentifier() {
244 return getService().getBeanIdentifier();
245 }
246
247
252 public static void setBeanIdentifier(java.lang.String beanIdentifier) {
253 getService().setBeanIdentifier(beanIdentifier);
254 }
255
256 public static com.liferay.portal.model.Group addGroup(long userId,
257 java.lang.String className, long classPK, long liveGroupId,
258 java.lang.String name, java.lang.String description, int type,
259 java.lang.String friendlyURL, boolean active,
260 com.liferay.portal.service.ServiceContext serviceContext)
261 throws com.liferay.portal.kernel.exception.PortalException,
262 com.liferay.portal.kernel.exception.SystemException {
263 return getService()
264 .addGroup(userId, className, classPK, liveGroupId, name,
265 description, type, friendlyURL, active, serviceContext);
266 }
267
268 public static com.liferay.portal.model.Group addGroup(long userId,
269 java.lang.String className, long classPK, java.lang.String name,
270 java.lang.String description, int type, java.lang.String friendlyURL,
271 boolean active, com.liferay.portal.service.ServiceContext serviceContext)
272 throws com.liferay.portal.kernel.exception.PortalException,
273 com.liferay.portal.kernel.exception.SystemException {
274 return getService()
275 .addGroup(userId, className, classPK, name, description,
276 type, friendlyURL, active, serviceContext);
277 }
278
279 public static void addRoleGroups(long roleId, long[] groupIds)
280 throws com.liferay.portal.kernel.exception.SystemException {
281 getService().addRoleGroups(roleId, groupIds);
282 }
283
284 public static void addUserGroups(long userId, long[] groupIds)
285 throws com.liferay.portal.kernel.exception.SystemException {
286 getService().addUserGroups(userId, groupIds);
287 }
288
289 public static void checkCompanyGroup(long companyId)
290 throws com.liferay.portal.kernel.exception.PortalException,
291 com.liferay.portal.kernel.exception.SystemException {
292 getService().checkCompanyGroup(companyId);
293 }
294
295 public static void checkSystemGroups(long companyId)
296 throws com.liferay.portal.kernel.exception.PortalException,
297 com.liferay.portal.kernel.exception.SystemException {
298 getService().checkSystemGroups(companyId);
299 }
300
301 public static com.liferay.portal.model.Group fetchFriendlyURLGroup(
302 long companyId, java.lang.String friendlyURL)
303 throws com.liferay.portal.kernel.exception.SystemException {
304 return getService().fetchFriendlyURLGroup(companyId, friendlyURL);
305 }
306
307 public static com.liferay.portal.model.Group fetchGroup(long groupId)
308 throws com.liferay.portal.kernel.exception.SystemException {
309 return getService().fetchGroup(groupId);
310 }
311
312 public static com.liferay.portal.model.Group fetchGroup(long companyId,
313 java.lang.String name)
314 throws com.liferay.portal.kernel.exception.SystemException {
315 return getService().fetchGroup(companyId, name);
316 }
317
318 public static com.liferay.portal.model.Group getCompanyGroup(long companyId)
319 throws com.liferay.portal.kernel.exception.PortalException,
320 com.liferay.portal.kernel.exception.SystemException {
321 return getService().getCompanyGroup(companyId);
322 }
323
324 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
325 long companyId, int start, int end)
326 throws com.liferay.portal.kernel.exception.SystemException {
327 return getService().getCompanyGroups(companyId, start, end);
328 }
329
330 public static int getCompanyGroupsCount(long companyId)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getService().getCompanyGroupsCount(companyId);
333 }
334
335 public static com.liferay.portal.model.Group getFriendlyURLGroup(
336 long companyId, java.lang.String friendlyURL)
337 throws com.liferay.portal.kernel.exception.PortalException,
338 com.liferay.portal.kernel.exception.SystemException {
339 return getService().getFriendlyURLGroup(companyId, friendlyURL);
340 }
341
342 public static com.liferay.portal.model.Group getGroup(long companyId,
343 java.lang.String name)
344 throws com.liferay.portal.kernel.exception.PortalException,
345 com.liferay.portal.kernel.exception.SystemException {
346 return getService().getGroup(companyId, name);
347 }
348
349 public static java.util.List<com.liferay.portal.model.Group> getGroups(
350 long[] groupIds)
351 throws com.liferay.portal.kernel.exception.PortalException,
352 com.liferay.portal.kernel.exception.SystemException {
353 return getService().getGroups(groupIds);
354 }
355
356 public static com.liferay.portal.model.Group getLayoutGroup(
357 long companyId, long plid)
358 throws com.liferay.portal.kernel.exception.PortalException,
359 com.liferay.portal.kernel.exception.SystemException {
360 return getService().getLayoutGroup(companyId, plid);
361 }
362
363 public static com.liferay.portal.model.Group getLayoutPrototypeGroup(
364 long companyId, long layoutPrototypeId)
365 throws com.liferay.portal.kernel.exception.PortalException,
366 com.liferay.portal.kernel.exception.SystemException {
367 return getService().getLayoutPrototypeGroup(companyId, layoutPrototypeId);
368 }
369
370 public static com.liferay.portal.model.Group getLayoutSetPrototypeGroup(
371 long companyId, long layoutSetPrototypeId)
372 throws com.liferay.portal.kernel.exception.PortalException,
373 com.liferay.portal.kernel.exception.SystemException {
374 return getService()
375 .getLayoutSetPrototypeGroup(companyId, layoutSetPrototypeId);
376 }
377
378 public static java.util.List<com.liferay.portal.model.Group> getLiveGroups()
379 throws com.liferay.portal.kernel.exception.SystemException {
380 return getService().getLiveGroups();
381 }
382
383 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
384 java.lang.String className, boolean privateLayout, int start, int end)
385 throws com.liferay.portal.kernel.exception.SystemException {
386 return getService()
387 .getNoLayoutsGroups(className, privateLayout, start, end);
388 }
389
390 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
391 throws com.liferay.portal.kernel.exception.SystemException {
392 return getService().getNullFriendlyURLGroups();
393 }
394
395 public static com.liferay.portal.model.Group getOrganizationGroup(
396 long companyId, long organizationId)
397 throws com.liferay.portal.kernel.exception.PortalException,
398 com.liferay.portal.kernel.exception.SystemException {
399 return getService().getOrganizationGroup(companyId, organizationId);
400 }
401
402 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
403 java.util.List<com.liferay.portal.model.Organization> organizations) {
404 return getService().getOrganizationsGroups(organizations);
405 }
406
407 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
408 java.util.List<com.liferay.portal.model.Organization> organizations)
409 throws com.liferay.portal.kernel.exception.SystemException {
410 return getService().getOrganizationsRelatedGroups(organizations);
411 }
412
413 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
414 long roleId) throws com.liferay.portal.kernel.exception.SystemException {
415 return getService().getRoleGroups(roleId);
416 }
417
418 public static com.liferay.portal.model.Group getStagingGroup(
419 long liveGroupId)
420 throws com.liferay.portal.kernel.exception.PortalException,
421 com.liferay.portal.kernel.exception.SystemException {
422 return getService().getStagingGroup(liveGroupId);
423 }
424
425 public static com.liferay.portal.model.Group getUserGroup(long companyId,
426 long userId)
427 throws com.liferay.portal.kernel.exception.PortalException,
428 com.liferay.portal.kernel.exception.SystemException {
429 return getService().getUserGroup(companyId, userId);
430 }
431
432 public static com.liferay.portal.model.Group getUserGroupGroup(
433 long companyId, long userGroupId)
434 throws com.liferay.portal.kernel.exception.PortalException,
435 com.liferay.portal.kernel.exception.SystemException {
436 return getService().getUserGroupGroup(companyId, userGroupId);
437 }
438
439 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
440 long userId)
441 throws com.liferay.portal.kernel.exception.PortalException,
442 com.liferay.portal.kernel.exception.SystemException {
443 return getService().getUserGroups(userId);
444 }
445
446 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
447 long userId, boolean inherit)
448 throws com.liferay.portal.kernel.exception.PortalException,
449 com.liferay.portal.kernel.exception.SystemException {
450 return getService().getUserGroups(userId, inherit);
451 }
452
453 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
454 long userId, boolean inherit, int start, int end)
455 throws com.liferay.portal.kernel.exception.PortalException,
456 com.liferay.portal.kernel.exception.SystemException {
457 return getService().getUserGroups(userId, inherit, start, end);
458 }
459
460 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
461 long userId, int start, int end)
462 throws com.liferay.portal.kernel.exception.PortalException,
463 com.liferay.portal.kernel.exception.SystemException {
464 return getService().getUserGroups(userId, start, end);
465 }
466
467 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
468 java.util.List<com.liferay.portal.model.UserGroup> userGroups)
469 throws com.liferay.portal.kernel.exception.PortalException,
470 com.liferay.portal.kernel.exception.SystemException {
471 return getService().getUserGroupsGroups(userGroups);
472 }
473
474 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
475 java.util.List<com.liferay.portal.model.UserGroup> userGroups)
476 throws com.liferay.portal.kernel.exception.SystemException {
477 return getService().getUserGroupsRelatedGroups(userGroups);
478 }
479
480 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
481 long userId, int start, int end)
482 throws com.liferay.portal.kernel.exception.PortalException,
483 com.liferay.portal.kernel.exception.SystemException {
484 return getService().getUserOrganizationsGroups(userId, start, end);
485 }
486
487 public static boolean hasRoleGroup(long roleId, long groupId)
488 throws com.liferay.portal.kernel.exception.SystemException {
489 return getService().hasRoleGroup(roleId, groupId);
490 }
491
492 public static boolean hasStagingGroup(long liveGroupId)
493 throws com.liferay.portal.kernel.exception.SystemException {
494 return getService().hasStagingGroup(liveGroupId);
495 }
496
497 public static boolean hasUserGroup(long userId, long groupId)
498 throws com.liferay.portal.kernel.exception.SystemException {
499 return getService().hasUserGroup(userId, groupId);
500 }
501
502 public static boolean hasUserGroup(long userId, long groupId,
503 boolean inherit)
504 throws com.liferay.portal.kernel.exception.SystemException {
505 return getService().hasUserGroup(userId, groupId, inherit);
506 }
507
508 public static java.util.List<com.liferay.portal.model.Group> search(
509 long companyId, long[] classNameIds, java.lang.String name,
510 java.lang.String description,
511 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
512 int start, int end)
513 throws com.liferay.portal.kernel.exception.SystemException {
514 return getService()
515 .search(companyId, classNameIds, name, description, params,
516 start, end);
517 }
518
519 public static java.util.List<com.liferay.portal.model.Group> search(
520 long companyId, long[] classNameIds, java.lang.String name,
521 java.lang.String description,
522 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
523 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
524 throws com.liferay.portal.kernel.exception.SystemException {
525 return getService()
526 .search(companyId, classNameIds, name, description, params,
527 start, end, obc);
528 }
529
530 public static java.util.List<com.liferay.portal.model.Group> search(
531 long companyId, java.lang.String name, java.lang.String description,
532 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
533 int start, int end)
534 throws com.liferay.portal.kernel.exception.SystemException {
535 return getService()
536 .search(companyId, name, description, params, start, end);
537 }
538
539 public static java.util.List<com.liferay.portal.model.Group> search(
540 long companyId, java.lang.String name, java.lang.String description,
541 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
542 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
543 throws com.liferay.portal.kernel.exception.SystemException {
544 return getService()
545 .search(companyId, name, description, params, start, end, obc);
546 }
547
548 public static int searchCount(long companyId, java.lang.String name,
549 java.lang.String description,
550 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
551 throws com.liferay.portal.kernel.exception.SystemException {
552 return getService().searchCount(companyId, name, description, params);
553 }
554
555 public static int searchCount(long companyId, long[] classNameIds,
556 java.lang.String name, java.lang.String description,
557 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
558 throws com.liferay.portal.kernel.exception.SystemException {
559 return getService()
560 .searchCount(companyId, classNameIds, name, description,
561 params);
562 }
563
564 public static void setRoleGroups(long roleId, long[] groupIds)
565 throws com.liferay.portal.kernel.exception.SystemException {
566 getService().setRoleGroups(roleId, groupIds);
567 }
568
569 public static void unsetRoleGroups(long roleId, long[] groupIds)
570 throws com.liferay.portal.kernel.exception.SystemException {
571 getService().unsetRoleGroups(roleId, groupIds);
572 }
573
574 public static void unsetUserGroups(long userId, long[] groupIds)
575 throws com.liferay.portal.kernel.exception.SystemException {
576 getService().unsetUserGroups(userId, groupIds);
577 }
578
579 public static void updateAsset(long userId,
580 com.liferay.portal.model.Group group, long[] assetCategoryIds,
581 java.lang.String[] assetTagNames)
582 throws com.liferay.portal.kernel.exception.PortalException,
583 com.liferay.portal.kernel.exception.SystemException {
584 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames);
585 }
586
587 public static com.liferay.portal.model.Group updateFriendlyURL(
588 long groupId, java.lang.String friendlyURL)
589 throws com.liferay.portal.kernel.exception.PortalException,
590 com.liferay.portal.kernel.exception.SystemException {
591 return getService().updateFriendlyURL(groupId, friendlyURL);
592 }
593
594 public static com.liferay.portal.model.Group updateGroup(long groupId,
595 java.lang.String typeSettings)
596 throws com.liferay.portal.kernel.exception.PortalException,
597 com.liferay.portal.kernel.exception.SystemException {
598 return getService().updateGroup(groupId, typeSettings);
599 }
600
601 public static com.liferay.portal.model.Group updateGroup(long groupId,
602 java.lang.String name, java.lang.String description, int type,
603 java.lang.String friendlyURL, boolean active,
604 com.liferay.portal.service.ServiceContext serviceContext)
605 throws com.liferay.portal.kernel.exception.PortalException,
606 com.liferay.portal.kernel.exception.SystemException {
607 return getService()
608 .updateGroup(groupId, name, description, type, friendlyURL,
609 active, serviceContext);
610 }
611
612 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
613 boolean workflowEnabled, int workflowStages,
614 java.lang.String workflowRoleNames)
615 throws com.liferay.portal.kernel.exception.PortalException,
616 com.liferay.portal.kernel.exception.SystemException {
617 return getService()
618 .updateWorkflow(groupId, workflowEnabled, workflowStages,
619 workflowRoleNames);
620 }
621
622 public static GroupLocalService getService() {
623 if (_service == null) {
624 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName());
625
626 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class,
627 "_service");
628 MethodCache.remove(GroupLocalService.class);
629 }
630
631 return _service;
632 }
633
634 public void setService(GroupLocalService service) {
635 MethodCache.remove(GroupLocalService.class);
636
637 _service = service;
638
639 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class,
640 "_service");
641 MethodCache.remove(GroupLocalService.class);
642 }
643
644 private static GroupLocalService _service;
645 }