Package net.shibboleth.idp.consent.logic.impl

# Class AttributeDisplayDescriptionFunction

java.lang.Object
net.shibboleth.idp.consent.logic.impl.AbstractAttributeDisplayFunction
net.shibboleth.idp.consent.logic.impl.AttributeDisplayDescriptionFunction

All Implemented Interfaces:
  `Function<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 Summary

Constructors
Constructor
Description
`AttributeDisplayDescriptionFunction(HttpServletRequest request, List<String> defaultLangauages, ReloadableService<AttributeTranscoderRegistry> transcoderService)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected Map<Locale,String>`
`getDisplayInfo(AttributeTranscoderRegistry registry, IdPAttribute attribute)`
Get the information to be displayed from the attribute.

### Methods inherited from class net.shibboleth.idp.consent.logic.impl.AbstractAttributeDisplayFunction

`apply`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Constructor Details

### AttributeDisplayDescriptionFunction

public AttributeDisplayDescriptionFunction(@Nonnull HttpServletRequest request, @Nullable List<String> defaultLangauages, ReloadableService<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 AttributeTranscoderRegistry registry, @Nonnull 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