Class AttributeValueLookupFunction
java.lang.Object
net.shibboleth.idp.consent.logic.impl.AttributeValueLookupFunction
- All Implemented Interfaces:
Function<ProfileRequestContext,String>
,ContextDataLookupFunction<ProfileRequestContext,String>
public class AttributeValueLookupFunction extends Object implements ContextDataLookupFunction<ProfileRequestContext,String>
ContextDataLookupFunction
to return the value of an attribute from an AttributeContext
.-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,AttributeContext>
attributeContextLookupStrategy
Strategy used to find theAttributeContext
from theProfileRequestContext
.private String
attributeId
The attribute ID to look for.private org.slf4j.Logger
log
Class logger.private boolean
useUnfilteredAttributes
Whether to use filtered or unfiltered attributes. -
Constructor Summary
Constructors Constructor Description AttributeValueLookupFunction(String userAttributeId)
Constructor. -
Method Summary
Modifier and Type Method Description String
apply(ProfileRequestContext input)
void
setAttributeContextLookupStrategy(Function<ProfileRequestContext,AttributeContext> strategy)
Set the attribute context lookup strategy.void
setUseUnfilteredAttributes(boolean flag)
Set whether to use filtered or unfiltered attributes.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
attributeId
The attribute ID to look for. -
attributeContextLookupStrategy
Strategy used to find theAttributeContext
from theProfileRequestContext
. -
useUnfilteredAttributes
private boolean useUnfilteredAttributesWhether to use filtered or unfiltered attributes.
-
-
Constructor Details
-
AttributeValueLookupFunction
Constructor.- Parameters:
userAttributeId
- the attribute id
-
-
Method Details
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext,AttributeContext> strategy)Set the attribute context lookup strategy.- Parameters:
strategy
- the attribute context lookup strategy
-
setUseUnfilteredAttributes
public void setUseUnfilteredAttributes(boolean flag)Set whether to use filtered or unfiltered attributes.Defaults to true.
- Parameters:
flag
- flag to set
-
apply
- Specified by:
apply
in interfaceFunction<ProfileRequestContext,String>
-