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