Overview of the Content Engine Object Model

Because the Content Engine Web Service (CEWS) interacts with Content Engine objects, it is important to understand the Content Engine object model.

Classes

Each class in the Content Engine represents a definition for a set of objects that have the same properties and methods. A class is identified by a symbolic name and one or more unique globally unique identifiers (GUIDs). In addition to its original GUID, a class can have one or more alias IDs assigned to it for purposes of identification across object stores.

Content Engine classes can be classified into two main types:
IndependentObject
Objects that are instantiated from subclasses of this class are independent objects, which are addressable and have a unique identity by which they can be referenced. In addition, objects that are instantiated from the IndependentPersistableObject subclass can be persisted independently in the object store database by calling their save method. Examples: Document, ChoiceList, Folder.
DependentObject
Objects that are instantiated from subclasses of this class are dependent objects, which are non-addressable. They do not possess a unique identifier by which they can be referenced and therefore can be identified only by value. These types of objects exist only within the scope of an independent object. In addition, objects that are instantiated from the DependentPersistableObject subclass can be persisted only when the independently persistable object to which they belong (with an object-valued property) is persisted. They do not have a save method of their own. Examples: DocumentState, Choice.

Content Engine classes exist in a hierarchical structure, in which a class inherits its properties and methods from a parent class and can have properties and methods of its own. Example: Document -> WorkflowDefinition. In addition, certain classes can be subclassed, enabling you to create your own custom class based on a given Content Engine class, to which you can add custom (non-system) properties.

Most Content Engine objects describe the class to which they belong by using the ClassDescription object-valued property. This property returns a ClassDescription metadata object, which has properties that define the class from which the object was instantiated. These properties describe the following types of information:

  • The identifiers for the class: DescriptiveText, DisplayName, Id, Ids, Name, SymbolicName.
  • The characteristics of the class: AllowsInstances, ClassDescription, HasIncludeSubclasses, HasProperSubclassProperties, IsHidden, IsPersistent, IsSecurable.
  • A list of class descriptions and property information for any subclasses of the class: ImmediateSubclassDescriptions, ProperSubclassPropertyDescriptions.
  • The class description and property count for the immediate superclass of the class, if it exists: SuperclassDescription, SuperclassPropertyCount.
  • Property information for the class: NamePropertyIndex, Properties.
  • Permission information: DefaultInstancePermissions, PermissionDescriptions.
  • A list of descriptions for the properties of an instantiated object of the class, including those properties that are inherited from its parent class: PropertyDescriptions. These PropertyDescription objects have properties that describe the metadata for each object property.

Properties

Properties are the principal means by which objects expose and allow manipulation of their object state. Similar to a class, a property is identified by a symbolic name and one or more GUIDs. A property's value must be one of eight permitted data types and can be of single or multiple cardinality. Multi-valued properties have special methods to retrieve their data.

A multi-valued property can have a cardinality of list or enumeration:
List cardinality
  • Can be accessed in random order.
  • Can be modifiable, allowing items to be inserted, replaced, or deleted.
  • Other than as a result of modification by the client application, the contents of a list remain constant while a reference to the list object is maintained.
Enumeration cardinality
  • Must be traversed sequentially.
  • Always read-only.
  • The contents of an enumeration can differ each time that it is read.

The concrete properties of an instantiated object of a class are described by a list of metadata objects that are inherited from the PropertyDescription class. The actual object type of the property description is determined by the data type of the property it describes (PropertyDescriptionBinary, PropertyDescriptionBoolean, and so on). Each property description object has properties that describe the following characteristics:

  • Identifiers for the property: DescriptiveText, DisplayName, Id, Ids, Name, SymbolicName.
  • Characteristics of the property: Cardinality, ChoiceList, ClassDescription, DataType, IsHidden, IsOrderable, IsReadOnly, IsSearchable, IsSelectable, IsSystemGenerated, IsSystemOwned, IsValueRequired, RequiresUniqueElements, Settability.

In addition, each property description object has properties that are specific to the data type of the property it describes.

Property Data Types

Each Content Engine property must be one of eight permitted data types, which are specified in the Content Engine Java™ API by TypeID constants.

Data type Description XML schema .NET client (C# and VB)
Binary Binary data type. Represents binary data by using an array of bytes (unsigned 8-bit integers). xsd:base64Binary System.Byte[]
Boolean Boolean data type. Represents Boolean data that has a value of true or false. xsd:boolean System.Boolean
Date DateTime data type. Represents an instance in time as a date and time of day in accordance with ISO 8601. xsd:dateTime System.DateTime
Double Double (Float64) data type. Represents an IEEE-standard 64-bit floating-point number, which has a value that ranges from -1.79769313486232e308 to +1.79769313486232e308. xsd:double System.Double
GUID GUID (ID) data type. Represents a Globally Unique Identifier (GUID) or DCE Universally Unique Identifier (UUID), which is a 128-bit unique identification string that is enclosed by brackets in the following format: {3F2504E0-4F89-11D3-9A0C-0305E82C3301}. GuidType System.String
Long Long (Integer32) data type. Represents a signed 32-bit integer, which has a value that ranges from -2,147, 483,648 to +2,147,483,647. xsd:int System.Int32
Object Object data type. Represents a Content Engine object. ObjectEntryType WebReference.ObjectEntryType
String String data type. Represents text that consists of a sequential collection of 16-bit Unicode characters. xsd:string System.String

Modifying Class and Property Metadata

Because ClassDescription and PropertyDescription objects must maintain a fixed metadata "snapshot" to avoid the potential for unstable metadata when the relationships and hierarchies of objects change, a parallel set of objects exist for allowing the modification of class and property metadata: the ClassDefinition and PropertyDefinition objects. Only classes and properties that can be subclassed or modified have a corresponding class or property definition that you can modify. After the metadata for a particular class or property has been changed and persisted in its ClassDefinition and PropertyDefinition objects and a stable metadata state has been obtained by the Content Engine server, its ClassDescription and PropertyDescription objects in the object store are updated with the new metadata state.

To create a new class by using the Content Engine Java API, call the createSubclass method of a particular ClassDefinition object and modify or add PropertyDefinition objects to its PropertyDefinitions collection. With CEWS, instead of using the createSubclass method, use the ExecuteChanges operation with CreateAction to create a new ClassDefinition object and specify its superclass as its creation scope (in the TargetSpecification element of ChangeRequestType).

To create a new property definition and add it to a new or existing class definition, you must first create a PropertyTemplate object corresponding to the data type of the property you want to create (PropertyTemplateBinary, PropertyTemplateBoolean, and so on). After you instantiate a property template object and populate its properties, you can use its createClassProperty method to create a property definition object.