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