directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <>
Subject [Schema] How do I write a new ObjectClass to ApacheDS
Date Wed, 28 Mar 2007 20:01:35 GMT
Hey Guys,

I'm in the middle of designing the DAS and
decided that I can probably make it way more efficient
if I create an ObjectClass per Java Class that I want to write to

So how do I programmatically create a ObjectClass and store it
in ApacheDS?

Do we have a description somewhere or is this a standard JNDI thing?

Here's a little further elaboration on what I want to do for those 

Keep in mind this is just an example.  The Class User could be any java 
class used in a model.

I have a Java Class >> User

The Class User has String members [firstName, lastName, password]

So I want to create a Structural ObjectClass in ApacheDS so that
I can add it as an attribute to the DN where a User instance will be 
stored (The java object instance).

If I were doing this in a relational database, I would create a table 
definition instead of a ObjectClass.

So I'm looking for something like this:

ObjectClass objectClass = LDAPSchemaFactory.createObjectClass();
ObjectClassAttribute objectClassAttribute = 

Then I would do something like:


The objectClass can now be assigned as an attribute to an ADS entry,
and if we were to look at all the ObjectClasses in ADS through JXPlorer 
or LDAP Studio,
we would see the User ObjectClass in the list.

Does that make sense?

- Ole

View raw message