Class AttributeDisplayNameFunction
java.lang.Object
net.shibboleth.idp.consent.logic.impl.AbstractAttributeDisplayFunction
net.shibboleth.idp.consent.logic.impl.AttributeDisplayNameFunction
- All Implemented Interfaces:
Function<IdPAttribute,
String>
Function which returns the locale-aware display name of an attribute, defaulting to the
attribute ID if the attribute has no display name.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttributeDisplayNameFunction
(javax.servlet.http.HttpServletRequest request, List<String> defaultLangauages, ReloadableService<AttributeTranscoderRegistry> transcoderService) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayInfo
(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
-
Field Details
-
log
private final org.slf4j.Logger logLogger.
-
-
Constructor Details
-
AttributeDisplayNameFunction
public AttributeDisplayNameFunction(@Nonnull javax.servlet.http.HttpServletRequest request, @Nullable List<String> defaultLangauages, ReloadableService<AttributeTranscoderRegistry> transcoderService) Constructor.- Parameters:
request
-HttpServletRequest
used to get preferred languagesdefaultLangauages
- list of fallback languages in order of decreasing preferencetranscoderService
- 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 classAbstractAttributeDisplayFunction
- Parameters:
registry
- theAttributeTranscoderRegistry
to ask.attribute
- the attribute to consider- Returns:
- the map of locale dependent information to be displayed
-