[java-metadata-aggregator] branch master updated: MDA-123 move EntityRegistrationAuthorityFilterStage to mdrpi package

Ian Young ian at iay.org.uk
Wed Dec 2 05:33:23 EST 2015


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch master
in repository java-metadata-aggregator.

The following commit(s) were added to refs/heads/master by this push:
       new  e1fcc6d   MDA-123 move EntityRegistrationAuthorityFilterStage to mdrpi package
e1fcc6d is described below

commit e1fcc6de5e4a3bd07b33ce30d14824eba823b42b
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Dec 2 11:34:40 2015 +0100

    MDA-123 move EntityRegistrationAuthorityFilterStage to mdrpi package
---
 .../metadata/dom/saml/SAMLMetadataSupport.java     |  3 ---
 .../EntityRegistrationAuthorityFilterStage.java    | 25 +++++++++++-----------
 ...EntityRegistrationAuthorityFilterStageTest.java | 12 +++++------
 .../EntityRegistrationAuthorityFilterStage-in.xml  |  0
 4 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/SAMLMetadataSupport.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/SAMLMetadataSupport.java
index e2c081d..2b534aa 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/SAMLMetadataSupport.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/SAMLMetadataSupport.java
@@ -39,9 +39,6 @@ public final class SAMLMetadataSupport {
     /** Default SAML Metadata namespace prefix. */
     public static final String MD_PREFIX = "md";
 
-    /** SAML Registration and Publication Information namespace URI. */
-    public static final String RPI_NS = "urn:oasis:names:tc:SAML:metadata:rpi";
-
     /** EntitiesDescriptor element name. */
     public static final QName ENTITIES_DESCRIPTOR_NAME = new QName(MD_NS, "EntitiesDescriptor", MD_PREFIX);
 
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java
similarity index 98%
rename from aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStage.java
rename to aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java
index 97a3406..69588c9 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package net.shibboleth.metadata.dom.saml;
+package net.shibboleth.metadata.dom.saml.mdrpi;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -25,9 +25,17 @@ import java.util.List;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.annotation.concurrent.ThreadSafe;
-import javax.xml.namespace.QName;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+
+import com.google.common.base.Predicates;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
 
 import net.shibboleth.metadata.Item;
+import net.shibboleth.metadata.dom.saml.SAMLMetadataSupport;
 import net.shibboleth.metadata.pipeline.BaseIteratingStage;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 import net.shibboleth.utilities.java.support.annotation.constraint.NullableElements;
@@ -36,14 +44,6 @@ import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.xml.AttributeSupport;
 import net.shibboleth.utilities.java.support.xml.ElementSupport;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Element;
-
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-
 /** A pipeline stage that will filter EntityDescriptor or EntityDescriptors based on their registration authority. */
 @ThreadSafe
 public class EntityRegistrationAuthorityFilterStage extends BaseIteratingStage<Element> {
@@ -235,8 +235,7 @@ public class EntityRegistrationAuthorityFilterStage extends BaseIteratingStage<E
      */
     protected boolean filterOutDescriptor(@Nonnull final Element descriptor) {
         Element registrationInfoElement =
-                SAMLMetadataSupport.getDescriptorExtensions(descriptor, new QName(SAMLMetadataSupport.RPI_NS,
-                        "RegistrationInfo"));
+                SAMLMetadataSupport.getDescriptorExtensions(descriptor, MDRPIMetadataSupport.MDRPI_REGISTRATION_INFO);
         if (registrationInfoElement == null) {
             if (requiringRegistrationInformation) {
                 log.debug(
@@ -273,4 +272,4 @@ public class EntityRegistrationAuthorityFilterStage extends BaseIteratingStage<E
 
         return false;
     }
-}
\ No newline at end of file
+}
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStageTest.java
similarity index 99%
rename from aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStageTest.java
rename to aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStageTest.java
index 51094f8..9093b17 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStageTest.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package net.shibboleth.metadata.dom.saml;
+package net.shibboleth.metadata.dom.saml.mdrpi;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -23,15 +23,15 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import org.testng.Assert;
+import org.testng.annotations.Test;
+import org.w3c.dom.Element;
+
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.dom.BaseDOMTest;
 import net.shibboleth.metadata.dom.DOMElementItem;
 import net.shibboleth.utilities.java.support.xml.ElementSupport;
 
-import org.testng.Assert;
-import org.testng.annotations.Test;
-import org.w3c.dom.Element;
-
 /** Unit test for {@link EntityRegistrationAuthorityFilterStage}. */
 public class EntityRegistrationAuthorityFilterStageTest extends BaseDOMTest {
 
@@ -141,4 +141,4 @@ public class EntityRegistrationAuthorityFilterStageTest extends BaseDOMTest {
 
         return metadataCollection;
     }
-}
\ No newline at end of file
+}
diff --git a/aggregator-pipeline/src/test/resources/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStage-in.xml b/aggregator-pipeline/src/test/resources/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage-in.xml
similarity index 100%
rename from aggregator-pipeline/src/test/resources/net/shibboleth/metadata/dom/saml/EntityRegistrationAuthorityFilterStage-in.xml
rename to aggregator-pipeline/src/test/resources/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStage-in.xml

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list