[java-identity-provider COMMIT] in /trunk: idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Jul 9 13:23:33 EDT 2013
Author: rdw
Date: Tue Jul 9 13:23:33 2013
New Revision: 4545
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4545&view=rev
Log:
IDP-287 Start refactoring the filtering as per the latest design.
Stage one: Introduce a new (tristated) class for PolicyRules and the three bridging classes.
Added:
trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/BaseBridgingClass.java (with props)
trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/MatcherFromPolicy.java (with props)
trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/PolicyFromMatcher.java (with props)
trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/PolicyFromMatcherId.java (with props)
trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/PolicyRequirementRule.java (with props)
trunk/idp-attribute-filter-api/src/test/java/net/shibboleth/idp/attribute/filter/MockPolicyRequirementRule.java (with props)
Modified:
trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/AttributeFilterPolicy.java
trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/Matcher.java
trunk/idp-attribute-filter-api/src/test/java/net/shibboleth/idp/attribute/filter/AttributeFilterPolicyTest.java
trunk/idp-attribute-filter-api/src/test/java/net/shibboleth/idp/attribute/filter/AttributeFilteringEngineTest.java
trunk/idp-attribute-filter-api/src/test/java/net/shibboleth/idp/attribute/filter/MockMatcher.java
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/matcher/logic/AndMatcher.java
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/matcher/logic/NotMatcher.java
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/impl/matcher/logic/OrMatcher.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/complex/TargettedAttributeValueFilterTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/complex/UntargettedAttributeValueFilterTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/matcher/logic/AndMatcherTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/matcher/logic/NotMatcherTest.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/impl/matcher/logic/OrMatcherTest.java
Modified: trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/AttributeFilterPolicy.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/AttributeFilterPolicy.java?rev=4545&r1=4544&r2=4545&view=diff
==============================================================================
--- trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/AttributeFilterPolicy.java (original)
+++ trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filter/AttributeFilterPolicy.java Tue Jul 9 13:23:33 2013
@@ -28,6 +28,7 @@
import javax.annotation.concurrent.ThreadSafe;
import net.shibboleth.idp.attribute.Attribute;
+import net.shibboleth.idp.attribute.filter.PolicyRequirementRule.Tristate;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
@@ -64,7 +65,7 @@
private final Logger log = LoggerFactory.getLogger(AttributeFilterPolicy.class);
/** Criterion that must be met for this policy to be active for a given request. */
- private final Matcher policyRequirementRule;
+ private final PolicyRequirementRule rule;
/** Filters to be used on attribute values. */
private final List<AttributeRule> valuePolicies;
@@ -79,11 +80,11 @@
* @param requirementRule criterion used to determine if this policy is active for a given request
* @param attributeRules value filtering policies employed if this policy is active
*/
- public AttributeFilterPolicy(@Nonnull @NotEmpty String policyId, @Nonnull Matcher requirementRule,
+ public AttributeFilterPolicy(@Nonnull @NotEmpty String policyId, @Nonnull PolicyRequirementRule requirementRule,
@Nullable Collection<AttributeRule> attributeRules) {
setId(policyId);
- policyRequirementRule =
+ rule =
Constraint.isNotNull(requirementRule, "Attribute filter policy activiation criterion can not be null");
ArrayList<AttributeRule> checkedPolicies = new ArrayList<AttributeRule>();
@@ -100,8 +101,8 @@
*
* @return MatchFunctor that must be met for this policy to be active for a given request
*/
- @Nonnull public Matcher getPolicyRequirementRule() {
[... 565 lines stripped ...]
More information about the commits
mailing list