Class AbstractAttributeDisplayFunction
java.lang.Object
net.shibboleth.idp.consent.logic.impl.AbstractAttributeDisplayFunction
- Direct Known Subclasses:
AttributeDisplayDescriptionFunction,AttributeDisplayNameFunction
public abstract class AbstractAttributeDisplayFunction
extends Object
implements Function<net.shibboleth.idp.attribute.IdPAttribute,String>
Abstract Function which returns
Locale-aware information about an attribute. The abstract method
getDisplayInfo(AttributeTranscoderRegistry, IdPAttribute) returns the information selected for
the attribute from the transcoder.
This function defaults to returning the attribute ID if no information is selected from the attribute
for the desired locales.-
Field Summary
FieldsModifier and TypeFieldDescriptionCache of already looked up values.private final List<Locale.LanguageRange>The tags for the fallback languages.private final List<Locale.LanguageRange>The range of locales from the request.private ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry>How to do the lookup. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractAttributeDisplayFunction(HttpServletRequest request, List<String> defaultLanguages, ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry> transcoderService) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionapply(net.shibboleth.idp.attribute.IdPAttribute input) getDisplayInfo(net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry registry, net.shibboleth.idp.attribute.IdPAttribute attribute) Get the information to be displayed from the attribute.
-
Field Details
-
languageRange
The range of locales from the request. -
defaultLanguageRange
The tags for the fallback languages. -
cachedInfo
Cache of already looked up values. -
transcoder
@Nonnull private ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry> transcoderHow to do the lookup.
-
-
Constructor Details
-
Method Details
-
apply
-
getDisplayInfo
@Nonnull protected abstract 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.- Parameters:
registry- theAttributeTranscoderRegistryto ask.attribute- the attribute to consider- Returns:
- the map of locale dependent information to be displayed
-