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 UserGroupRoleServiceUtil {
035
040 public static void addUserGroupRoles(long userId, long groupId,
041 long[] roleIds)
042 throws com.liferay.portal.kernel.exception.PortalException,
043 com.liferay.portal.kernel.exception.SystemException {
044 getService().addUserGroupRoles(userId, groupId, roleIds);
045 }
046
047 public static void addUserGroupRoles(long[] userIds, long groupId,
048 long roleId)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 getService().addUserGroupRoles(userIds, groupId, roleId);
052 }
053
054 public static void deleteUserGroupRoles(long userId, long groupId,
055 long[] roleIds)
056 throws com.liferay.portal.kernel.exception.PortalException,
057 com.liferay.portal.kernel.exception.SystemException {
058 getService().deleteUserGroupRoles(userId, groupId, roleIds);
059 }
060
061 public static void deleteUserGroupRoles(long[] userIds, long groupId,
062 long roleId)
063 throws com.liferay.portal.kernel.exception.PortalException,
064 com.liferay.portal.kernel.exception.SystemException {
065 getService().deleteUserGroupRoles(userIds, groupId, roleId);
066 }
067
068 public static UserGroupRoleService getService() {
069 if (_service == null) {
070 _service = (UserGroupRoleService)PortalBeanLocatorUtil.locate(UserGroupRoleService.class.getName());
071
072 ReferenceRegistry.registerReference(UserGroupRoleServiceUtil.class,
073 "_service");
074 MethodCache.remove(UserGroupRoleService.class);
075 }
076
077 return _service;
078 }
079
080 public void setService(UserGroupRoleService service) {
081 MethodCache.remove(UserGroupRoleService.class);
082
083 _service = service;
084
085 ReferenceRegistry.registerReference(UserGroupRoleServiceUtil.class,
086 "_service");
087 MethodCache.remove(UserGroupRoleService.class);
088 }
089
090 private static UserGroupRoleService _service;
091 }