
BBjLDAPEntry
Description
Contains the information for a single entry in an LDAP directory. These objects are retrieved using a search query (see BBjLDAPConnection::search).
Creation
Obtain a list of BBjLDAPEntry objects through the following BBjLDAPSearchResult method:
Return Value |
Method |
Methods of BBjLDAPEntry
Return Value |
Method |
void |
addAttribute(string name, string values) |
void |
addAttributes(string name, BBjVector values) |
BBjVector |
|
string |
getAttributeValue(string name) |
BBjVector |
getAttributeValues(string name) |
string |
getDN() |
Remarks
None.
Constants
None.
Example
REM
' BBjLDAPEntry sample 1 use com.basis.bbj.proxies.ldap.BBjLDAPConnection use com.basis.bbj.proxies.ldap.BBjLDAPEntry declare BBjLDAPSearchResult searchResults! declare BBjVector entries! declare BBjVector attrs! declare BBjLDAPEntry entry! host$ = "localhost" port = 10389 authDN$ = "uid=admin,ou=system" pwd$ = "secret" ldapCon! = BBjAPI().getLDAPConnection(host$, port,
authDN$, pwd$) searchResults! = ldapCon!.search("ou=system",BBjLDAPSearchResult.SCOPE_ONE, 100, 100, "(objectClass=*)") entries! = searchResults!.getSearchEntries() for e = 0 to entries!.size() - 1 entry! = entries!.getItem(e) print "ENTRY - dn: " + entry!.getDN() attrs! = entry!.getAttributeNames() for i = 0 to attrs!.size() - 1 attr$ = attrs!.getItem(i) print " " + attr$ next i next e ldapCon!.close() |
See Also
Using LDAP and Active Directory User Authentication
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.