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 addRole(long userId,
103 long companyId, java.lang.String name, java.lang.String description,
104 int type)
105 throws com.liferay.portal.PortalException,
106 com.liferay.portal.SystemException {
107 return getService().addRole(userId, companyId, name, description, type);
108 }
109
110 public static com.liferay.portal.model.Role addRole(long userId,
111 long companyId, java.lang.String name, java.lang.String description,
112 int type, java.lang.String className, long classPK)
113 throws com.liferay.portal.PortalException,
114 com.liferay.portal.SystemException {
115 return getService()
116 .addRole(userId, companyId, name, description, type,
117 className, classPK);
118 }
119
120 public static void addUserRoles(long userId, long[] roleIds)
121 throws com.liferay.portal.SystemException {
122 getService().addUserRoles(userId, roleIds);
123 }
124
125 public static void checkSystemRoles(long companyId)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException {
128 getService().checkSystemRoles(companyId);
129 }
130
131 public static com.liferay.portal.model.Role getGroupRole(long companyId,
132 long groupId)
133 throws com.liferay.portal.PortalException,
134 com.liferay.portal.SystemException {
135 return getService().getGroupRole(companyId, groupId);
136 }
137
138 public static java.util.List<com.liferay.portal.model.Role> getGroupRoles(
139 long groupId) throws com.liferay.portal.SystemException {
140 return getService().getGroupRoles(groupId);
141 }
142
143 public static java.util.Map<String, java.util.List<String>> getResourceRoles(
144 long companyId, java.lang.String name, int scope,
145 java.lang.String primKey) throws com.liferay.portal.SystemException {
146 return getService().getResourceRoles(companyId, name, scope, primKey);
147 }
148
149 public static com.liferay.portal.model.Role getRole(long companyId,
150 java.lang.String name)
151 throws com.liferay.portal.PortalException,
152 com.liferay.portal.SystemException {
153 return getService().getRole(companyId, name);
154 }
155
156 public static java.util.List<com.liferay.portal.model.Role> getRoles(
157 long companyId) throws com.liferay.portal.SystemException {
158 return getService().getRoles(companyId);
159 }
160
161 public static java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
162 long userId, long groupId) throws com.liferay.portal.SystemException {
163 return getService().getUserGroupRoles(userId, groupId);
164 }
165
166 public static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
167 long userId, long groupId) throws com.liferay.portal.SystemException {
168 return getService().getUserRelatedRoles(userId, groupId);
169 }
170
171 public static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
172 long userId, long[] groupIds) throws com.liferay.portal.SystemException {
173 return getService().getUserRelatedRoles(userId, groupIds);
174 }
175
176 public static java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
177 long userId, java.util.List<com.liferay.portal.model.Group> groups)
178 throws com.liferay.portal.SystemException {
179 return getService().getUserRelatedRoles(userId, groups);
180 }
181
182 public static java.util.List<com.liferay.portal.model.Role> getUserRoles(
183 long userId) throws com.liferay.portal.SystemException {
184 return getService().getUserRoles(userId);
185 }
186
187 public static boolean hasUserRole(long userId, long roleId)
188 throws com.liferay.portal.SystemException {
189 return getService().hasUserRole(userId, roleId);
190 }
191
192 public static boolean hasUserRole(long userId, long companyId,
193 java.lang.String name, boolean inherited)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException {
196 return getService().hasUserRole(userId, companyId, name, inherited);
197 }
198
199 public static boolean hasUserRoles(long userId, long companyId,
200 java.lang.String[] names, boolean inherited)
201 throws com.liferay.portal.PortalException,
202 com.liferay.portal.SystemException {
203 return getService().hasUserRoles(userId, companyId, names, inherited);
204 }
205
206 public static java.util.List<com.liferay.portal.model.Role> search(
207 long companyId, java.lang.String name, java.lang.String description,
208 java.lang.Integer type, int start, int end,
209 com.liferay.portal.kernel.util.OrderByComparator obc)
210 throws com.liferay.portal.SystemException {
211 return getService()
212 .search(companyId, name, description, type, start, end, obc);
213 }
214
215 public static java.util.List<com.liferay.portal.model.Role> search(
216 long companyId, java.lang.String name, java.lang.String description,
217 java.lang.Integer type, java.util.LinkedHashMap<String, Object> params,
218 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
219 throws com.liferay.portal.SystemException {
220 return getService()
221 .search(companyId, name, description, type, params, start,
222 end, obc);
223 }
224
225 public static int searchCount(long companyId, java.lang.String name,
226 java.lang.String description, java.lang.Integer type)
227 throws com.liferay.portal.SystemException {
228 return getService().searchCount(companyId, name, description, type);
229 }
230
231 public static int searchCount(long companyId, java.lang.String name,
232 java.lang.String description, java.lang.Integer type,
233 java.util.LinkedHashMap<String, Object> params)
234 throws com.liferay.portal.SystemException {
235 return getService()
236 .searchCount(companyId, name, description, type, params);
237 }
238
239 public static void setUserRoles(long userId, long[] roleIds)
240 throws com.liferay.portal.SystemException {
241 getService().setUserRoles(userId, roleIds);
242 }
243
244 public static void unsetUserRoles(long userId, long[] roleIds)
245 throws com.liferay.portal.SystemException {
246 getService().unsetUserRoles(userId, roleIds);
247 }
248
249 public static com.liferay.portal.model.Role updateRole(long roleId,
250 java.lang.String name, java.lang.String description)
251 throws com.liferay.portal.PortalException,
252 com.liferay.portal.SystemException {
253 return getService().updateRole(roleId, name, description);
254 }
255
256 public static RoleLocalService getService() {
257 if (_service == null) {
258 throw new RuntimeException("RoleLocalService is not set");
259 }
260
261 return _service;
262 }
263
264 public void setService(RoleLocalService service) {
265 _service = service;
266 }
267
268 private static RoleLocalService _service;
269 }