Class ValueMap
- java.lang.Object
-
- net.shibboleth.idp.attribute.resolver.ad.mapped.impl.ValueMap
-
- All Implemented Interfaces:
Function<String,Set<StringAttributeValue>>
public class ValueMap extends Object implements Function<String,Set<StringAttributeValue>>
Performs many to one mapping of source values to a return value. SourceValue strings may include regular expressions and the ReturnValue may include back references to capturing groups as supported byPattern.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private StringreturnValueReturn value.private Collection<SourceValue>sourceValuesSource values.
-
Constructor Summary
Constructors Constructor Description ValueMap()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<StringAttributeValue>apply(String attributeValue)Evaluate an incoming attribute value against this value map.StringgetReturnValue()Gets the return value.Collection<SourceValue>getSourceValues()Gets the collection of source values.voidsetReturnValue(String newReturnValue)Sets the return value.voidsetSourceValues(Collection<SourceValue> newValues)Sets the Source values for the mapping.
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
returnValue
private String returnValue
Return value.
-
sourceValues
@Nonnull @NonnullElements private Collection<SourceValue> sourceValues
Source values.
-
-
Method Detail
-
getReturnValue
@Nullable public String getReturnValue()
Gets the return value.- Returns:
- the return value
-
setReturnValue
public void setReturnValue(@Nonnull @NotEmpty String newReturnValue)
Sets the return value.- Parameters:
newReturnValue- the return value
-
setSourceValues
public void setSourceValues(@Nullable @NonnullElements Collection<SourceValue> newValues)
Sets the Source values for the mapping.- Parameters:
newValues- functions used to map an input value to an output value
-
getSourceValues
@Nonnull @NonnullElements @Unmodifiable public Collection<SourceValue> getSourceValues()
Gets the collection of source values.- Returns:
- the collection of source values
-
apply
@Nullable public Set<StringAttributeValue> apply(@Nullable String attributeValue)
Evaluate an incoming attribute value against this value map.- Specified by:
applyin interfaceFunction<String,Set<StringAttributeValue>>- Parameters:
attributeValue- incoming attribute value- Returns:
- set of new values the incoming value mapped to
-
-