2 package edu.internet2.middleware.shibboleth.metadata;
6 import javax.xml.namespace.QName;
8 import org.opensaml.saml2.metadata.EntitiesDescriptor;
9 import org.opensaml.saml2.metadata.EntityDescriptor;
10 import org.opensaml.saml2.metadata.RoleDescriptor;
11 import org.opensaml.saml2.metadata.provider.MetadataFilter;
12 import org.opensaml.saml2.metadata.provider.MetadataProvider;
13 import org.opensaml.saml2.metadata.provider.MetadataProviderException;
14 import org.opensaml.xml.XMLObject;
15 import org.w3c.dom.Element;
18 * Base class for <code>MetadataProvider</code> implementations that can be loaded based on the IdP runtime
19 * configuration. Implementors should create a constructor that accepts a configuration <code>Element</code> and sets
22 * @author Walter Hoehn
24 public abstract class ShibbolethConfigurableMetadataProvider implements MetadataProvider {
26 protected org.opensaml.saml2.metadata.provider.MetadataProvider provider;
28 public ShibbolethConfigurableMetadataProvider(Element configuration) {
32 public boolean requireValidMetadata() {
34 return provider.requireValidMetadata();
37 public void setRequireValidMetadata(boolean requireValidMetadata) {
39 provider.setRequireValidMetadata(requireValidMetadata);
43 public MetadataFilter getMetadataFilter() {
45 return provider.getMetadataFilter();
48 public void setMetadataFilter(MetadataFilter newFilter) throws MetadataProviderException {
50 provider.setMetadataFilter(newFilter);
54 public EntityDescriptor getEntityDescriptor(String entityID) throws MetadataProviderException {
56 return provider.getEntityDescriptor(entityID);
59 public List<RoleDescriptor> getRole(String entityID, QName roleName) throws MetadataProviderException {
61 return provider.getRole(entityID, roleName);
64 public List<RoleDescriptor> getRole(String entityID, QName roleName, String supportedProtocol)
65 throws MetadataProviderException {
67 return provider.getRole(entityID, roleName, supportedProtocol);
70 public XMLObject getMetadata() throws MetadataProviderException {
72 return provider.getMetadata();
75 public EntitiesDescriptor getEntitiesDescriptor(String name) throws MetadataProviderException {
77 return provider.getEntitiesDescriptor(name);