Class AttributeDisplayNameFunction

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

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

    • AttributeDisplayNameFunction

      public AttributeDisplayNameFunction(@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 @Unmodifiable @NotLive 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