aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes LDAP: Recommended way to add new objectclass to existing entries? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "LDAP: Recommended way to add new objectclass to existing entries? " Watch "LDAP: Recommended way to add new objectclass to existing entries? " New topic
Author

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

Keith Wall
Greenhorn

Joined: Sep 16, 2008
Posts: 2
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

Joined: Sep 16, 2008
Posts: 2
I think I have answered my own question. I think I need to use a ModificationItem to add an attribute to the objectclass.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: LDAP: Recommended way to add new objectclass to existing entries?
 
Similar Threads
Unable to create directory in OID
ldap
First node in LDAP and JNDI problem
How to Modify multivalued attribute in LDAP using java API?
ApacheDS 1.0.2 LDAP java.net.ConnectException: Connection timed out: connect