Announcement Announcement Module
Collapse
No announcement yet.
DirectoryContextAdapter.getModificationItems in E-directory Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DirectoryContextAdapter.getModificationItems in E-directory

    Hello,

    I'm a new user of Spring LDAP 1.1 (thanks btw!). And my LDAP server is E-directory. I'm using the example in the spring-ldap-reference docs as a template for my code.
    When I call create(Person) everything is fine. When i call update(Person) and set objectclass in mapToContext() I will trigger a change identification for objectclass in getModificationItems() later because E-directory adds it's own objectclasses: Top and ndsLoginProperties.
    When i call modifyAttributes() I get a schema violation because I'm trying to remove objectclasses that should not be removed.

    I'm currently marking my Person object as persisted in storage to avoid setting objectclass attributevalues on already persisted items but I'm wondering what you think of my problem and any ideas on how to solve it in a different more general maner.

    Best regards,
    Johan

  • #2
    I think that in this special case you'll need to do it the way you're currently doing it. In a way that makes sense - you'll rarely wat to modify the objectclass attribute once the entry has been persisted.

    An alternative might be to always set all the objectclass values, including the ones that are automagically added by your server. That would work, provided the server doesn't add the values even though they're already set, in which case you'll get in trouble when creating entries.

    Can't think of any other, more generic way, to do it at the moment.

    Comment

    Working...
    X