How to add an auxiliary class to an object in NDS
Novell Cool Solutions: Trench
Digg This -
Posted: 16 May 2001
Prior to NDS 8 the only way to add additional attributes to an NDS object was to extend the object class of that object. The down-side to this mechanism was that schema extensions added to the base class cannot be removed. NDS 8 has added the capability to use an auxiliary class to define additional attributes on an NDS object. So how does it work?
Using an auxiliary class is a three step process.
- First, the auxiliary class must be created. The API NWDSDefineClass() can be used to create the auxiliary class. Auxiliary classes do not require a 'Super Class' and often just include the optional attributes you wish to define on an NDS object.
- Second, the auxiliary class must be added 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. The API NWDSModifyObject() can be used to add the auxiliary class to the 'Object Class' of the attribute.
- Third, add values for the new attributes defined by the auxiliary class. The API NWDSModifyObject() can be used to add attribute values for attributes defined by the auxiliary class.
That is all there is to it! To remove the auxiliary class you must remove all values of attributes defined by the auxiliary class, then remove the auxiliary class value from the 'Object Class' attribute of the NDS object instance.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com