1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class UserGroupRoleServiceUtil {
42 public static void addUserGroupRoles(long userId, long groupId,
43 long[] roleIds)
44 throws com.liferay.portal.PortalException,
45 com.liferay.portal.SystemException {
46 getService().addUserGroupRoles(userId, groupId, roleIds);
47 }
48
49 public static void addUserGroupRoles(long[] userIds, long groupId,
50 long roleId)
51 throws com.liferay.portal.PortalException,
52 com.liferay.portal.SystemException {
53 getService().addUserGroupRoles(userIds, groupId, roleId);
54 }
55
56 public static void deleteUserGroupRoles(long userId, long groupId,
57 long[] roleIds)
58 throws com.liferay.portal.PortalException,
59 com.liferay.portal.SystemException {
60 getService().deleteUserGroupRoles(userId, groupId, roleIds);
61 }
62
63 public static void deleteUserGroupRoles(long[] userIds, long groupId,
64 long roleId)
65 throws com.liferay.portal.PortalException,
66 com.liferay.portal.SystemException {
67 getService().deleteUserGroupRoles(userIds, groupId, roleId);
68 }
69
70 public static UserGroupRoleService getService() {
71 if (_service == null) {
72 _service = (UserGroupRoleService)PortalBeanLocatorUtil.locate(UserGroupRoleService.class.getName());
73
74 ReferenceRegistry.registerReference(UserGroupRoleServiceUtil.class,
75 "_service");
76 MethodCache.remove(UserGroupRoleService.class);
77 }
78
79 return _service;
80 }
81
82 public void setService(UserGroupRoleService service) {
83 MethodCache.remove(UserGroupRoleService.class);
84
85 _service = service;
86
87 ReferenceRegistry.registerReference(UserGroupRoleServiceUtil.class,
88 "_service");
89 MethodCache.remove(UserGroupRoleService.class);
90 }
91
92 private static UserGroupRoleService _service;
93 }