Added some rarely used methods to sync metadata API with C++
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 20 Jun 2005 20:22:48 +0000 (20:22 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 20 Jun 2005 20:22:48 +0000 (20:22 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1648 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/IdPProtocolSupport.java
src/edu/internet2/middleware/shibboleth/serviceprovider/ServiceProviderConfig.java

index 97e373a..80588d8 100644 (file)
@@ -47,6 +47,7 @@ import edu.internet2.middleware.shibboleth.common.ServiceProviderMapper;
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
 import edu.internet2.middleware.shibboleth.common.provider.ShibbolethTrust;
 import edu.internet2.middleware.shibboleth.common.Trust;
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
 import edu.internet2.middleware.shibboleth.common.provider.ShibbolethTrust;
 import edu.internet2.middleware.shibboleth.common.Trust;
+import edu.internet2.middleware.shibboleth.metadata.EntitiesDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.EntityDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.Metadata;
 import edu.internet2.middleware.shibboleth.metadata.MetadataException;
 import edu.internet2.middleware.shibboleth.metadata.EntityDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.Metadata;
 import edu.internet2.middleware.shibboleth.metadata.MetadataException;
@@ -183,7 +184,7 @@ public class IdPProtocolSupport implements Metadata {
                return metadata.size();
        }
 
                return metadata.size();
        }
 
-       public EntityDescriptor lookup(String providerId) {
+       public EntityDescriptor lookup(String providerId, boolean strict) {
 
                Iterator iterator = metadata.iterator();
                while (iterator.hasNext()) {
 
                Iterator iterator = metadata.iterator();
                while (iterator.hasNext()) {
@@ -193,7 +194,7 @@ public class IdPProtocolSupport implements Metadata {
                return null;
        }
 
                return null;
        }
 
-       public EntityDescriptor lookup(Artifact artifact) {
+       public EntityDescriptor lookup(Artifact artifact, boolean strict) {
 
                Iterator iterator = metadata.iterator();
                while (iterator.hasNext()) {
 
                Iterator iterator = metadata.iterator();
                while (iterator.hasNext()) {
@@ -203,6 +204,22 @@ public class IdPProtocolSupport implements Metadata {
                return null;
        }
 
                return null;
        }
 
+       public EntityDescriptor lookup(String id) {
+               return lookup(id,true);
+       }
+
+       public EntityDescriptor lookup(Artifact artifact) {
+               return lookup(artifact,true);
+       }
+
+       public EntityDescriptor getRootEntity() {
+               return null;
+       }
+
+       public EntitiesDescriptor getRootEntities() {
+               return null;
+       }
+       
        public SAMLAttribute[] getReleaseAttributes(Principal principal, RelyingParty relyingParty, String requester,
                        URL resource) throws AAException {
 
        public SAMLAttribute[] getReleaseAttributes(Principal principal, RelyingParty relyingParty, String requester,
                        URL resource) throws AAException {
 
index 94b2d93..c607515 100644 (file)
@@ -184,6 +184,7 @@ import edu.internet2.middleware.shibboleth.common.PluggableConfigurationComponen
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
 import edu.internet2.middleware.shibboleth.common.Trust;
 import edu.internet2.middleware.shibboleth.common.provider.ShibbolethTrust;
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
 import edu.internet2.middleware.shibboleth.common.Trust;
 import edu.internet2.middleware.shibboleth.common.provider.ShibbolethTrust;
+import edu.internet2.middleware.shibboleth.metadata.EntitiesDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.EntityDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.Metadata;
 import edu.internet2.middleware.shibboleth.metadata.RoleDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.EntityDescriptor;
 import edu.internet2.middleware.shibboleth.metadata.Metadata;
 import edu.internet2.middleware.shibboleth.metadata.RoleDescriptor;
@@ -966,12 +967,12 @@ public class ServiceProviderConfig {
                 * @param id ID of the IdP entity
                 * @return EntityDescriptor metadata object for that site.
                 */
                 * @param id ID of the IdP entity
                 * @return EntityDescriptor metadata object for that site.
                 */
-        public EntityDescriptor lookup(String id) {
+        public EntityDescriptor lookup(String id, boolean strict) {
                        Iterator iuris = groupUris.iterator();
                        while (iuris.hasNext()) {
                                String uri =(String) iuris.next();
                                Metadata locator=getMetadataImplementor(uri);
                        Iterator iuris = groupUris.iterator();
                        while (iuris.hasNext()) {
                                String uri =(String) iuris.next();
                                Metadata locator=getMetadataImplementor(uri);
-                               EntityDescriptor entity = locator.lookup(id);
+                               EntityDescriptor entity = locator.lookup(id, strict);
                                if (entity!=null) {
                                        reqlog.debug("Metadata.lookup resolved Entity "+ id);
                                        return entity;
                                if (entity!=null) {
                                        reqlog.debug("Metadata.lookup resolved Entity "+ id);
                                        return entity;
@@ -981,12 +982,12 @@ public class ServiceProviderConfig {
                        return null;
                }
 
                        return null;
                }
 
-        public EntityDescriptor lookup(Artifact artifact) {
+        public EntityDescriptor lookup(Artifact artifact, boolean strict) {
             Iterator iuris = groupUris.iterator();
             while (iuris.hasNext()) {
                 String uri =(String) iuris.next();
                 Metadata locator=getMetadataImplementor(uri);
             Iterator iuris = groupUris.iterator();
             while (iuris.hasNext()) {
                 String uri =(String) iuris.next();
                 Metadata locator=getMetadataImplementor(uri);
-                EntityDescriptor entity = locator.lookup(artifact);
+                EntityDescriptor entity = locator.lookup(artifact, strict);
                 if (entity!=null) {
                                        reqlog.debug("Metadata.lookup resolved Artifact "+ artifact);
                     return entity;
                 if (entity!=null) {
                                        reqlog.debug("Metadata.lookup resolved Artifact "+ artifact);
                     return entity;
@@ -995,6 +996,22 @@ public class ServiceProviderConfig {
                        reqlog.warn("Metadata.lookup failed to resolve Artifact "+ artifact);
             return null;
         }
                        reqlog.warn("Metadata.lookup failed to resolve Artifact "+ artifact);
             return null;
         }
+
+               public EntityDescriptor lookup(String id) {
+                       return lookup(id,true);
+               }
+
+               public EntityDescriptor lookup(Artifact artifact) {
+                       return lookup(artifact,true);
+               }
+
+               public EntityDescriptor getRootEntity() {
+                       return null;
+               }
+
+               public EntitiesDescriptor getRootEntities() {
+                       return null;
+               }
         
                /**
                 * Return the current array of objects that implement the Trust interface
         
                /**
                 * Return the current array of objects that implement the Trust interface