1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class RoleLocalServiceUtil {
40 public static com.liferay.portal.model.Role addRole(
41 com.liferay.portal.model.Role role)
42 throws com.liferay.portal.SystemException {
43 return getService().addRole(role);
44 }
45
46 public static com.liferay.portal.model.Role createRole(long roleId) {
47 return getService().createRole(roleId);
48 }
49
50 public static void deleteRole(long roleId)
51 throws com.liferay.portal.PortalException,
52 com.liferay.portal.SystemException {
53 getService().deleteRole(roleId);
54 }
55
56 public static void deleteRole(com.liferay.portal.model.Role role)
57 throws com.liferay.portal.SystemException {
58 getService().deleteRole(role);
59 }
60
61 public static java.util.List<Object> dynamicQuery(
62 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
63 throws com.liferay.portal.SystemException {
64 return getService().dynamicQuery(dynamicQuery);
65 }
66
67 public static java.util.List<Object> dynamicQuery(
68 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
69 int end) throws com.liferay.portal.SystemException {
70 return getService().dynamicQuery(dynamicQuery, start, end);
71 }
72
73 public static com.liferay.portal.model.Role getRole(long roleId)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 return getService().getRole(roleId);
77 }
78
79 public static java.util.List<com.liferay.portal.model.Role> getRoles(
80 int start, int end) throws com.liferay.portal.SystemException {
81 return getService().getRoles(start, end);
82 }
83
84 public static int getRolesCount() throws com.liferay.portal.SystemException {
85 return getService().getRolesCount();
86 }
87
88 public static com.liferay.portal.model.Role updateRole(
89 com.liferay.portal.model.Role role)
90 throws com.liferay.portal.SystemException {
91 return getService().updateRole(role);
92 }
93
94 public static com.liferay.portal.model.Role updateRole(
95 com.liferay.portal.model.Role role, boolean merge)
96 throws com.liferay.portal.SystemException {
97 return getService().updateRole(role, merge);
98 }
99
100 public static com.liferay.portal.model.Role addRole(long userId,
101 long companyId, java.lang.String name, java.lang.String description,
102 int type)
103 throws com.liferay.portal.PortalException,
104 com.liferay.portal.SystemException {
105 return getService().addRole(userId, companyId, name, description, type);
106 }
107
108 public static com.liferay.portal.model.Role addRole(long userId,
109 long companyId, java.lang.String name, java.lang.String description,
110 int type, java.lang.String className, long classPK)
111 throws com.liferay.portal.PortalException,
112 com.liferay.portal.SystemException {
113 return getService()
114 .addRole(userId, companyId, name, description, type,
115 className, classPK);
116 }
117
118 public static void addUserRoles(long userId, long[] roleIds)
119 throws com.liferay.portal.SystemException {
120 getService().addUserRoles(userId, roleIds);
121 }
122
123 public static void checkSystemRoles(long companyId)
124 throws com.liferay.portal.PortalException,
125 com.liferay.portal.SystemException {
126 getService().checkSystemRoles(companyId);
127 }
128
129 public static com.liferay.portal.model.Role getGroupRole(long companyId,
130 long groupId)
131 throws com.liferay.portal.PortalException,
132 com.liferay.portal.SystemException {
133 return getService().getGroupRole(companyId, groupId);
134 }
135
136 public static java.util.List<com.liferay.portal.model.Role> getGroupRoles(
137 long groupId) throws com.liferay.portal.SystemException {
138 return getService().getGroupRoles(groupId);
139 }
140
141 public static java.util.Map<String, java.util.List<String>> getResourceRoles(
142 long companyId, java.lang.String name, int scope,
143 java.lang.String primKey) throws com.liferay.portal.SystemException {
144 return getService().getResourceRoles(companyId, name, scope, primKey);
145 }
146
147 public static com.liferay.portal.model.Role getRole(long companyId,
148 java.lang.String name)
149 throws com.liferay.portal.PortalException,
150 com.liferay.portal.SystemException {
151 return getService().getRole(companyId, name);
152 }
153
154 public static java.util.List<com.liferay.portal.model.Role> getRoles(
155 long companyId) throws com.liferay.portal.SystemException {
156 return getService().getRoles(companyId);
157 }
158
159 public static java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
160 long userId, long groupId) throws com.liferay.portal.SystemException {
161 return getService().getUserGroupRoles(userId, groupId);
162 }
163
164 public static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
165 long userId, long groupId) throws com.liferay.portal.SystemException {
166 return getService().getUserRelatedRoles(userId, groupId);
167 }
168
169 public static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
170 long userId, long[] groupIds) throws com.liferay.portal.SystemException {
171 return getService().getUserRelatedRoles(userId, groupIds);
172 }
173
174 public static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
175 long userId, java.util.List<com.liferay.portal.model.Group> groups)
176 throws com.liferay.portal.SystemException {
177 return getService().getUserRelatedRoles(userId, groups);
178 }
179
180 public static java.util.List<com.liferay.portal.model.Role> getUserRoles(
181 long userId) throws com.liferay.portal.SystemException {
182 return getService().getUserRoles(userId);
183 }
184
185 public static boolean hasUserRole(long userId, long roleId)
186 throws com.liferay.portal.SystemException {
187 return getService().hasUserRole(userId, roleId);
188 }
189
190 public static boolean hasUserRole(long userId, long companyId,
191 java.lang.String name, boolean inherited)
192 throws com.liferay.portal.PortalException,
193 com.liferay.portal.SystemException {
194 return getService().hasUserRole(userId, companyId, name, inherited);
195 }
196
197 public static boolean hasUserRoles(long userId, long companyId,
198 java.lang.String[] names, boolean inherited)
199 throws com.liferay.portal.PortalException,
200 com.liferay.portal.SystemException {
201 return getService().hasUserRoles(userId, companyId, names, inherited);
202 }
203
204 public static java.util.List<com.liferay.portal.model.Role> search(
205 long companyId, java.lang.String name, java.lang.String description,
206 java.lang.Integer type, int start, int end,
207 com.liferay.portal.kernel.util.OrderByComparator obc)
208 throws com.liferay.portal.SystemException {
209 return getService()
210 .search(companyId, name, description, type, start, end, obc);
211 }
212
213 public static java.util.List<com.liferay.portal.model.Role> search(
214 long companyId, java.lang.String name, java.lang.String description,
215 java.lang.Integer type, java.util.LinkedHashMap<String, Object> params,
216 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
217 throws com.liferay.portal.SystemException {
218 return getService()
219 .search(companyId, name, description, type, params, start,
220 end, obc);
221 }
222
223 public static int searchCount(long companyId, java.lang.String name,
224 java.lang.String description, java.lang.Integer type)
225 throws com.liferay.portal.SystemException {
226 return getService().searchCount(companyId, name, description, type);
227 }
228
229 public static int searchCount(long companyId, java.lang.String name,
230 java.lang.String description, java.lang.Integer type,
231 java.util.LinkedHashMap<String, Object> params)
232 throws com.liferay.portal.SystemException {
233 return getService()
234 .searchCount(companyId, name, description, type, params);
235 }
236
237 public static void setUserRoles(long userId, long[] roleIds)
238 throws com.liferay.portal.SystemException {
239 getService().setUserRoles(userId, roleIds);
240 }
241
242 public static void unsetUserRoles(long userId, long[] roleIds)
243 throws com.liferay.portal.SystemException {
244 getService().unsetUserRoles(userId, roleIds);
245 }
246
247 public static com.liferay.portal.model.Role updateRole(long roleId,
248 java.lang.String name, java.lang.String description)
249 throws com.liferay.portal.PortalException,
250 com.liferay.portal.SystemException {
251 return getService().updateRole(roleId, name, description);
252 }
253
254 public static RoleLocalService getService() {
255 if (_service == null) {
256 _service = (RoleLocalService)PortalBeanLocatorUtil.locate(RoleLocalService.class.getName());
257 }
258
259 return _service;
260 }
261
262 public void setService(RoleLocalService service) {
263 _service = service;
264 }
265
266 private static RoleLocalService _service;
267 }