1 /* 2 * The Kuali Financial System, a comprehensive financial management system for higher education. 3 * 4 * Copyright 2005-2014 The Kuali Foundation 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU Affero General Public License as 8 * published by the Free Software Foundation, either version 3 of the 9 * License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Affero General Public License for more details. 15 * 16 * You should have received a copy of the GNU Affero General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 package org.kuali.kfs.sec.service; 20 21 import java.util.Map; 22 23 import org.kuali.rice.kim.api.identity.Person; 24 25 /** 26 * AccessPermissionEvaluator classes provide the evaluation of a given security permission. Methods are exposed for setting the user's qualification for a permission and method 27 * exposed to pass a value and perform the evaluation 28 */ 29 public interface AccessPermissionEvaluator { 30 31 /** 32 * Evaluates the given value against the permission definition. How the evaluation is carried out depends on implementation 33 * 34 * @param value String value to evaluate 35 * @return True if value is allowed based on the permission definition or false if it is not allowed 36 */ 37 public boolean valueIsAllowed(String value); 38 39 /** 40 * Setter for the constraint code found on the user's qualification record 41 * 42 * @param constraintCode 43 */ 44 public void setConstraintCode(String constraintCode); 45 46 /** 47 * Setter for the operator code found on the user's qualification record 48 * 49 * @param operatorCode 50 */ 51 public void setOperatorCode(String operatorCode); 52 53 /** 54 * Setter for the property value found on the user's qualification record 55 * 56 * @param propertyValue 57 */ 58 public void setPropertyValue(String propertyValue); 59 60 /** 61 * Setter for the Map that holds values for the other key fields (if any) 62 * 63 * @param otherKeyFieldValues Map with field name as the Map key and field value as Map value 64 */ 65 public void setOtherKeyFieldValueMap(Map<String, Object> otherKeyFieldValues); 66 67 /** 68 * Setter for the person who the permission is being evaluated for 69 * 70 * @param person Person kim business object 71 */ 72 public void setPerson(Person person); 73 74 }