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 UserGroupServiceUtil {
035
040 public static void addGroupUserGroups(long groupId, long[] userGroupIds)
041 throws com.liferay.portal.kernel.exception.PortalException,
042 com.liferay.portal.kernel.exception.SystemException {
043 getService().addGroupUserGroups(groupId, userGroupIds);
044 }
045
046 public static void addTeamUserGroups(long teamId, long[] userGroupIds)
047 throws com.liferay.portal.kernel.exception.PortalException,
048 com.liferay.portal.kernel.exception.SystemException {
049 getService().addTeamUserGroups(teamId, userGroupIds);
050 }
051
052 public static com.liferay.portal.model.UserGroup addUserGroup(
053 java.lang.String name, java.lang.String description)
054 throws com.liferay.portal.kernel.exception.PortalException,
055 com.liferay.portal.kernel.exception.SystemException {
056 return getService().addUserGroup(name, description);
057 }
058
059 public static void deleteUserGroup(long userGroupId)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 getService().deleteUserGroup(userGroupId);
063 }
064
065 public static com.liferay.portal.model.UserGroup getUserGroup(
066 long userGroupId)
067 throws com.liferay.portal.kernel.exception.PortalException,
068 com.liferay.portal.kernel.exception.SystemException {
069 return getService().getUserGroup(userGroupId);
070 }
071
072 public static com.liferay.portal.model.UserGroup getUserGroup(
073 java.lang.String name)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService().getUserGroup(name);
077 }
078
079 public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
080 long userId) throws com.liferay.portal.kernel.exception.SystemException {
081 return getService().getUserUserGroups(userId);
082 }
083
084 public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
085 throws com.liferay.portal.kernel.exception.PortalException,
086 com.liferay.portal.kernel.exception.SystemException {
087 getService().unsetGroupUserGroups(groupId, userGroupIds);
088 }
089
090 public static void unsetTeamUserGroups(long teamId, long[] userGroupIds)
091 throws com.liferay.portal.kernel.exception.PortalException,
092 com.liferay.portal.kernel.exception.SystemException {
093 getService().unsetTeamUserGroups(teamId, userGroupIds);
094 }
095
096 public static com.liferay.portal.model.UserGroup updateUserGroup(
097 long userGroupId, java.lang.String name, java.lang.String description)
098 throws com.liferay.portal.kernel.exception.PortalException,
099 com.liferay.portal.kernel.exception.SystemException {
100 return getService().updateUserGroup(userGroupId, name, description);
101 }
102
103 public static UserGroupService getService() {
104 if (_service == null) {
105 _service = (UserGroupService)PortalBeanLocatorUtil.locate(UserGroupService.class.getName());
106
107 ReferenceRegistry.registerReference(UserGroupServiceUtil.class,
108 "_service");
109 MethodCache.remove(UserGroupService.class);
110 }
111
112 return _service;
113 }
114
115 public void setService(UserGroupService service) {
116 MethodCache.remove(UserGroupService.class);
117
118 _service = service;
119
120 ReferenceRegistry.registerReference(UserGroupServiceUtil.class,
121 "_service");
122 MethodCache.remove(UserGroupService.class);
123 }
124
125 private static UserGroupService _service;
126 }