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 by Pattern.
  • Field Details

    • 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.
  • Constructor Details

    • ValueMap

      public ValueMap()
      Constructor.
  • Method Details

    • 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:
      apply in interface Function<String,​Set<StringAttributeValue>>
      Parameters:
      attributeValue - incoming attribute value
      Returns:
      set of new values the incoming value mapped to