public class DynamicAttributePredicate extends AbstractAttributePredicate
AttributeContext that derives the value(s) to match based
on one or more supplied Functions instead of static values.| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.ListMultimap<String,com.google.common.base.Function<ProfileRequestContext,String>> |
attributeFunctionMap
Map of attribute IDs to functions.
|
private Logger |
log
Class logger.
|
| Constructor and Description |
|---|
DynamicAttributePredicate()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(ProfileRequestContext input) |
protected boolean |
findMatch(String toMatch,
IdPAttribute attribute)
Look for a matching value in an attribute.
|
protected boolean |
hasMatch(Map<String,IdPAttribute> attributeMap)
Abstract implementation of the condition to evaluate.
|
protected boolean |
hasMatch(ProfileRequestContext profileRequestContext,
Map<String,IdPAttribute> attributeMap)
Implementation of the condition to evaluate.
|
void |
setAttributeFunctionMap(Map<String,Collection<com.google.common.base.Function<ProfileRequestContext,String>>> map)
Set the map of attribute/function pairs (as a map of function collections) to check for.
|
allowNullAttributeContext, getAttributeContextLookupStrategy, isUseUnfilteredAttributes, setAttributeContextLookupStrategy, setUseUnfilteredAttributes@Nonnull @NonnullElements private com.google.common.collect.ListMultimap<String,com.google.common.base.Function<ProfileRequestContext,String>> attributeFunctionMap
public void setAttributeFunctionMap(@Nonnull@NonnullElements Map<String,Collection<com.google.common.base.Function<ProfileRequestContext,String>>> map)
map - map of attribute/function pairspublic boolean apply(@Nullable ProfileRequestContext input)
apply in interface com.google.common.base.Predicate<ProfileRequestContext>apply in class AbstractAttributePredicateprotected boolean hasMatch(@Nonnull@NonnullElements Map<String,IdPAttribute> attributeMap)
hasMatch in class AbstractAttributePredicateattributeMap - the attributes to evaluateprotected boolean hasMatch(@Nullable ProfileRequestContext profileRequestContext, @Nonnull@NonnullElements Map<String,IdPAttribute> attributeMap)
profileRequestContext - current profile request contextattributeMap - the attributes to evaluateprotected boolean findMatch(@Nonnull@NotEmpty String toMatch, @Nonnull IdPAttribute attribute)
toMatch - value to look forattribute - attribute to checkCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.