Novell is now a part of Micro Focus

I have been reading about auxiliary classes in...

Articles and Tips: qna

01 Apr 2002


Q.

I have been reading about auxiliary classes in NDS. How do I actually add an auxiliary class to an object in NDS?

A.

Prior to NDS 8, the only way you could add additional attributes to an NDS object was to extend the object class of that object. The downside to this approach was that schema extensions added to the base class could not be removed.

NDS 8 has added the capability of using an auxiliary class in order to define additional attributes on an NDS object. So how does it work? Using an auxiliary class is a three step process:

  1. Create the auxiliary class. You can use the API NWDSDefineClass() to create the auxiliary class. Auxiliary classes do not require a Super Class and often just include the optional attributes you wish to define for an NDS object.

  2. You must add the auxiliary class to an existing instance of an NDS object. This is accomplished by adding the auxiliary class to the 'Object Class' attribute of the NDS object instance. Prior to NDS 8, the Object Class was read-only. It has been changed in NDS 8 to accommodate auxiliary classes. You can use the NWDSModifyObject() API to add the auxiliary class to the Object Class of the attribute.

  3. Add values for the new attributes as defined by the auxiliary class. You can use the API NWDSModifyObject() to add attribute values for attributes that are defined by the auxiliary class.

That's all there is to it! To remove the auxiliary class, you must remove all values of the attributes that are defined by the auxiliary class, then you can remove the auxiliary class value from the Object Class attribute of the NDS object instance.

(Submitted by Karl Bunnell, Novell)

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates