1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.match.basic;
18
19 import edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.FilterProcessingException;
20 import edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.MatchFunctor;
21 import edu.internet2.middleware.shibboleth.common.attribute.filtering.provider.ShibbolethFilteringContext;
22
23
24
25
26 public class NotMatchFunctor extends AbstractMatchFunctor {
27
28
29 private MatchFunctor targetRule;
30
31
32
33
34
35
36 public NotMatchFunctor(MatchFunctor rule){
37 targetRule = rule;
38 }
39
40
41
42
43
44
45 public MatchFunctor getTargetRule() {
46 return targetRule;
47 }
48
49
50
51
52
53
54 public void setTargetRule(MatchFunctor target) {
55 targetRule = target;
56 }
57
58
59 protected boolean doEvaluateValue(ShibbolethFilteringContext filterContext, String attributeId,
60 Object attributeValue) throws FilterProcessingException {
61 return !targetRule.evaluatePermitValue(filterContext, attributeId, attributeValue);
62 }
63
64
65 protected boolean doEvaluatePolicyRequirement(ShibbolethFilteringContext filterContext)
66 throws FilterProcessingException {
67 return !targetRule.evaluatePolicyRequirement(filterContext);
68 }
69 }