Class AbstractLdapEntryMapper<T>

    • Field Detail

      • logger

        protected final Logger logger
        Logger for this class.
    • Constructor Detail

      • AbstractLdapEntryMapper

        public AbstractLdapEntryMapper()
    • Method Detail

      • getClassDescriptor

        protected abstract ClassDescriptor getClassDescriptor​(T object)
        Returns the class descriptor.
        Parameters:
        object - to return the class descriptor for
        Returns:
        class descriptor
      • mapDn

        public String mapDn​(T object)
        Description copied from interface: LdapEntryMapper
        Returns the LDAP DN for the supplied object.
        Specified by:
        mapDn in interface LdapEntryMapper<T>
        Parameters:
        object - to retrieve the DN from
        Returns:
        LDAP DN
      • map

        public LdapEntry map​(T source)
        Injects data from the supplied source object into a new instance of ldap entry.
        Parameters:
        source - to read from
        Returns:
        ldap entry
      • map

        public void map​(T source,
                        LdapEntry dest)
        Description copied from interface: LdapEntryMapper
        Injects data from the supplied source object into the supplied ldap entry.
        Specified by:
        map in interface LdapEntryMapper<T>
        Parameters:
        source - to read from
        dest - to write to
      • mapDn

        protected String mapDn​(T source,
                               DnValueMutator mutator)
        Creates a new DN using the supplied mutator and source.
        Parameters:
        source - to get DN from
        mutator - to invoke
        Returns:
        mapped DN
      • mapValue

        protected LdapAttribute mapValue​(T source,
                                         AttributeValueMutator mutator)
        Creates a new ldap attribute using the supplied mutator and source.
        Parameters:
        source - to get attribute values from
        mutator - to invoke
        Returns:
        new ldap attribute containing zero or more values
      • map

        public void map​(LdapEntry source,
                        T dest)
        Description copied from interface: LdapEntryMapper
        Injects data from the supplied ldap entry into the supplied destination object.
        Specified by:
        map in interface LdapEntryMapper<T>
        Parameters:
        source - to read from
        dest - to write to
      • mapDn

        protected void mapDn​(String dn,
                             T dest,
                             DnValueMutator mutator)
        Sets the supplied DN on the destination using the mutator.
        Parameters:
        dn - value to set
        dest - to set value on
        mutator - to invoke
      • mapValue

        protected void mapValue​(LdapAttribute attr,
                                T dest,
                                AttributeValueMutator mutator)
        Sets the supplied attribute values on the destination using the mutator.
        Parameters:
        attr - values to set
        dest - to set values on
        mutator - to invoke