Inheritance between classes

Class inheritance is defined as a relationship between classes, where one class shares (inherits) the structure and behavior defined in one or more other classes. When you create an object store, the system automatically creates class definitions for all classes listed in Enterprise Manager under Document Classes and Other Classes. To create custom classes, you create subclasses of these original class definitions. You can also add custom properties to these classes that reflect your business needs.

The Document class is the superclass of all other document classes you create. This superclass defines the attributes and behavior of a Content Engine document, and it contains important system properties like Content Element and Versionability. All the document classes that you create inherit system properties from this superclass and a subclass always inherits all of the properties of its superclass.

You can add custom properties to a limited set of system classes exposed via Enterprise Manager (for example, the Document class, the Folder class, the Custom Object class). User additionally has the choice of removing properties added to a class; this is limited to user added properties only, system properties added directly to the class or inherited cannot be removed. When removing properties through a class hierarchy, the user has the option to remove that property from all subclasses, or make it a non-inherited property on the immediate subclasses of the parent.

These inheritance rules can be important when you design your object stores and determine your superclass and subclass hierarchy. For example, at an insurance company, it might make sense to create a class named Policy. Subclasses of Policy could include classes named Life Insurance Policy, Auto Insurance Policy, and so on.

Property inheritance

When you add a custom property to a superclass, the property is automatically added to all subclasses on all versions. However, only the versions created after the property was added are automatically assigned the property value.

Use Enterprise Manager to view and modify the properties of superclasses and their subclasses on the Property Definitions tab of the property sheet for the class.

Controlling propagation of metadata (Enterprise Manager only)

Whenever you make changes to existing class metadata, or remove property definitions from a class, Enterprise Manager automatically opens the Propagate Metadata Changes window, allowing you to decide whether the changes should be propagated to all subclasses. (Users of the .NET or Java™ API do not have this automatically provided control.)

Metadata Automatically propagated Optionally propagated by using Enterprise Manager
Settability
X
Is Value Required
X
Alias Ids
X
Minimum/Maximum Value
X
Default Value
X
Choice List
X
Is Hidden
X
Modification Access Required (MAR)
X
Target Access Required (TAR)
X
Deletion action *
X
Is Name Property **
No No

* This is not really metadata, but rather the Delete method. If you delete a property from a class, Enterprise Manager asks whether you want it deleted from all its subclasses.

** Is Name Property is not propagated to subclasses since classes (and all other objects as well) cannot have more than one designated name property.

Restricting propagated values

Whenever you create a subclass, the property definitions with their metadata settings are always carried over to the subclass. During creation of the subclass, or afterwards, you can further restrict any constraints that are defined in these definitions.

When you create a subclass, or at any time afterwards, you can further restrict any constraints defined in the parent class. For example, in the subclass you could make the range of minimum and maximum values permitted on an integer property in the parent class more narrow. However, you cannot expand these constraints. For example, you could reduce, but not increase, minimum and maximum values permitted on an integer property.

Likewise, if on the superclass a property has "Is Value Required" set to TRUE, you cannot set this inherited property on the subclass to FALSE. However, the opposite is allowable: if the property has "Is Value Required" is set to FALSE on the superclass, you can set it to TRUE on the subclass, since this would be considered a "narrowing" of this value. (Requiring a value is considered more restrictive than not requiring a value.)