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