BBjLDAPEntry::getAttributeValues

Description

In BBj 11.0 and higher, this method returns the value for the specified attribute.

Syntax

Return Value

Method

void

getAttributeValue(string name)

Parameters

Parameter

Description

name

Name of the attribute.

Return Value

Returns the string value for the attribute.

Remarks

None.

Example

use com.basis.bbj.proxies.ldap.BBjLDAPSearchResult
use com.basis.bbj.proxies.ldap.BBjLDAPConnection

declare BBjLDAPConnection ldapCon!
declare BBjLDAPSearchResult searchResults!
declare BBjVector entries!
declare BBjVector attrs!

rem 'Get a connection to a specific LDAP server
host$ = "localhost"
port = 10389
authDN$ = "uid=admin,ou=system"
pwd$ = "secret"
ldapCon! = BBjAPI().getLDAPConnection(host$, port, authDN$, pwd$)

rem 'return a list of all immediate children of the ou=system object
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)
    value$ = entry!.getAttributeValue("DESCRIPTION")
    print "     " + value$
next e

rem 'Unbind and close the connection
ldapCon!.close()

See Also

BBjAPI

BBjLDAPConnection

BBjLDAPSearchResult

BBj Object Diagram for an illustration of the relationship between BBjObjects