directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emilio Recio <>
Subject Retrieving over multi-valued attributes
Date Tue, 12 Feb 2013 19:47:25 GMT
I am kind of stuck on how to get ALL of the attribute's values. 
Currently, I am Binding as the user (using LdapNetworkConnection). I am 
getting an EntryCursor via search method of that. I am retrieving an 
Entry from the cursor.get() method. I get a collection<attribute> list 
of attributes. I can cycle through each of the entry's attributes but 
whatever I do, I cannot find in the API where I can get more than just 
the first value.

I have tried:

Collection<Attribute> attrs = entry.getAttributes();
for (Attribute attr : attrs) {
	_log.debug("ATTR: " + attr.getId());
	_log.debug("VALX: " + attr.size());

	Value<?> vals = attr.get();
	for (int i = 0;i < vals.length(); i++ ) {

For example, I am taking the objectClass attribute.

E. Recio

Live within your income, even if you have to borrow to do so.
		-- Josh Billings

View raw message