001
014
015 package com.liferay.portlet.mobiledevicerules.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 import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup;
022
023
026 public class MDRRuleGroupPermissionUtil {
027
028 public static void check(
029 PermissionChecker permissionChecker, long ruleGroupId,
030 String actionId)
031 throws PortalException, SystemException {
032
033 getMDRRuleGroupPermission().check(
034 permissionChecker, ruleGroupId, actionId);
035 }
036
037 public static void check(
038 PermissionChecker permissionChecker, MDRRuleGroup ruleGroup,
039 String actionId)
040 throws PortalException {
041
042 getMDRRuleGroupPermission().check(
043 permissionChecker, ruleGroup, actionId);
044 }
045
046 public static boolean contains(
047 PermissionChecker permissionChecker, long ruleGroupId,
048 String actionId)
049 throws PortalException, SystemException {
050
051 return getMDRRuleGroupPermission().contains(
052 permissionChecker, ruleGroupId, actionId);
053 }
054
055 public static boolean contains(
056 PermissionChecker permissionChecker, MDRRuleGroup ruleGroup,
057 String actionId) {
058
059 return getMDRRuleGroupPermission().contains(
060 permissionChecker, ruleGroup, actionId);
061 }
062
063 public static MDRRuleGroupPermission getMDRRuleGroupPermission() {
064 return _mdrRuleGroupPermission;
065 }
066
067 public void setMDRRuleGroupPermission(
068 MDRRuleGroupPermission mdrRuleGroupPermission) {
069
070 PortalRuntimePermission.checkSetBeanProperty(getClass());
071
072 _mdrRuleGroupPermission = mdrRuleGroupPermission;
073 }
074
075 private static MDRRuleGroupPermission _mdrRuleGroupPermission;
076
077 }