Objects

Objects are at the core of Contendo Server. They are used for the stored data as well as the organization of said content. We have these kinds of objects:

  • Documents - used to store content and related metadata.
  • Items - an extendable base when simplicity is needed.
  • Folders - serve for hierarchical organization.
  • Relationships - facilitate non-hierarchical linking of objects.

Objects are always associated with a specific type, which defines their properties and behavior.

Properties

Each object has a set of properties that store metadata and information about the object. Properties are defined by the object's type and can include system-defined and custom attributes. For more information, refer to Properties.

Object Management

Objects in Contendo Server can be created, retrieved, updated, and deleted through dedicated operations:

Name Description
Create Object Defines how new objects are created, including setting initial properties and content.
Retrieve Objects Covers different ways to fetch objects, including retrieving single objects, children of a folder, and more.
Querying Objects Search for objects via specified query.
Update Object Details updating object properties and modifying content.
Delete Object Explains how objects can be removed from the repository.

Operations on objects require a clear way to identify the target object. This can be done using via objectId or via path. See Target Object for details on how to specify the correct object in requests.


File and Metadata Storage

While all objects can have additional properties, Documents and Items are specifically designed for storing data.

  • Use Documents when you need to store files with metadata and versioning.
  • Use Items for structured data that does not require file storage or versioning.

Document - Content and Metadata

Documents are the core object type in Contendo Server and are likely the most frequently used. They store file content and related metadata in the form of properties. A Document does not necessarily need to contain a file; it can exist with only properties.

Documents are also the only object type that supports versioning, meaning both content and properties can have multiple versions over time.

All Documents either belong to the Document Base Type or extend it to define additional properties.

Example: Storing a Photo

A custom Photo object, which extends the base Document type, could be used to store images. In addition to the image file, it could have properties like:

  • photographer - the name of the person who took the photo.
  • location - where the photo was taken.
  • timestamp - when the photo was captured.

Item - When Simplicity is Needed

An Item is a lightweight object that consists only of properties. It does not support file content or versioning.

Items are ideal when you only need to store structured data without file storage or versioning. While you could use a Document for the same purpose, Items provide a more lightweight solution.

All Items typically extend the Item Base Type. While the base type can be used directly, most use cases require extending it to define specific data fields.

Example: Tracking System Events

A SystemEvent object, based on the Item type, could store:

  • eventType - the type of event (e.g., login, file upload, permission change).
  • timestamp - when the event occurred.
  • user - which user triggered the event.

Organization

Contendo Server naturally organizes objects into a Folder hierarchy. Additionally, Relationships can be used to define non-hierarchical links between objects.

Folder - Hierarchical Organization

Folders are used to structure content hierarchically. A folder serves as a container for related objects, establishing a structure where the folder is the parent, and each contained object is a child.

Folders can contain Documents, Items, and even other Folders, allowing a tree-like structure where folders can be nested inside other folders. At the root of this hierarchy is the special Root folder, which serves as the top-level container for all content in a repository.

All folders either belong to the Folder Base Type or extend it to provide additional metadata and categorization

Example: Organizing Project Files

A Projects folder might contain subfolders for each individual project:

  • Projects/ProjectA/Designs - stores design-related files.
  • Projects/ProjectA/Reports - contains reports and documents.
  • Projects/ProjectA/Resources - holds reference materials.

Relationship - Linking Objects

A Relationship explicitly links two objects, enabling flexible non-hierarchical associations beyond the standard folder structure. Objects of any type—Documents, Folders, Items, or even other Relationships—can be linked together.

A single object can participate in multiple Relationships and can even be linked to itself.

All Relationships either belong to the Relationship Base Type or extend it to define additional metadata.

See Relationships for more details.

Example: Document Approval Workflow

A Review relationship could link:

  • A contract (Document) with
  • A manager user profile (Item) who is responsible for reviewing it.

The Relationship object could also store metadata such as:

  • status - whether the review is pending, approved, or rejected.
  • reviewDate - when the review occurred.