Open Bug 145891 Opened 22 years ago Updated 2 years ago

[LDIF import] potential code cleanup / simplification of nsTextAddress::AddLdifColToDatabase()

Categories

(MailNews Core :: Import, defect)

x86
Windows 2000
defect

Tracking

(Not tracked)

Future

People

(Reporter: sspitzer, Unassigned)

References

Details

[LDIF import] potential code cleanup / simplification of 
nsTextAddress::AddLdifColToDatabase()

from bug #142940, I suggest:

instead of just defining prefs for generic columns,
[like 
pref("mail.addr_book.export_ldif_map._AimScreenName", "mozillaAimScreenName");
pref("mail.addr_book.import_ldif_map.mozillaaimscreenname", "_AimScreenName");]

we could do this for every ldif attribute, and define our attribute map
in prefs.

We could then remove the Add*() methods on nsIAddrDatabase, since
AddRowValue() is the generic version of the Add*() methods.

[The only difference is the generic version doesn't (currently) cache the mork 
token.]

this would simplify nsTextAddress.cpp, and if the import map is defined in 
prefs,  it would allow us to extend mozilla to handle other future LDIF.

meaning, if some popular application exports notes as "theseAreMyNotes"
we could add support for that application's LDIF by doing this:

pref("mail.addr_book.import_ldif_map.thesearemynotes", "Notes");

dmose writes:

"Making the attributes all generic would be a fine thing; though perhaps even
better would be to do it by reading an LDAP schema file rather than the prefs."
futuring.  code cleanup isn't a top priority.
Target Milestone: --- → Future
Depends on: 85489
Product: MailNews → Core
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Filter on "Nobody_NScomTLD_20080620"
QA Contact: nbaca → import
Product: Core → MailNews Core
Or just use nsIAbLDAPAttributeMap...
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.