001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
036 public class UserGroupServiceUtil {
037 public static void addGroupUserGroups(long groupId, long[] userGroupIds)
038 throws com.liferay.portal.kernel.exception.PortalException,
039 com.liferay.portal.kernel.exception.SystemException {
040 getService().addGroupUserGroups(groupId, userGroupIds);
041 }
042
043 public static com.liferay.portal.model.UserGroup addUserGroup(
044 java.lang.String name, java.lang.String description)
045 throws com.liferay.portal.kernel.exception.PortalException,
046 com.liferay.portal.kernel.exception.SystemException {
047 return getService().addUserGroup(name, description);
048 }
049
050 public static void deleteUserGroup(long userGroupId)
051 throws com.liferay.portal.kernel.exception.PortalException,
052 com.liferay.portal.kernel.exception.SystemException {
053 getService().deleteUserGroup(userGroupId);
054 }
055
056 public static com.liferay.portal.model.UserGroup getUserGroup(
057 long userGroupId)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException {
060 return getService().getUserGroup(userGroupId);
061 }
062
063 public static com.liferay.portal.model.UserGroup getUserGroup(
064 java.lang.String name)
065 throws com.liferay.portal.kernel.exception.PortalException,
066 com.liferay.portal.kernel.exception.SystemException {
067 return getService().getUserGroup(name);
068 }
069
070 public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
071 long userId) throws com.liferay.portal.kernel.exception.SystemException {
072 return getService().getUserUserGroups(userId);
073 }
074
075 public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
076 throws com.liferay.portal.kernel.exception.PortalException,
077 com.liferay.portal.kernel.exception.SystemException {
078 getService().unsetGroupUserGroups(groupId, userGroupIds);
079 }
080
081 public static com.liferay.portal.model.UserGroup updateUserGroup(
082 long userGroupId, java.lang.String name, java.lang.String description)
083 throws com.liferay.portal.kernel.exception.PortalException,
084 com.liferay.portal.kernel.exception.SystemException {
085 return getService().updateUserGroup(userGroupId, name, description);
086 }
087
088 public static UserGroupService getService() {
089 if (_service == null) {
090 _service = (UserGroupService)PortalBeanLocatorUtil.locate(UserGroupService.class.getName());
091 }
092
093 return _service;
094 }
095
096 public void setService(UserGroupService service) {
097 _service = service;
098 }
099
100 private static UserGroupService _service;
101 }