Class 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 Detail

      • AttributeNameMap

        public AttributeNameMap()
    • 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, null if none.
        singleValueSelector - The attribute single value selector, null if 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, null if 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, null if 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, null if none.
      • size

        public int size()
        Return the number of mappings.
        Returns:
        The number of mappings.
      • sourceAttributes

        public Collection<String> sourceAttributes()
        Returns a Collection view the source attribute names contained in this map.
        Returns:
        The source attribute names.
      • targetAttributes

        public Collection<String> targetAttributes()
        Returns a Collection view of the target attribute names contained in this map.
        Returns:
        The target attribute names.