001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.kernel.util.MethodHandler;
022 import com.liferay.portal.kernel.util.MethodKey;
023 import com.liferay.portal.security.auth.HttpPrincipal;
024 import com.liferay.portal.service.ResourceBlockServiceUtil;
025
026
054 @ProviderType
055 public class ResourceBlockServiceHttp {
056 public static void addCompanyScopePermission(HttpPrincipal httpPrincipal,
057 long scopeGroupId, long companyId, java.lang.String name, long roleId,
058 java.lang.String actionId)
059 throws com.liferay.portal.kernel.exception.PortalException {
060 try {
061 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
062 "addCompanyScopePermission",
063 _addCompanyScopePermissionParameterTypes0);
064
065 MethodHandler methodHandler = new MethodHandler(methodKey,
066 scopeGroupId, companyId, name, roleId, actionId);
067
068 try {
069 TunnelUtil.invoke(httpPrincipal, methodHandler);
070 }
071 catch (Exception e) {
072 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
073 throw (com.liferay.portal.kernel.exception.PortalException)e;
074 }
075
076 throw new com.liferay.portal.kernel.exception.SystemException(e);
077 }
078 }
079 catch (com.liferay.portal.kernel.exception.SystemException se) {
080 _log.error(se, se);
081
082 throw se;
083 }
084 }
085
086 public static void addGroupScopePermission(HttpPrincipal httpPrincipal,
087 long scopeGroupId, long companyId, long groupId, java.lang.String name,
088 long roleId, java.lang.String actionId)
089 throws com.liferay.portal.kernel.exception.PortalException {
090 try {
091 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
092 "addGroupScopePermission",
093 _addGroupScopePermissionParameterTypes1);
094
095 MethodHandler methodHandler = new MethodHandler(methodKey,
096 scopeGroupId, companyId, groupId, name, roleId, actionId);
097
098 try {
099 TunnelUtil.invoke(httpPrincipal, methodHandler);
100 }
101 catch (Exception e) {
102 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
103 throw (com.liferay.portal.kernel.exception.PortalException)e;
104 }
105
106 throw new com.liferay.portal.kernel.exception.SystemException(e);
107 }
108 }
109 catch (com.liferay.portal.kernel.exception.SystemException se) {
110 _log.error(se, se);
111
112 throw se;
113 }
114 }
115
116 public static void addIndividualScopePermission(
117 HttpPrincipal httpPrincipal, long companyId, long groupId,
118 java.lang.String name, long primKey, long roleId,
119 java.lang.String actionId)
120 throws com.liferay.portal.kernel.exception.PortalException {
121 try {
122 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
123 "addIndividualScopePermission",
124 _addIndividualScopePermissionParameterTypes2);
125
126 MethodHandler methodHandler = new MethodHandler(methodKey,
127 companyId, groupId, name, primKey, roleId, actionId);
128
129 try {
130 TunnelUtil.invoke(httpPrincipal, methodHandler);
131 }
132 catch (Exception e) {
133 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
134 throw (com.liferay.portal.kernel.exception.PortalException)e;
135 }
136
137 throw new com.liferay.portal.kernel.exception.SystemException(e);
138 }
139 }
140 catch (com.liferay.portal.kernel.exception.SystemException se) {
141 _log.error(se, se);
142
143 throw se;
144 }
145 }
146
147 public static void removeAllGroupScopePermissions(
148 HttpPrincipal httpPrincipal, long scopeGroupId, long companyId,
149 java.lang.String name, long roleId, java.lang.String actionId)
150 throws com.liferay.portal.kernel.exception.PortalException {
151 try {
152 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
153 "removeAllGroupScopePermissions",
154 _removeAllGroupScopePermissionsParameterTypes3);
155
156 MethodHandler methodHandler = new MethodHandler(methodKey,
157 scopeGroupId, companyId, name, roleId, actionId);
158
159 try {
160 TunnelUtil.invoke(httpPrincipal, methodHandler);
161 }
162 catch (Exception e) {
163 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
164 throw (com.liferay.portal.kernel.exception.PortalException)e;
165 }
166
167 throw new com.liferay.portal.kernel.exception.SystemException(e);
168 }
169 }
170 catch (com.liferay.portal.kernel.exception.SystemException se) {
171 _log.error(se, se);
172
173 throw se;
174 }
175 }
176
177 public static void removeCompanyScopePermission(
178 HttpPrincipal httpPrincipal, long scopeGroupId, long companyId,
179 java.lang.String name, long roleId, java.lang.String actionId)
180 throws com.liferay.portal.kernel.exception.PortalException {
181 try {
182 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
183 "removeCompanyScopePermission",
184 _removeCompanyScopePermissionParameterTypes4);
185
186 MethodHandler methodHandler = new MethodHandler(methodKey,
187 scopeGroupId, companyId, name, roleId, actionId);
188
189 try {
190 TunnelUtil.invoke(httpPrincipal, methodHandler);
191 }
192 catch (Exception e) {
193 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
194 throw (com.liferay.portal.kernel.exception.PortalException)e;
195 }
196
197 throw new com.liferay.portal.kernel.exception.SystemException(e);
198 }
199 }
200 catch (com.liferay.portal.kernel.exception.SystemException se) {
201 _log.error(se, se);
202
203 throw se;
204 }
205 }
206
207 public static void removeGroupScopePermission(HttpPrincipal httpPrincipal,
208 long scopeGroupId, long companyId, long groupId, java.lang.String name,
209 long roleId, java.lang.String actionId)
210 throws com.liferay.portal.kernel.exception.PortalException {
211 try {
212 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
213 "removeGroupScopePermission",
214 _removeGroupScopePermissionParameterTypes5);
215
216 MethodHandler methodHandler = new MethodHandler(methodKey,
217 scopeGroupId, companyId, groupId, name, roleId, actionId);
218
219 try {
220 TunnelUtil.invoke(httpPrincipal, methodHandler);
221 }
222 catch (Exception e) {
223 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
224 throw (com.liferay.portal.kernel.exception.PortalException)e;
225 }
226
227 throw new com.liferay.portal.kernel.exception.SystemException(e);
228 }
229 }
230 catch (com.liferay.portal.kernel.exception.SystemException se) {
231 _log.error(se, se);
232
233 throw se;
234 }
235 }
236
237 public static void removeIndividualScopePermission(
238 HttpPrincipal httpPrincipal, long companyId, long groupId,
239 java.lang.String name, long primKey, long roleId,
240 java.lang.String actionId)
241 throws com.liferay.portal.kernel.exception.PortalException {
242 try {
243 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
244 "removeIndividualScopePermission",
245 _removeIndividualScopePermissionParameterTypes6);
246
247 MethodHandler methodHandler = new MethodHandler(methodKey,
248 companyId, groupId, name, primKey, roleId, actionId);
249
250 try {
251 TunnelUtil.invoke(httpPrincipal, methodHandler);
252 }
253 catch (Exception e) {
254 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
255 throw (com.liferay.portal.kernel.exception.PortalException)e;
256 }
257
258 throw new com.liferay.portal.kernel.exception.SystemException(e);
259 }
260 }
261 catch (com.liferay.portal.kernel.exception.SystemException se) {
262 _log.error(se, se);
263
264 throw se;
265 }
266 }
267
268 public static void setCompanyScopePermissions(HttpPrincipal httpPrincipal,
269 long scopeGroupId, long companyId, java.lang.String name, long roleId,
270 java.util.List<java.lang.String> actionIds)
271 throws com.liferay.portal.kernel.exception.PortalException {
272 try {
273 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
274 "setCompanyScopePermissions",
275 _setCompanyScopePermissionsParameterTypes7);
276
277 MethodHandler methodHandler = new MethodHandler(methodKey,
278 scopeGroupId, companyId, name, roleId, actionIds);
279
280 try {
281 TunnelUtil.invoke(httpPrincipal, methodHandler);
282 }
283 catch (Exception e) {
284 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
285 throw (com.liferay.portal.kernel.exception.PortalException)e;
286 }
287
288 throw new com.liferay.portal.kernel.exception.SystemException(e);
289 }
290 }
291 catch (com.liferay.portal.kernel.exception.SystemException se) {
292 _log.error(se, se);
293
294 throw se;
295 }
296 }
297
298 public static void setGroupScopePermissions(HttpPrincipal httpPrincipal,
299 long scopeGroupId, long companyId, long groupId, java.lang.String name,
300 long roleId, java.util.List<java.lang.String> actionIds)
301 throws com.liferay.portal.kernel.exception.PortalException {
302 try {
303 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
304 "setGroupScopePermissions",
305 _setGroupScopePermissionsParameterTypes8);
306
307 MethodHandler methodHandler = new MethodHandler(methodKey,
308 scopeGroupId, companyId, groupId, name, roleId, actionIds);
309
310 try {
311 TunnelUtil.invoke(httpPrincipal, methodHandler);
312 }
313 catch (Exception e) {
314 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
315 throw (com.liferay.portal.kernel.exception.PortalException)e;
316 }
317
318 throw new com.liferay.portal.kernel.exception.SystemException(e);
319 }
320 }
321 catch (com.liferay.portal.kernel.exception.SystemException se) {
322 _log.error(se, se);
323
324 throw se;
325 }
326 }
327
328 public static void setIndividualScopePermissions(
329 HttpPrincipal httpPrincipal, long companyId, long groupId,
330 java.lang.String name, long primKey, long roleId,
331 java.util.List<java.lang.String> actionIds)
332 throws com.liferay.portal.kernel.exception.PortalException {
333 try {
334 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
335 "setIndividualScopePermissions",
336 _setIndividualScopePermissionsParameterTypes9);
337
338 MethodHandler methodHandler = new MethodHandler(methodKey,
339 companyId, groupId, name, primKey, roleId, actionIds);
340
341 try {
342 TunnelUtil.invoke(httpPrincipal, methodHandler);
343 }
344 catch (Exception e) {
345 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
346 throw (com.liferay.portal.kernel.exception.PortalException)e;
347 }
348
349 throw new com.liferay.portal.kernel.exception.SystemException(e);
350 }
351 }
352 catch (com.liferay.portal.kernel.exception.SystemException se) {
353 _log.error(se, se);
354
355 throw se;
356 }
357 }
358
359 public static void setIndividualScopePermissions(
360 HttpPrincipal httpPrincipal, long companyId, long groupId,
361 java.lang.String name, long primKey,
362 java.util.Map<java.lang.Long, java.lang.String[]> roleIdsToActionIds)
363 throws com.liferay.portal.kernel.exception.PortalException {
364 try {
365 MethodKey methodKey = new MethodKey(ResourceBlockServiceUtil.class,
366 "setIndividualScopePermissions",
367 _setIndividualScopePermissionsParameterTypes10);
368
369 MethodHandler methodHandler = new MethodHandler(methodKey,
370 companyId, groupId, name, primKey, roleIdsToActionIds);
371
372 try {
373 TunnelUtil.invoke(httpPrincipal, methodHandler);
374 }
375 catch (Exception e) {
376 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
377 throw (com.liferay.portal.kernel.exception.PortalException)e;
378 }
379
380 throw new com.liferay.portal.kernel.exception.SystemException(e);
381 }
382 }
383 catch (com.liferay.portal.kernel.exception.SystemException se) {
384 _log.error(se, se);
385
386 throw se;
387 }
388 }
389
390 private static Log _log = LogFactoryUtil.getLog(ResourceBlockServiceHttp.class);
391 private static final Class<?>[] _addCompanyScopePermissionParameterTypes0 = new Class[] {
392 long.class, long.class, java.lang.String.class, long.class,
393 java.lang.String.class
394 };
395 private static final Class<?>[] _addGroupScopePermissionParameterTypes1 = new Class[] {
396 long.class, long.class, long.class, java.lang.String.class,
397 long.class, java.lang.String.class
398 };
399 private static final Class<?>[] _addIndividualScopePermissionParameterTypes2 =
400 new Class[] {
401 long.class, long.class, java.lang.String.class, long.class,
402 long.class, java.lang.String.class
403 };
404 private static final Class<?>[] _removeAllGroupScopePermissionsParameterTypes3 =
405 new Class[] {
406 long.class, long.class, java.lang.String.class, long.class,
407 java.lang.String.class
408 };
409 private static final Class<?>[] _removeCompanyScopePermissionParameterTypes4 =
410 new Class[] {
411 long.class, long.class, java.lang.String.class, long.class,
412 java.lang.String.class
413 };
414 private static final Class<?>[] _removeGroupScopePermissionParameterTypes5 = new Class[] {
415 long.class, long.class, long.class, java.lang.String.class,
416 long.class, java.lang.String.class
417 };
418 private static final Class<?>[] _removeIndividualScopePermissionParameterTypes6 =
419 new Class[] {
420 long.class, long.class, java.lang.String.class, long.class,
421 long.class, java.lang.String.class
422 };
423 private static final Class<?>[] _setCompanyScopePermissionsParameterTypes7 = new Class[] {
424 long.class, long.class, java.lang.String.class, long.class,
425 java.util.List.class
426 };
427 private static final Class<?>[] _setGroupScopePermissionsParameterTypes8 = new Class[] {
428 long.class, long.class, long.class, java.lang.String.class,
429 long.class, java.util.List.class
430 };
431 private static final Class<?>[] _setIndividualScopePermissionsParameterTypes9 =
432 new Class[] {
433 long.class, long.class, java.lang.String.class, long.class,
434 long.class, java.util.List.class
435 };
436 private static final Class<?>[] _setIndividualScopePermissionsParameterTypes10 =
437 new Class[] {
438 long.class, long.class, java.lang.String.class, long.class,
439 java.util.Map.class
440 };
441 }