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
Base class for implementing
MappingStrategy
instances that includes
support for field renaming/aliasing.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether a result set with more than one result is an error.private boolean
Whether an empty result set is an error.A map to rename result fields. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet an unmodifiable view of a map of aliasing rules.boolean
Gets whether multiple results is treated as an error.boolean
Gets whether an empty result set is treated as an error.void
setMultipleResultsAnError
(boolean isAnError) Sets whether multiple results is treated as an error.void
setNoResultAnError
(boolean isAnError) Sets whether an empty result set is treated as an error.void
setResultRenamingMap
(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 Details
-
resultRenamingMap
A map to rename result fields. -
noResultAnError
private boolean noResultAnErrorWhether an empty result set is an error. -
multipleResultsAnError
private boolean multipleResultsAnErrorWhether a result set with more than one result is an error.
-
-
Constructor Details
-
AbstractMappingStrategy
public AbstractMappingStrategy()Constructor.
-
-
Method Details
-
getResultRenamingMap
Get an unmodifiable view of a map of aliasing rules.- Returns:
- a map of result field names to alternate field names
-
setResultRenamingMap
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
-