Class AttributeDisplayDescriptionFunction

java.lang.Object
net.shibboleth.idp.consent.logic.impl.AbstractAttributeDisplayFunction
net.shibboleth.idp.consent.logic.impl.AttributeDisplayDescriptionFunction
All Implemented Interfaces:
Function<net.shibboleth.idp.attribute.IdPAttribute,String>

public class AttributeDisplayDescriptionFunction extends AbstractAttributeDisplayFunction
Function which returns the locale-aware display description of an attribute, defaulting to the attribute ID if the attribute has no display description.
  • Constructor Details

    • AttributeDisplayDescriptionFunction

      public AttributeDisplayDescriptionFunction(@Nonnull HttpServletRequest request, @Nullable List<String> defaultLangauages, ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry> transcoderService)
      Constructor.
      Parameters:
      request - HttpServletRequest used to get preferred languages
      defaultLangauages - list of fallback languages in order of decreasing preference
      transcoderService - the attribute transcoder service
  • Method Details

    • getDisplayInfo

      @Nonnull protected Map<Locale,String> getDisplayInfo(@Nonnull net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry registry, @Nonnull net.shibboleth.idp.attribute.IdPAttribute attribute)
      Get the information to be displayed from the attribute.
      Specified by:
      getDisplayInfo in class AbstractAttributeDisplayFunction
      Parameters:
      registry - the AttributeTranscoderRegistry to ask.
      attribute - the attribute to consider
      Returns:
      the map of locale dependent information to be displayed