LDAP and C++ API

Hi, I have few queries regarding LDAP and Lotus C++ API -

  1. Can I retrieve DN (Distinguished Name) of a note entry using Notes C++ API? If I know the noteid of a note and want to know its DN … is there any way to get it?

  2. Sometimes LDAP Name and Notes Name are different for an attribute/object class. Can I retrieve LDAP Name for given Notes Name programmatically using C++ API?

Any pointers regarding the same will be helpful. Thank you in anticipation.

-Prakash

Subject: LDAP and C++ API

I have few queries regarding LDAP and Lotus C++ API -

  1. Can I retrieve DN (Distinguished Name) of a note entry using Notes C++ API? If I know the noteid of a note and want to know its DN … is there any way to get it?

If you know the Universal Note ID (UNID) of a Note, you can use the new dominoUNID operational attribute (32-char hex string) in LDAP queries. (FYI - a simple Note ID is not sufficient since a single Domino LDAP server can serve up multiple Domino directories through Directory Assistance).

attributetypes: (

2.16.840.1.113678.2.2.2.2.1354

NAME ‘dominoUNID’

DESC ‘Lotus Notes/Domino Universal Identifier (UNID)’

EQUALITY caseIgnoreMatch

SYNTAX 1.3.6.1.4.1.1466.115.121.1.15

NO-USER-MODIFICATION

SINGLE-VALUE

USAGE directoryOperation

)

So you can issue searches using LDAP filters like …

ldapsearch -h hostname “(dominounid=66F3475A1D4C356785256D7F006E1280)”

Support for the dominoUNID LDAP operational attribute was added to 6.0.5/6.5.4 and 7.0.

  1. Sometimes LDAP Name and Notes Name are different for an attribute/object class. Can I retrieve LDAP Name for given Notes Name programmatically using C++ API?

Sorry, we have no API that allows you to convert between the two names. This information is approximated in schema.nsf. I say approximated because some LDAP attributes do not have one-to-one mappings to Notes fields - “cn” and “mail” are two such common examples.

Subject: RE: LDAP and C++ API

If you know the Universal Note ID (UNID) of a Note, you can use the new dominoUNID operational attribute (32-char hex string) in LDAP queries.

Yes. I will have Universal Note ID of the note but wanted to retrieve its DN using Lotus C++ API instead of using LDAP API. Is it possible?

Thanks & Regards,

Prakash

Subject: RE: LDAP and C++ API

do you want to just get name of author (who created note)?

if so you could open doc by noteid or unid using LNDatabase::GetNote, followed by LNNote::GetAuthor

.

Markus Seitz

markus.seitz@icodex.com