1.3 metadata patch from SDSS
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 13 Jun 2005 18:54:00 +0000 (18:54 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 13 Jun 2005 18:54:00 +0000 (18:54 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1615 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/wayf/Origin.java
src/edu/internet2/middleware/shibboleth/wayf/OriginSet.java
src/edu/internet2/middleware/shibboleth/wayf/OriginSitesDigester.java

index 690fd23..f934d5f 100755 (executable)
@@ -33,7 +33,7 @@ public class Origin implements Comparable {
 
        private String name = "";
        private ArrayList aliases = new ArrayList();
-       private String handleService = "";
+       private String handleService;
 
        /**
         * Gets the handleService for this origin.
index 55fe60b..18883ff 100755 (executable)
@@ -54,8 +54,10 @@ public class OriginSet {
 
        public void addOrigin(Origin origin) {
 
-               origins.add(origin);
-               log.debug("Adding origin site :" + origin.getName() + ":  to set.");
+               if (origin.getHandleService() != null) {
+                       origins.add(origin);
+                       log.debug("Adding origin site :" + origin.getName() + ":  to set.");
+               }
        }
 
 }
index 36b4918..2417d02 100755 (executable)
@@ -97,6 +97,26 @@ public class OriginSitesDigester extends ServletDigester {
                addCallMethod("OriginSite", "setHandleService", 1);
                addCallParam("OriginSite/HandleService", 0, "Location");
 
+               // Handle 1.3 Metadata
+        addObjectCreate("EntitiesDescriptor", originSetClass);
+               addSetNext("EntitiesDescriptor", "addOriginSet", originSetClass);
+               addCallMethod("EntitiesDescriptor", "setName", 1);
+               addCallParam("EntitiesDescriptor", 0, "Name");
+
+               addObjectCreate("EntitiesDescriptor/EntityDescriptor", originClass);
+               addSetNext("EntitiesDescriptor/EntityDescriptor", "addOrigin", originClass);
+
+               addCallMethod("EntitiesDescriptor/EntityDescriptor", "setName", 1);
+               addCallParam("EntitiesDescriptor/EntityDescriptor", 0, "entityID");
+
+               addCallMethod("EntitiesDescriptor/EntityDescriptor/Organization/OrganizationName", "addAlias", 0);
+               addCallMethod("EntitiesDescriptor/EntityDescriptor/Organization/OrganizationDisplayName", "addAlias", 0);
+                
+               addCallMethod("EntitiesDescriptor/EntityDescriptor/IDPSSODescriptor/SingleSignOnService", "setHandleService", 1);
+               addCallParam("EntitiesDescriptor/EntityDescriptor/IDPSSODescriptor/SingleSignOnService", 0, "Location");
+                                
+               
+               
                configured = true;
 
        }