1.6 Super Classes

Super classes create the hierarchy of the schema and determine the characteristics that an object class can inherit from another object class. Inheritance simplifies the rules of the schema because it allows some characteristics to be defined once, while multiple object classes can use and enforce these common characteristics.

The following topics describe the other aspects of super classes:

See Also:

1.6.1 Root Schema Object

The Top object class is the root of the schema. Since all other object classes inherit characteristics from the Top class, the Top class specifies information that pertains to all other classes. For example, the Top class defines the following optional attributes:

  • ACL—contains access control information

  • Back Links—contains reference information, used by NetWare 4.x to connect objects with their external references

  • Last Referenced Time—contains a time stamp for the last time the object was referenced

  • Obituary—contains information about objects that are being deleted, renamed, or moved

  • Used By—contains Distributed Reference Link information, used by NetWare 5.x to connect objects with their external references

NDS™ uses these attributes to maintain information. Since these attributes are defined for Top, all object classes inherit these attributes. Entries in the NDS tree have them available whenever NDS needs to assign a value to one.

1.6.2 Super Class Rules

Each object class must define an object class as its super class. Super classes cannot be recursive; therefore, an object class cannot list itself as a super class. The complete definition of each object class is derived from the characteristics of the object class itself plus the characteristics of all classes in its super class lineage. Hierarchies of classes develop through class inheritance in this manner. The classes at the top of the hierarchy provide general characteristics, while those at the bottom become more and more specialized. The complete set of rules for an object class is called the expanded class definition.

The object class from which an entry is created is called the entry’s base class. The expanded class definition for an object class includes the base class and the sum of the information specified by all its super classes. For the purpose of searching the NDS tree, an entry is considered a member of all of its super classes. For example, the base class for creating a user is the User class. The User class inherits from the following super classes: Organizational Person, Person, and Top.

Although the schema is stored with the rest of the NDS database, schema data is logically separated from the NDS tree and must be accessed through different functions. Also, the schema’s class hierarchy does not necessarily form a simple tree graph because a class can list more than one class as a super class. Listing multiple classes as a super class is called multiple inheritance. (None of the objects in the NDS base schema uses multiple inheritance.)

1.6.3 Class Hierarchy

The following figure is a single graphical view of the NDS base schema, showing the object classes in the structure of the class hierarchy. In this view of the object classes, the arrows show the direction of flow for inheritance from super classes. An object class inherits the rules and attributes defined by all its super classes, but does not inherit from its subordinates.

Effective object classes are represented by shapes with solid lines and noneffective object classes are represented by shapes with dotted lines.

Figure 1-4 A Graphical View of the NDS Base Schema

The Top class is an effective class, but it is a special super class because it cannot be used to define an instance of an object.

The figure illustrates the purpose of noneffective classes. For example, the Server class (noneffective) defines those characteristics shared by all servers; the effective classes (AFP server, NCP Server, Print Server, etc.) define only those characteristics that are particular to that type of server.

Effective classes can inherit from effective classes. In NDS 8, the Person and Organizational Person classes are effective. The User class inherits from both of them.

1.6.4 Class Inheritance Rules

While a class automatically inherits some characteristics in the NDS schema, a class can select to inherit or block the inheritance of other characteristics. The schema enforces the following inheritance rules:

  • A class must declare another class as its super class. The class then automatically inherits any super classes of its defined super class. (Top is the only class that has no super class.)

  • A class can, but is not required to, define mandatory or optional attributes. The class, however, always inherits all the attributes, both mandatory and optional, of its super classes.

  • A class can, but is not required to, define a default ACL template. The class always inherits all the default ACL templates of its super classes. Classes that extend the schema cannot define new default ACL templates.

  • A class can inherit containment classes and naming attributes, but if the class defines them, any definitions made in super classes are not applied to the class.

These class inheritance rules are illustrated in the following figure by the relationship between the classes Top, Device, and Computer. Computer has Device as a super class and inherits the features defined by Device. Device and Computer inherit from Top, because Top is a super class of Device.

Figure 1-5 Class Inheritance Rules

The Computer class inherits all of the attributes from the Device class but adds several attributes to accommodate the needs of computers. A different type of device, such as a modem, would add different attributes from a computer.

In the example, the Computer class does not define containment or naming attributes, so it inherits from the Device class.

  • Containment classes: Organization and Organizational Unit

  • Naming attribute: CN (Common Name)

It also inherits the default ACL template that the Top class defines. This ACL enables the creator of an object to be the supervisor of the object.

According to the object class definition, a Computer object could appear only as a subordinate of objects belonging to either the Organization or the Organizational Unit class. The object would be recognized by its common name and might be assigned various optional attributes. In this case, Computer refines the definition of the Device to serve a particular class of devices.

1.6.5 Graphical View Explanation

The Graphical View of Object Class Inheritance represents the NDS base schema. It shows the object classes in the structure of the class hierarchy, rather than in alphabetical order as presented in Novell Object Class Extensions. This graphical view does not contain the object classes and attributes added during a default NetWare® 5 installation or and NDS 8 installation.

Each object class is represented by a box that contains the name of the object class, its immediate super class, and a listing of the containment rules and attributes that are defined for that object class. This view does not show the default ACL templates that are listed in Novell Object Class Extensions, nor does it provide comments about the attributes.

In this graphical view, the object classes that are placed above an object class are its super classes. The object classes that are below an object class are its subordinates. An object class inherits all attributes defined by all of its super classes and any naming or containment rules that the class does not define. The arrows show the direction of flow for inheritance.

Objects inherit from their super classes but they do not inherit from their subordinates. For example, Device inherits from Top, but it does not inherit from Computer. However, Computer inherits from Top and from Device.

Each object class has the following information listed:

Super Classes. Objects of the class inherit information types and attributes from classes listed here. All object classes must have one or more super classes, except Top, which is a super class to all classes. (In this view, Top is shown multiple times, since it is a super class to all classes.) These listings just list the object’s immediate super class.

Containment. Objects of the class can be created as subordinates in the NDS tree to objects of the classes listed here. An object of the class cannot be subordinate to any object that is of a class not listed here. If no classes are listed, the object inherits its containment classes from its super classes.

Named By. The partial name or Relative Distinguished Name (RDN) of objects of the class consists of at least one of the attributes listed here. These naming attributes can be either mandatory or optional attributes, but at least one must be given a value when creating an object of the class. If the only naming attribute is optional, it is in effect mandatory. If no naming attributes are listed, the class inherits its naming attributes from its super classes.

Mandatory and Optional Attributes. All attributes are either mandatory or optional. If an attribute is mandatory, a value must be assigned to that attribute. If an attribute is optional, an assigned value is not required, unless it is the only naming attribute.