Class AbstractAttributeDisplayFunction

java.lang.Object
net.shibboleth.idp.consent.logic.impl.AbstractAttributeDisplayFunction
All Implemented Interfaces:
Function<IdPAttribute,​String>
Direct Known Subclasses:
AttributeDisplayDescriptionFunction, AttributeDisplayNameFunction

public abstract class AbstractAttributeDisplayFunction
extends Object
implements Function<IdPAttribute,​String>
Abstract Function which returns Locale-aware information about an attribute. The abstract method getDisplayInfo(IdPAttribute) returns the information selected from the attribute. This function defaults to returning the attribute ID if no information is selected from the attribute for the desired locales.
  • Field Details

  • Constructor Details

    • AbstractAttributeDisplayFunction

      public AbstractAttributeDisplayFunction​(@Nonnull javax.servlet.http.HttpServletRequest request, @Nullable List<String> defaultLanguages)
      Constructor.
      Parameters:
      request - HttpServletRequest used to get preferred languages
      defaultLanguages - list of fallback languages in order of decreasing preference
  • Method Details

    • apply

      @Nullable public String apply​(@Nullable IdPAttribute input)
      Specified by:
      apply in interface Function<IdPAttribute,​String>
    • getDisplayInfo

      @Nonnull protected abstract Map<Locale,​String> getDisplayInfo​(@Nonnull IdPAttribute input)
      Get the information to be displayed from the attribute.
      Parameters:
      input - the attribute to consider
      Returns:
      the map of locale dependent information to be displayed