IBM FileNet P8, Version 5.2.1            

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 of the system-provided 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.

A subclass always inherits all of the properties of its superclass. You can add custom properties to the default superclass, such as document class, but you cannot remove a custom property from a subclass if the property was inherited from its superclass. 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, you might create a class named Policyholders. Subclasses of Policyholders could include a class named Claims. Additionally, changes to the superclass are inherited by its subclasses and are applied to any new versions of documents based on those subclasses.

The Document class is the superclass of all other document classes you create. This superclass defines the attributes and behavior of a 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 (for example, the Document class, the Folder class, the Custom Object class). You additionally have the choice of removing properties added to a class; this is limited to user-added properties; 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.

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 "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.)

Controlling propagation of metadata

Whenever you make changes to existing class metadata or remove property definitions from a class, you can 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 Administration Console for Content Platform Engine
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, Administration Console for Content Platform Engine asks whether you want it deleted from all its subclasses.

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



Last updated: October 2015
cl_inheritance.htm

© Copyright IBM Corporation 2015.