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 implementingMappingStrategyinstances that includes support for field renaming/aliasing.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanmultipleResultsAnErrorWhether a result set with more than one result is an error.private booleannoResultAnErrorWhether an empty result set is an error.private Map<String,String>resultRenamingMapA map to rename result fields.
-
Constructor Summary
Constructors Constructor Description AbstractMappingStrategy()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getResultRenamingMap()Get an unmodifiable view of a map of aliasing rules.booleanisMultipleResultsAnError()Gets whether multiple results is treated as an error.booleanisNoResultAnError()Gets whether an empty result set is treated as an error.voidsetMultipleResultsAnError(boolean isAnError)Sets whether multiple results is treated as an error.voidsetNoResultAnError(boolean isAnError)Sets whether an empty result set is treated as an error.voidsetResultRenamingMap(Map<String,String> map)Set the map of aliasing rules.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.idp.attribute.resolver.dc.MappingStrategy
map
-
-
-
-
Field Detail
-
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.
-
-
Method Detail
-
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
-
-