Multi-LDAP Technical Documentation
De Trustedbird Client Wiki
English | Français
> Documentation > Add-on: Multi-LDAP > Technical Documentation
Architecture
- Users autocompletion with multi-directory LDAP
This feature is based on the standard autocompletion from Thunderbird. It overloads functions setupLdapAutocompleteSession(), AddDirectorySettingsObserver() and RemoveDirectorySettingsObserver() from MsgComposeCommands.js file.
GUI files
- Global preferences
- User account preferences
Global configuration
- preferencesOverlay.xul file overloads preferences.xul file. It includes the file composeLDAPOverlay.xul. It uses composeLDAPOverlay.js library.
- composeLDAPOverlay.js : retrieve the LDAP server list configured. It builds dynamically all XML items to create the GUI servers list. This list is accessible from the global preferences, in the composition tab.
- Property to activate LDAP autocompletion (boolean): ldap_2.autoComplete.useDirectory
- Property to define LDAP server list (string): ldap_2.autoComplete.directoryServers
User account preferences
- Architecture is the same as above with a level less of inclusion (No file preferencesOverlay.xul). The file am-addressingOverlay.xul overloads am-addressingOverlay.xul. It uses the library file am-addressingOverlay.js
- Property to overload the activation of LDAP autocompletion (boolean): mail.identity.%IDENTITYKEY%.overrideGlobal_Pref.multi-ldap
- Property to overload the definition of LDAP server list (string): mail.identity.%IDENTITYKEY%.directoryServers
XPCOM
This add-on is built around Mozilla components nsIAutoCompleteSession and nsILDAPAutoCompFormatter that allows to manage standard autocompletion from LDAP server.