edu.internet2.middleware.shibboleth.wayf
Class IdPSite

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.wayf.IdPSite

public class IdPSite
extends Object

A class which abstracts an IdP for the sake of the WAYF display. Given an EntityDescriptor as input it provides bean style get functions for the name (EntityId), the display name (a hybrid of Organization name or EntityId and the IdP's SSO connection point.


Nested Class Summary
static class IdPSite.Compare
          This allows us to set up sorted lists of entities with respect to the browser request.
 
Field Summary
private  String displayLanguage
          The language we set up.
private  org.opensaml.saml2.metadata.EntityDescriptor entity
          The OpenSaml element that this stands for.
 
Constructor Summary
IdPSite(org.opensaml.saml2.metadata.EntityDescriptor entityParam)
          Create a new element from the provided Entity.
 
Method Summary
protected  int compareTo(Object o, HttpServletRequest req)
          Comparison so we can sort the output for jsp.
 String getAddressForWAYF()
          Get URL for Shibboleth SSO endpoint.
protected static String getAddressForWAYF(org.opensaml.saml2.metadata.EntityDescriptor theEntity)
          Get URL for Shibboleth SSO endpoint.
 String getDisplayName()
          Get the user friendly name for the entity, the language we previously set up.
 String getDisplayName(HttpServletRequest req)
          Get the user friendly name for the entity, collecting the locale from the browser if possible.
private  String getDisplayName(String lang)
          Get the user friendly name for the entity, using provided language.
 org.opensaml.saml2.common.Extensions getExtensions()
          Return all the extension elements.
 String getName()
          Get the name for the enclosed entity.
 void setDisplayLanguage(String lang)
          Prior to display we set the display language from the browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entity

private org.opensaml.saml2.metadata.EntityDescriptor entity
The OpenSaml element that this stands for.


displayLanguage

private String displayLanguage
The language we set up.

Constructor Detail

IdPSite

public IdPSite(org.opensaml.saml2.metadata.EntityDescriptor entityParam)
Create a new element from the provided Entity.

Parameters:
entityParam - - What to create from
Method Detail

getName

public String getName()
Get the name for the enclosed entity.

Returns:
the name for the enclosed entity.

getDisplayName

public String getDisplayName(HttpServletRequest req)
Get the user friendly name for the entity, collecting the locale from the browser if possible.

Parameters:
req - the request
Returns:
a user friendly name.

getDisplayName

private String getDisplayName(String lang)
Get the user friendly name for the entity, using provided language.

Parameters:
lang - the language.
Returns:
a user friendly name.

getDisplayName

public String getDisplayName()
Get the user friendly name for the entity, the language we previously set up.

Returns:
a user friendly name.

getExtensions

public org.opensaml.saml2.common.Extensions getExtensions()
Return all the extension elements.

Returns:
the extensions

compareTo

protected int compareTo(Object o,
                        HttpServletRequest req)
Comparison so we can sort the output for jsp.

Parameters:
o - What to compare against
req - The request.
Returns:
numeric encoding of comparison
See Also:
Comparator

getAddressForWAYF

protected static String getAddressForWAYF(org.opensaml.saml2.metadata.EntityDescriptor theEntity)
Get URL for Shibboleth SSO endpoint. When a user has selected an IdP, or prior to displaying the entity this provides the address to which we will redirect or null if we cannot

Parameters:
theEntity - the entity in question
Returns:
http address for the IdP this represents.

getAddressForWAYF

public String getAddressForWAYF()
Get URL for Shibboleth SSO endpoint. When a user has selected an IdP, this provides the address to which we will redirect or null if we cannot

Returns:
http address for the IdP this represents.

setDisplayLanguage

public void setDisplayLanguage(String lang)
Prior to display we set the display language from the browser. There is probably a proper way to do this using jsp, but I want to keep the API between JSP and java the same 1.3->2.0

Parameters:
lang - the language to set


Copyright © 1999-2012. All Rights Reserved.