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, long[] classNameIds, java.lang.String name,
456 java.lang.String description,
457 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
458 int start, int end)
459 throws com.liferay.portal.kernel.exception.SystemException {
460 return getService()
461 .search(companyId, classNameIds, name, description, params,
462 start, end);
463 }
464
465 public static java.util.List<com.liferay.portal.model.Group> search(
466 long companyId, long[] classNameIds, java.lang.String name,
467 java.lang.String description,
468 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
469 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
470 throws com.liferay.portal.kernel.exception.SystemException {
471 return getService()
472 .search(companyId, classNameIds, name, description, params,
473 start, end, obc);
474 }
475
476 public static java.util.List<com.liferay.portal.model.Group> search(
477 long companyId, java.lang.String name, java.lang.String description,
478 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
479 int start, int end)
480 throws com.liferay.portal.kernel.exception.SystemException {
481 return getService()
482 .search(companyId, name, description, params, start, end);
483 }
484
485 public static java.util.List<com.liferay.portal.model.Group> search(
486 long companyId, java.lang.String name, java.lang.String description,
487 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
488 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
489 throws com.liferay.portal.kernel.exception.SystemException {
490 return getService()
491 .search(companyId, name, description, params, start, end, obc);
492 }
493
494 public static int searchCount(long companyId, java.lang.String name,
495 java.lang.String description,
496 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
497 throws com.liferay.portal.kernel.exception.SystemException {
498 return getService().searchCount(companyId, name, description, params);
499 }
500
501 public static int searchCount(long companyId, long[] classNameIds,
502 java.lang.String name, java.lang.String description,
503 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
504 throws com.liferay.portal.kernel.exception.SystemException {
505 return getService()
506 .searchCount(companyId, classNameIds, name, description,
507 params);
508 }
509
510 public static void setRoleGroups(long roleId, long[] groupIds)
511 throws com.liferay.portal.kernel.exception.SystemException {
512 getService().setRoleGroups(roleId, groupIds);
513 }
514
515 public static void unsetRoleGroups(long roleId, long[] groupIds)
516 throws com.liferay.portal.kernel.exception.SystemException {
517 getService().unsetRoleGroups(roleId, groupIds);
518 }
519
520 public static void unsetUserGroups(long userId, long[] groupIds)
521 throws com.liferay.portal.kernel.exception.SystemException {
522 getService().unsetUserGroups(userId, groupIds);
523 }
524
525 public static void updateAsset(long userId,
526 com.liferay.portal.model.Group group, long[] assetCategoryIds,
527 java.lang.String[] assetTagNames)
528 throws com.liferay.portal.kernel.exception.PortalException,
529 com.liferay.portal.kernel.exception.SystemException {
530 getService().updateAsset(userId, group, assetCategoryIds, assetTagNames);
531 }
532
533 public static com.liferay.portal.model.Group updateFriendlyURL(
534 long groupId, java.lang.String friendlyURL)
535 throws com.liferay.portal.kernel.exception.PortalException,
536 com.liferay.portal.kernel.exception.SystemException {
537 return getService().updateFriendlyURL(groupId, friendlyURL);
538 }
539
540 public static com.liferay.portal.model.Group updateGroup(long groupId,
541 java.lang.String name, java.lang.String description, int type,
542 java.lang.String friendlyURL, boolean active,
543 com.liferay.portal.service.ServiceContext serviceContext)
544 throws com.liferay.portal.kernel.exception.PortalException,
545 com.liferay.portal.kernel.exception.SystemException {
546 return getService()
547 .updateGroup(groupId, name, description, type, friendlyURL,
548 active, serviceContext);
549 }
550
551 public static com.liferay.portal.model.Group updateGroup(long groupId,
552 java.lang.String typeSettings)
553 throws com.liferay.portal.kernel.exception.PortalException,
554 com.liferay.portal.kernel.exception.SystemException {
555 return getService().updateGroup(groupId, typeSettings);
556 }
557
558 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
559 boolean workflowEnabled, int workflowStages,
560 java.lang.String workflowRoleNames)
561 throws com.liferay.portal.kernel.exception.PortalException,
562 com.liferay.portal.kernel.exception.SystemException {
563 return getService()
564 .updateWorkflow(groupId, workflowEnabled, workflowStages,
565 workflowRoleNames);
566 }
567
568 public static GroupLocalService getService() {
569 if (_service == null) {
570 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName());
571 }
572
573 return _service;
574 }
575
576 public void setService(GroupLocalService service) {
577 _service = service;
578 }
579
580 private static GroupLocalService _service;
581 }