Entry class only contains one of the objectClass values
Status: Beta
Brought to you by:
rizzo
Currently Entry.attributes is a hashmap of Strings that
contain all the Attribute names and values for the
entry. The problem is that the attribute "objectClass"
contains multiple values. Currently Entry.attributes
only holds the 'top' objectClass attribute and the rest
are dropped.
Kevin suggested creating a custom Attribute class that
is able to hold multiple values.
Task:
Create a custom AdressbookAttrib Class.
Modify the Entry class to use AdressbookAttrib instead
of String values in the attribute Map.
Modify the rest of the project to work with the changes
Logged In: YES
user_id=61900
Isn't the full list of objectClass strings in the types[] array?
Logged In: YES
user_id=61900
LDAPAttribute objectClasses =
ldEntry.getAttribute("objectClass");
a.add(new Entry(ldEntry.getDN(), cnString,
objectClasses.getStringValueArray(), attribs,
isDirectory(ldEntry)));
For Novell DAO it is.
Logged In: YES
user_id=61900
Can anyone comment on this yet? As I said, it seems the
Novell DAO does things just fine in terms of objectClasses.
I agree that there are other fields that might also have
multiple value that we might not be handling well. Perhaps
they could wait until the next version?
Logged In: YES
user_id=1395553
Entry.java contains only public void setAttribute(String
key, String value). It is possible for an attribute to
hold more than one values. We will need to add overload and
add public void setAttribute(String key, String[] value)
and example of the problem is attribute key=objectClass
could have values{top, person}
Logged In: YES
user_id=61900
Right. I got too hung up on the fact that existing contacts
will have all attributes set. This is probably a problem
for new contacts.
Are we setting "top" on our contacts, and should we be?
Raising priority on this.
Logged In: YES
user_id=61900
I think AddressbookAttrib would be better named
EntryAttribute. It is an attribute of that entry, not the
addressbook.