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.MDRRuleGroupInstance;
022
023
026 public class MDRRuleGroupInstancePermissionUtil {
027
028 public static void check(
029 PermissionChecker permissionChecker, long ruleGroupInstanceId,
030 String actionId)
031 throws PortalException, SystemException {
032
033 getMDRRuleGroupInstancePermission().check(
034 permissionChecker, ruleGroupInstanceId, actionId);
035 }
036
037 public static void check(
038 PermissionChecker permissionChecker,
039 MDRRuleGroupInstance ruleGroupInstance, String actionId)
040 throws PortalException {
041
042 getMDRRuleGroupInstancePermission().check(
043 permissionChecker, ruleGroupInstance, actionId);
044 }
045
046 public static boolean contains(
047 PermissionChecker permissionChecker, long ruleGroupInstanceId,
048 String actionId)
049 throws PortalException, SystemException {
050
051 return getMDRRuleGroupInstancePermission().contains(
052 permissionChecker, ruleGroupInstanceId, actionId);
053 }
054
055 public static boolean contains(
056 PermissionChecker permissionChecker,
057 MDRRuleGroupInstance ruleGroupInstance, String actionId) {
058
059 return getMDRRuleGroupInstancePermission().contains(
060 permissionChecker, ruleGroupInstance, actionId);
061 }
062
063 public static MDRRuleGroupInstancePermission
064 getMDRRuleGroupInstancePermission() {
065
066 return _mdrRuleGroupInstancePermission;
067 }
068
069 public void setMDRRuleGroupInstancePermission(
070 MDRRuleGroupInstancePermission mdrRuleGroupInstancePermission) {
071
072 PortalRuntimePermission.checkSetBeanProperty(getClass());
073
074 _mdrRuleGroupInstancePermission = mdrRuleGroupInstancePermission;
075 }
076
077 private static MDRRuleGroupInstancePermission
078 _mdrRuleGroupInstancePermission;
079
080 }