1 /*
2 * Copyright 2009 The Kuali Foundation.
3 *
4 * Licensed under the Educational Community License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl1.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.ole.sec.service;
17
18 import java.util.Map;
19
20 import org.kuali.rice.kim.api.identity.Person;
21
22 /**
23 * AccessPermissionEvaluator classes provide the evaluation of a given security permission. Methods are exposed for setting the user's qualification for a permission and method
24 * exposed to pass a value and perform the evaluation
25 */
26 public interface AccessPermissionEvaluator {
27
28 /**
29 * Evaluates the given value against the permission definition. How the evaluation is carried out depends on implementation
30 *
31 * @param value String value to evaluate
32 * @return True if value is allowed based on the permission definition or false if it is not allowed
33 */
34 public boolean valueIsAllowed(String value);
35
36 /**
37 * Setter for the constraint code found on the user's qualification record
38 *
39 * @param constraintCode
40 */
41 public void setConstraintCode(String constraintCode);
42
43 /**
44 * Setter for the operator code found on the user's qualification record
45 *
46 * @param operatorCode
47 */
48 public void setOperatorCode(String operatorCode);
49
50 /**
51 * Setter for the property value found on the user's qualification record
52 *
53 * @param propertyValue
54 */
55 public void setPropertyValue(String propertyValue);
56
57 /**
58 * Setter for the Map that holds values for the other key fields (if any)
59 *
60 * @param otherKeyFieldValues Map with field name as the Map key and field value as Map value
61 */
62 public void setOtherKeyFieldValueMap(Map<String, Object> otherKeyFieldValues);
63
64 /**
65 * Setter for the person who the permission is being evaluated for
66 *
67 * @param person Person kim business object
68 */
69 public void setPerson(Person person);
70
71 }