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