Menu

#8 Entry class only contains one of the objectClass values

PRE-1.0.0
open
nobody
DAO Backend (5)
8
2006-02-20
2006-01-12
thepner
No

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

Discussion

  • Don Seiler

    Don Seiler - 2006-01-12

    Logged In: YES
    user_id=61900

    Isn't the full list of objectClass strings in the types[] array?

     
  • Don Seiler

    Don Seiler - 2006-01-12

    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.

     
  • Don Seiler

    Don Seiler - 2006-01-20
    • labels: --> DAO Backend
     
  • Don Seiler

    Don Seiler - 2006-02-20

    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?

     
  • Kevin Nilson

    Kevin Nilson - 2006-02-20

    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}

     
  • Don Seiler

    Don Seiler - 2006-02-20

    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.

     
  • Don Seiler

    Don Seiler - 2006-02-20
    • priority: 5 --> 8
     
  • Don Seiler

    Don Seiler - 2006-05-24

    Logged In: YES
    user_id=61900

    I think AddressbookAttrib would be better named
    EntryAttribute. It is an attribute of that entry, not the
    addressbook.

     

Log in to post a comment.

MongoDB Logo MongoDB