Package com.nimbusds.ldapsync
Class AttributeNameMap
- java.lang.Object
-
- com.nimbusds.ldapsync.AttributeNameMap
-
public class AttributeNameMap extends Object
Bidirectional mapping between source and target directory attribute names, with optional value transformation.Mapping between attribute names may be required in situations when the source and target directories employ different object classes (schemas) for a particular detail, e.g. name, email or postal address.
Note: The get operation is case insensitive!
-
-
Constructor Summary
Constructors Constructor Description AttributeNameMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSingleValueSelectorgetSingleValueSelector(String sourceAttributeName)StringgetSourceAttributeName(String targetAttributeName)Gets the source attribute name that maps to the specified target attribute.StringgetTargetAttributeName(String sourceAttributeName)Gets the target attribute name that maps to the specified source attribute.AttributeValueTransformgetValueTransform(String sourceAttributeName)Gets the attribute value transform.voidput(String sourceAttributeName, String targetAttributeName, AttributeValueTransform valueTransform, AttributeSingleValueSelector singleValueSelector)Puts a new source attribute / target attribute pair into the map.intsize()Return the number of mappings.Collection<String>sourceAttributes()Returns aCollectionview the source attribute names contained in this map.Collection<String>targetAttributes()Returns aCollectionview of the target attribute names contained in this map.
-
-
-
Method Detail
-
put
public void put(String sourceAttributeName, String targetAttributeName, AttributeValueTransform valueTransform, AttributeSingleValueSelector singleValueSelector)
Puts a new source attribute / target attribute pair into the map.- Parameters:
sourceAttributeName- The source attribute name.targetAttributeName- The target attribute name.valueTransform- The attribute value transform,nullif none.singleValueSelector- The attribute single value selector,nullif none.
-
getSourceAttributeName
public String getSourceAttributeName(String targetAttributeName)
Gets the source attribute name that maps to the specified target attribute.- Parameters:
targetAttributeName- The target attribute name.- Returns:
- The corresponding source attribute name,
nullif no mapping exists.
-
getTargetAttributeName
public String getTargetAttributeName(String sourceAttributeName)
Gets the target attribute name that maps to the specified source attribute.- Parameters:
sourceAttributeName- The source attribute name.- Returns:
- The corresponding target attribute name,
nullif no mapping exists.
-
getValueTransform
public AttributeValueTransform getValueTransform(String sourceAttributeName)
Gets the attribute value transform.- Parameters:
sourceAttributeName- The source attribute name.- Returns:
- The attribute value transform,
nullif none.
-
getSingleValueSelector
public AttributeSingleValueSelector getSingleValueSelector(String sourceAttributeName)
-
size
public int size()
Return the number of mappings.- Returns:
- The number of mappings.
-
sourceAttributes
public Collection<String> sourceAttributes()
Returns aCollectionview the source attribute names contained in this map.- Returns:
- The source attribute names.
-
targetAttributes
public Collection<String> targetAttributes()
Returns aCollectionview of the target attribute names contained in this map.- Returns:
- The target attribute names.
-
-