Interface IDBAttrMapper

  • All Known Subinterfaces:
    IDBDynAttrMapper

    public interface IDBAttrMapper
    An interface represents an attribute mapper. A mapper has knowledge on how to convert a db attribute into zero or more LDAP attribute, and vice versa.

    Version:
    $Revision$, $Date$
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Enumeration<java.lang.String> getSupportedLDAPAttributeNames()
      Retrieves a list of LDAP attributes that are used in the mapper.
      void mapLDAPAttributeSetToObject​(netscape.ldap.LDAPAttributeSet attrs, java.lang.String name, IDBObj parent)
      Maps LDAP attributes into object, and puts the object into 'parent'.
      void mapObjectToLDAPAttributeSet​(IDBObj parent, java.lang.String name, java.lang.Object obj, netscape.ldap.LDAPAttributeSet attrs)
      Maps object attribute into LDAP attributes.
      java.lang.String mapSearchFilter​(java.lang.String name, java.lang.String op, java.lang.String value)
      Maps search filters into LDAP search filter.
    • Method Detail

      • getSupportedLDAPAttributeNames

        java.util.Enumeration<java.lang.String> getSupportedLDAPAttributeNames()
        Retrieves a list of LDAP attributes that are used in the mapper. By having this, the framework can provide search on selective attributes.
        Returns:
        a list of supported attribute names
      • mapObjectToLDAPAttributeSet

        void mapObjectToLDAPAttributeSet​(IDBObj parent,
                                         java.lang.String name,
                                         java.lang.Object obj,
                                         netscape.ldap.LDAPAttributeSet attrs)
                                  throws EBaseException
        Maps object attribute into LDAP attributes.
        Parameters:
        parent - parent object where the object comes from
        name - name of db attribute
        obj - object itself
        attrs - LDAP attribute set where the result should be stored
        Throws:
        EBaseException - failed to map object
      • mapLDAPAttributeSetToObject

        void mapLDAPAttributeSetToObject​(netscape.ldap.LDAPAttributeSet attrs,
                                         java.lang.String name,
                                         IDBObj parent)
                                  throws EBaseException
        Maps LDAP attributes into object, and puts the object into 'parent'.
        Parameters:
        attrs - LDAP attribute set
        name - name of db attribute to be processed
        parent - parent object where the object should be added
        Throws:
        EBaseException - failed to map object
      • mapSearchFilter

        java.lang.String mapSearchFilter​(java.lang.String name,
                                         java.lang.String op,
                                         java.lang.String value)
                                  throws EBaseException
        Maps search filters into LDAP search filter.
        Parameters:
        name - name of db attribute
        op - filte operation (i.e. "=", ">=")
        value - attribute value
        Throws:
        EBaseException - failed to map filter