edu.internet2.middleware.shibboleth.wayf
Class IdPSiteSet

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.wayf.IdPSiteSet
All Implemented Interfaces:
org.opensaml.saml2.metadata.provider.ObservableMetadataProvider.Observer

public class IdPSiteSet
extends Object
implements org.opensaml.saml2.metadata.provider.ObservableMetadataProvider.Observer

Represents a collection of related sites as desribed by a single soirce of metadata. This is usually a federation. When the WAYF looks to see which IdP sites to show, it trims the list so as to not show IdP's which do not trust the SP. This class is opaque outside this file. The three static methods getSitesLists, searchForMatchingOrigins and lookupIdP provide mechansims for accessing collections of IdPSiteSets.


Constructor Summary
protected IdPSiteSet(Element el, org.opensaml.xml.parse.ParserPool parserPool, boolean warnOnBadBinding)
          Create a new IdPSiteSet as described by the supplied XML segment.
 
Method Summary
protected  void addPlugin(Plugin plugin)
          Declares a plugin to the siteset.
protected  boolean containsIdP(String IdPName)
          For plugin handling we need to know quickly if a metadataset contains the idp.
protected  boolean containsSP(String SPName)
          We do not need to look at a set if it doesn't know about the given SP.
protected  String getDisplayName()
          Return the human friendly name for this siteset.
protected  org.opensaml.saml2.metadata.EntityDescriptor getEntity(String name)
           
protected  String getIdentifier()
          Return this sites (internal) identifier.
protected  Map<String,IdPSite> getIdPSites(String searchString, HandlerConfig config, Collection<IdPSite> searchMatches)
          Return all the Idp in the provided entities descriptor.
protected  IdPSite getSite(String idpName)
          Return the idpSite for the given entity name.
 void onEvent(org.opensaml.saml2.metadata.provider.MetadataProvider provider)
           
protected  PluginMetadataParameter paramFor(Plugin plugin)
          Return the parameter that this plugin uses.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdPSiteSet

protected IdPSiteSet(Element el,
                     org.opensaml.xml.parse.ParserPool parserPool,
                     boolean warnOnBadBinding)
              throws ShibbolethConfigurationException
Create a new IdPSiteSet as described by the supplied XML segment.

Parameters:
el - - configuration details.
parserPool - - the parsers we initialized above.
warnOnBadBinding - if we just warn or give an error if an SP has bad entry points.
Throws:
ShibbolethConfigurationException - - if something goes wrong.
Method Detail

getIdPSites

protected Map<String,IdPSite> getIdPSites(String searchString,
                                          HandlerConfig config,
                                          Collection<IdPSite> searchMatches)
Return all the Idp in the provided entities descriptor. If SearchMatches is non null it is populated with whatever of the IdPs matches the search string (as noted above).

Parameters:
searchString - to match with
config - parameter to mathing
searchMatches - if non null is filled with such of the sites which match the string
Returns:
the sites which fit.

getIdentifier

protected String getIdentifier()
Return this sites (internal) identifier.

Returns:
the identifier

getDisplayName

protected String getDisplayName()
Return the human friendly name for this siteset.

Returns:
The friendly name

containsSP

protected boolean containsSP(String SPName)
We do not need to look at a set if it doesn't know about the given SP. However if no SP is given (as per 1.1) then we do need to look. This calls lets us know whether this set is a canddiate for looking into.

Parameters:
SPName - the Sp we are interested in.
Returns:
whether the site contains the SP.

containsIdP

protected boolean containsIdP(String IdPName)
For plugin handling we need to know quickly if a metadataset contains the idp.

Parameters:
IdPName - the IdP we are interested in.
Returns:
whether the site contains the IdP.

addPlugin

protected void addPlugin(Plugin plugin)
Declares a plugin to the siteset.

Parameters:
plugin - what to declare

paramFor

protected PluginMetadataParameter paramFor(Plugin plugin)
Return the parameter that this plugin uses.

Parameters:
plugin -
Returns:
teh parameter.

onEvent

public void onEvent(org.opensaml.saml2.metadata.provider.MetadataProvider provider)
Specified by:
onEvent in interface org.opensaml.saml2.metadata.provider.ObservableMetadataProvider.Observer

getSite

protected IdPSite getSite(String idpName)
                   throws WayfException
Return the idpSite for the given entity name.

Parameters:
idpName - the entityname to look up
Returns:
the associated idpSite
Throws:
WayfException

getEntity

protected org.opensaml.saml2.metadata.EntityDescriptor getEntity(String name)
                                                          throws WayfException
Throws:
WayfException


Copyright © 2006-2009 Internet2. All Rights Reserved.