[java-identity-provider] branch master updated: Namespace of ScriptedType child elements will vary.

Scott Cantor cantor.2 at osu.edu
Fri Jun 9 15:41:48 EDT 2017


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

scantor pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=d549ff4504e6dd38614a7fbeb1732e85c6695b36

The following commit(s) were added to refs/heads/master by this push:
       new  d549ff4   Namespace of ScriptedType child elements will vary.
d549ff4 is described below

commit d549ff4504e6dd38614a7fbeb1732e85c6695b36
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Jun 9 15:41:44 2017 -0400

    Namespace of ScriptedType child elements will vary.
---
 .../spring/relyingparty/metadata/ScriptTypeBeanParser.java   | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ScriptTypeBeanParser.java b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ScriptTypeBeanParser.java
index 42963e3..893bebe 100644
--- a/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ScriptTypeBeanParser.java
+++ b/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/ScriptTypeBeanParser.java
@@ -19,7 +19,6 @@ package net.shibboleth.idp.profile.spring.relyingparty.metadata;
 
 
 import javax.annotation.Nonnull;
-import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
 import net.shibboleth.utilities.java.support.primitive.StringSupport;
 import net.shibboleth.utilities.java.support.xml.ElementSupport;
 
@@ -29,16 +28,13 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.w3c.dom.Element;
 
 /**
- * Parser for elements derived from ScriptType in the <code>urn:mace:shibboleth:2.0:metadata</code> namespace.
+ * Parser for elements derived from ScriptType in the various namespaces.
  * 
  * <p>The actual bean type is a runtime class so that different objects adhering to the general factory
  * contracts used with scripted beans will work.</p>
  */
 public final class ScriptTypeBeanParser {
 
-    /** Namespace for Metadata. */
-    @Nonnull @NotEmpty public static final String METADATA_NAMESPACE = "urn:mace:shibboleth:2.0:metadata";
-
     /** Logger. */
     @Nonnull private static final Logger LOG = LoggerFactory.getLogger(ScriptTypeBeanParser.class);
 
@@ -70,11 +66,9 @@ public final class ScriptTypeBeanParser {
         }
         final Element scriptChild = ElementSupport.getFirstChildElement(element);
         builder.addConstructorArgValue(ElementSupport.getElementContentAsString(scriptChild));
-        if (ElementSupport.isElementNamed(scriptChild, AbstractMetadataProviderParser.METADATA_NAMESPACE,
-                "Script")) {
+        if (ElementSupport.isElementNamed(scriptChild, element.getNamespaceURI(), "Script")) {
             builder.setFactoryMethod("inlineScript");
-        } else if (ElementSupport.isElementNamed(scriptChild, AbstractMetadataProviderParser.METADATA_NAMESPACE,
-                "ScriptFile")) {
+        } else if (ElementSupport.isElementNamed(scriptChild, element.getNamespaceURI(), "ScriptFile")) {
             builder.setFactoryMethod("resourceScript");
         }
         

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


More information about the commits mailing list