• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

LDAP: Recommended way to add new objectclass to existing entries?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone help me with the preferred way to add a new objectclass (with attrributes) to existing entries within a directory (via the javax.naming API)?

I have an application that uses a directory of users. Each user has objectclasses "top", "person", and "inetOrgPerson" with usual attributes.

The application needs to change to add a custom objectclass, say "ourAppClass" (and its attributes), to each existing entry within the directory. I have already successfully defined the schema for the objectclass within the directory.

I cannot find examples showing how to add an objectclass to existing entries. Creating brand new entries with custom objectclassess is straightforward.

When using DirContext.modifyAttributes must I define all the objectclasses again, or is there a way to send only the new objectclass and its attributes only?



Does someone have a good example to follow?
 
Keith Wall
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I have answered my own question. I think I need to use a ModificationItem to add an attribute to the objectclass.

 
Bras cause cancer. And tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic