Class AbstractMappingStrategy<T>

java.lang.Object
net.shibboleth.idp.attribute.resolver.dc.AbstractMappingStrategy<T>
Type Parameters:
T - The type of result.
All Implemented Interfaces:
MappingStrategy<T>
Direct Known Subclasses:
StringAttributeValueMappingStrategy, StringResultMappingStrategy

public abstract class AbstractMappingStrategy<T> extends Object implements MappingStrategy<T>
Base class for implementing MappingStrategy instances that includes support for field renaming/aliasing.
  • Field Details

    • resultRenamingMap

      @Nonnull @NonnullElements private Map<String,String> resultRenamingMap
      A map to rename result fields.
    • noResultAnError

      private boolean noResultAnError
      Whether an empty result set is an error.
    • multipleResultsAnError

      private boolean multipleResultsAnError
      Whether a result set with more than one result is an error.
  • Constructor Details

    • AbstractMappingStrategy

      public AbstractMappingStrategy()
      Constructor.
  • Method Details

    • getResultRenamingMap

      @Nonnull @NonnullElements @Unmodifiable @NotLive public Map<String,String> getResultRenamingMap()
      Get an unmodifiable view of a map of aliasing rules.
      Returns:
      a map of result field names to alternate field names
    • setResultRenamingMap

      public void setResultRenamingMap(@Nonnull @NonnullElements Map<String,String> map)
      Set the map of aliasing rules.
      Parameters:
      map - map of result field names to alternate field names
    • isNoResultAnError

      public boolean isNoResultAnError()
      Gets whether an empty result set is treated as an error.
      Returns:
      whether an empty result set is treated as an error
    • setNoResultAnError

      public void setNoResultAnError(boolean isAnError)
      Sets whether an empty result set is treated as an error.
      Parameters:
      isAnError - whether an empty result set is treated as an error
    • isMultipleResultsAnError

      public boolean isMultipleResultsAnError()
      Gets whether multiple results is treated as an error.
      Returns:
      whether multiple results is treated as an error
    • setMultipleResultsAnError

      public void setMultipleResultsAnError(boolean isAnError)
      Sets whether multiple results is treated as an error.
      Parameters:
      isAnError - whether multiple results is treated as an error