edu.internet2.middleware.shibboleth.idp.ui
Class ServiceTagSupport

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by edu.internet2.middleware.shibboleth.idp.ui.ServiceTagSupport
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
ServiceContactTag, ServiceDescriptionTag, ServiceInformationURLTag, ServiceLogoTag, ServiceNameTag, ServicePrivacyURLTag

public class ServiceTagSupport
extends javax.servlet.jsp.tagext.BodyTagSupport

Display the serviceName. This is taken in order 1) From the mdui 2) AttributeConsumeService 3) HostName from the EntityId 4) EntityId.

See Also:
Serialized Form

Field Summary
private  String cssClass
          Bean storage.
private  String cssId
          Bean storage.
private  String cssStyle
          Bean storage.
private static org.slf4j.Logger log
          Class logger.
private static long serialVersionUID
          checkstyle requires this serialization info.
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ServiceTagSupport()
           
 
Method Summary
protected  void addClassAndId(StringBuilder sb)
          Add the class and Id if present.
protected  String buildHyperLink(String url, String text)
          build a hyperlink from the parameters.
protected  List<String> getBrowserLanguages()
          Pluck the language from the browser.
private  String getNameFromAttributeConsumingService(String lang)
          look for an <AttributeConsumeService> and if its there look for an appropriate name.
private  String getNameFromEntityId()
          If the entityId can look like a host return that otherwise the string.
private  String getNameFromUIInfo(String lang)
          look at <Uiinfo> if there and if so look for appropriate name.
protected  String getServiceName()
          Get the identifier for the service name as per the rules above.
protected  EntityDescriptor getSPEntityDescriptor()
          Get the EntityDescriptor for the relying party.
protected  UIInfo getSPUIInfo()
          Traverse the SP's EntityDescriptor and pick out the UIInfo.
 void setCssClass(String value)
          Bean setter.
 void setCssId(String value)
          Bean setter.
 void setCssStyle(String value)
          Bean setter.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
checkstyle requires this serialization info.

See Also:
Constant Field Values

log

private static org.slf4j.Logger log
Class logger.


cssClass

private String cssClass
Bean storage. class reference


cssId

private String cssId
Bean storage. id reference


cssStyle

private String cssStyle
Bean storage. style reference

Constructor Detail

ServiceTagSupport

public ServiceTagSupport()
Method Detail

setCssClass

public void setCssClass(String value)
Bean setter.

Parameters:
value - what to set

setCssId

public void setCssId(String value)
Bean setter.

Parameters:
value - what to set

setCssStyle

public void setCssStyle(String value)
Bean setter.

Parameters:
value - what to set

addClassAndId

protected void addClassAndId(StringBuilder sb)
Add the class and Id if present.

Parameters:
sb - the stringbuilder to asdd to.

buildHyperLink

protected String buildHyperLink(String url,
                                String text)
build a hyperlink from the parameters.

Parameters:
url - the URL
text - what to embed
Returns:
the hyperlink.

getSPEntityDescriptor

protected EntityDescriptor getSPEntityDescriptor()
Get the EntityDescriptor for the relying party.

Returns:
the SPs EntityDescriptor

getSPUIInfo

protected UIInfo getSPUIInfo()
Traverse the SP's EntityDescriptor and pick out the UIInfo.

Returns:
the first UIInfo for the SP.

getBrowserLanguages

protected List<String> getBrowserLanguages()
Pluck the language from the browser.

Returns:
the two letter language

getNameFromEntityId

private String getNameFromEntityId()
If the entityId can look like a host return that otherwise the string.

Returns:
either the host or the entityId.

getNameFromUIInfo

private String getNameFromUIInfo(String lang)
look at <Uiinfo> if there and if so look for appropriate name.

Parameters:
lang - - which language to look up
Returns:
null or an appropriate name

getNameFromAttributeConsumingService

private String getNameFromAttributeConsumingService(String lang)
look for an <AttributeConsumeService> and if its there look for an appropriate name.

Parameters:
lang - - which language to look up
Returns:
null or an appropriate name

getServiceName

protected String getServiceName()
Get the identifier for the service name as per the rules above.

Returns:
something sensible for display.


Copyright © 1999-2012. All Rights Reserved.