001
014
015 package com.liferay.portal.service.permission;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
020 import com.liferay.portal.security.permission.PermissionChecker;
021
022
025 public class CommonPermissionUtil {
026
027 public static void check(
028 PermissionChecker permissionChecker, long classNameId, long classPK,
029 String actionId)
030 throws PortalException, SystemException {
031
032 getCommonPermission().check(
033 permissionChecker, classNameId, classPK, actionId);
034 }
035
036 public static void check(
037 PermissionChecker permissionChecker, String className, long classPK,
038 String actionId)
039 throws PortalException, SystemException {
040
041 getCommonPermission().check(
042 permissionChecker, className, classPK, actionId);
043 }
044
045 public static CommonPermission getCommonPermission() {
046 PortalRuntimePermission.checkGetBeanProperty(
047 CommonPermissionUtil.class);
048
049 return _commonPermission;
050 }
051
052 public void setCommonPermission(CommonPermission commonPermission) {
053 PortalRuntimePermission.checkSetBeanProperty(getClass());
054
055 _commonPermission = commonPermission;
056 }
057
058 private static CommonPermission _commonPermission;
059
060 }