webCOMAND

COMAND Repository

Overview

The Repository contains core content types that form the foundation for all other content types, so they are typically found in every repository without modification. They are the building blocks of COMAND's object-oriented repository schema.  Due to their fundamental nature, restrictions apply.

Content

The following content types describe objects, their schema (fields) and functionality (methods).

Click diagram elements to jump to additional details.

Object

The root content type inherited by all other content types. It provides a set of IDs used to efficiently identify objects within the scope of a content type, repository or across repositories. It is the only content type that does not extend another.

Implements
  • Nothing
Extends
Nothing
Fields
Title (Identifier) Type Properties Description
ID (Data Type) Number   ID unique for a record of a specific content type.
OID (Data Type) Number   Object ID unique for to a record across all content types.
UUID (Data Type) UUID   Universally Unique ID, which is unique for to a record across all content types and servers.
Type (Content Type) Content Type Ref The content type of the object.

Content

Provides version control features utilized by most other content types.

Most content types should extend Content instead of Object, to enable version control features. Exceptions include all core content types in version 3, and only content types used to implement version control features, such as Session and Content Log, in version 4.
Implements
  • Nothing
Extends
Fields
  • Nothing

Type

Provides basic information used to identify and describe a Layout Type, Data Type and Content Type.

This content type is designed to be extended by the various field types, and not meant to be used directly. While a Type object can be created, it serves no purpose and will be ignored in the context of a a Field Type.

Implements
  • Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Identifier (Data Type) Text Line Unique Name of the type, as it will be referenced in scripts and queries.
Labels & Help (Layout Type) Tab   Groups data type meta-data fields into the second tab.
Title (Data Type) Text Line   Friendly name of the type, if different than Identifier.
Help (Data Type) Rich Text Box   Summary of type's purpose.
Icon (Data Type) Image   Image that represents the type. Typically a 16x16 PNG, but can be any size and standard web image format (GIF, JPEG, PNG or SVG).
Methods
Summary() [cScript]

Displays the object's type Summary in parenthesis followed by the Title if it exists, otherwise the Identifier.

Layout Type

Define field types used to group object fields in the user interface and other presetations.

Layout Type UI attributes define how layout types are displayed in the user interface. Layout Type UI objects are associated with (referenced from) a UI Theme, in order to determine which Layout Type UI to use.

Implements
  • Nothing
Extends
Fields
  • None
Methods
None

Data Type

Define field types that will store object data/values (ie. numbers, text, and not relationships) in the repository. The type of data is provided as a COMAND type, which are mapped to corresponding storage-engine- and cScript processor- specific types.

Data Type UI attributes will define methods for each user interface widget used to view and edit fields of a data type. Data Type UI objects will likely be associated with (referenced from) a UI Theme, in order to determine which Data Type UI to use, when multiple are defined. Data Type UI and UI Theme will be introduced into the webCOMAND Content Types package in version 4.

Implements
  • Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Specification (Layout Type) Tab   Groups fields that define the data type into the primary tab.
Identifier (Data Type) Text Line Unique Name of the type, as it will be referenced in scripts and queries.
Primative (Data Type) Text Line   COMAND storage type definition, such as bool, int8, int16, int32, int64, float8, float32, float64, float8(2), blob, blob(25), utf8, utf8(25). This will be translated by the storage engine to determine the storage engines equivelent type, and by the cScript processor's language for object fields.
Labels & Help (Layout Type) Tab   Groups data type meta-data fields into the second tab.
Title (Data Type) Text Line   Friendly name of the type, if different than Identifier.
Help (Data Type) Rich Text Box   Summary of type's purpose.
Icon (Data Type) Image   Image that represents the type. Typically a 16x16 PNG, but can be any size and standard web image format (GIF, JPEG, PNG or SVG).
Methods
None

Content Type

Defines content types, including their fields and methods. The fields are implemented as children, so they can be traversed with cPath like folder contents.

Implements
Extends
Fields
Title (Identifier) Type Properties Description
Model (Layout Type) Tab   Groups class-like fields into the primary tab.
Identifier (Data Type) Text Line Unique Name of the content type, as it will be referenced in scrips and queries.
Implements (Content Type) Content Type Ref, List "Interfaces" implemented by this content type. This content type must implement all methods of each content type referenced to validate.
Extends (Content Type) Text Line Ref Name of the content type, as it will be referenced in scrips and queries.
Fields (Content Type) Content Type Field List Name of the content type, as it will be referenced in scrips and queries.
Methods (Content Type) Method List Scripts that implement content type functionality.
Labels & Help (Layout Type) Tab   Groups content type meta-data fields into the second tab.
Title (Data Type) Text Line   Friendly name of the content type, if different than Identifier.
Help (Data Type) Rich Text Box   Summary of field's purpose.
Color (Data Type) Color   Color to identify content type group. Orange (#ff8800) represents core content types. Purple represents publication content types.
Icon (Data Type) Image   Image that represents the content type. Typically 16x16 PNG, but can be any size and standard web image format (GIF, JPEG, PNG or SVG).
Storage Options (Layout Type) Tab   Groups content type storage-related fields into the third tab.
Replication (Data Type) Number   Type of replication to prepare for publication process. 0 = Disk, 1 = Memory, 2 = None
Backup (Data Type) Number   Whether or not to include this content type's objects in repository backups. 0 = Disabled, 1 = Enabled
Methods
New() [cScript]

Sets the Extends field to Object content type as the default value.

Summary() [cScript]

Displays the content type Title, if defined. Otherwise, displays the Identifier.

Field

Define fields of a content type.

Implements
Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Identifier (Data Type) Text Line Unique Name to uniquely identify and reference this field in queries, COMAND Script and the API.
Field Type (FieldType) (Data Type) Field Type   Specifies the field's layout type, data type or content type. Layout Types affect the form layout. Data Types define the type of storage and valid values. Content Types define a relationship to embed or reference objects.
Location (Data Type) Field Location   Specifies if the selected field type should be embedded, or a reference with a specific scope of valid objects (by folder, publication list or back-reference field).
List Type (ListType) (Data Type) Number Choices Specifies if the field represents a single value or object, or multiple, as well as the initial state of the field input (expanded or collapsed).
Uniqueness (Data Type) Checkbox   Specifies whether or not the value must be unique within its container, be it a folder's contents or other object field.
Labels & Help (Layout Type) Tab   Information about the field for users and interfaces.
Title (Data Type) Text Line   Human-friendly label, which can have spaces and other symbols. If not specified, the Identifier will be used.
Description (Data Type) Text Box (Short)   Breif description of the field, potentailly displayed in user interfaces. For example, in a tooltip or to the right of a checkbox input.
Help (Data Type) Rich Text Box   Detailed explanation of field and how it can be used.
Display (Data Type) Checkbox   Display field in default content summary (drop-downs) and as column in list view.
Form Options (Layout Type) Tab    
No Selection (Data Type) Text Line   Text to display when no selection has been made.
Choices (Content Type) Choice List Ordered list of labels and values for input selection.
Validations (Content Type) Validation List List of validations to enforce valid values are input before the object is updated.
RTE Settings (Content Type) Rich Text Editor Settings List Configuration options for the field, if the Type produces a Rich Text Editor for input.
Authorizations (Layout Type) Tab    
Read View (ReadView) (Data Type) Number Choices View or Hide this field in list and form view if the user has Read authorization, but does not have Edit or Admin authorization.
Write View (WriteView) (Data Type) Number Choices Edit, View or Hide this field in list and form view if the user has Edit authorization, but does not have Admin authorization.
Admin View (AdminView) (Data Type) Number Choices Edit, View or Hide this field in list and form view if the user has Admin authorization.
Position (Data Type) Order Index    
Methods
None

Field Choice

A field choice defines the title and value for a input selection choice.

Implements
Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Title (Data Type) Text Line   Name to display for selection.
Value (Data Type) Text Line   Value to store for selection.
Position (Data Type) Order Index   Enable manual ordering of choices.
Methods
None

Field Validation

Field validations define rules used to determine if a field value is valid or not.

Implements
Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Title (Data Type) Text Line   Name to display for the validation.
RegEx (Data Type) Text Line  

A JavaScript regular-expression used to validate text typed into the field. If multiple field Validations are defined, all regular expressions must match for a valid field.

Some examples include:

  • Identifier - ^[A-Za-z0-9][A-Za-z0-9_]{2,63}$
  • Date - ^\d\d?/\d\d?/\d\d(\d\d)?$
  • Time - ^\d\d?:\d\d:\d\d$
  • Email - ^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$
  • Phone - ^\d\d\d-\d\d\d-\d\d\d\d$
  • Summary - ^[\w\d\s`~!@#$%^&*\(\)-_=+{}\[\]\|;:'",<.>\/?]{20,50}$
  • Character Limit/Range - ^.{5,50}$
  • Character Set - ^[A-Z0-9_]*$
Insensitive (Data Type) Checkbox   Match the regular expression without regard for letter case.
Exclude (Data Type) Checkbox   Consider valid when the regular expression does not match the value.
Notes (Data Type) Rich Text Editor   Notes about the validation rule, to explain the regular expression.
Methods
None

RTE Settings

Rich Text Editor Settings are used to customize the editor for rich text box fields in one or more folders. The contents in the editor can be customized with custom CSS, the options in the text format drop-down can be customized, and the toolbar buttons can be completely customized.

Implements
Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Title (Data Type) Text Line   Name to display for selection.
Folders (Content Type) Folder List The custom settings will be applied to these folders and their children. Child folders can be overridden by assigning additional custom settings to those folders.
Stylesheet (Data Type) cScript Text Box  

Cascading Style Sheet (CSS) to apply to HTML in rich text field. COMAND Script may be used to produce and insert CSS.

For example:

h1 { font-size: 16px; }
.Right { text-align: right; }
Formats (Data Type) cScript Text Box  

To add items to the Rich Text Editor Format drop-down, enter one item per line. Each line must include the following TAB seperated values:

  • Title - Name of the format, as it will appear in the Format drop-down. HTML and embedded styles may be used (ie. <div style="font-size: 16px;">Subtitle</div>) to customize the appearance of a title in the Format drop-down.
  • Tag or Classes - An HTML tag (ie. <h1>) or one or more CSS class names (ie. PullQuote Right) to be applied/removed when the format is selected from the drop-down.
  • Tag Names - When classes are specified, a list of one or more space-separated HTML tag names must be listed to restrict the tags those classes can be applied to. If none of the listed tags are in the selected text, the first tag speicified will be added to the selection along with the desired classes.

For example:

Title						<h1>
Right Pull Quote				Quote Right	p div
<div style="font-size: 16px;">Subtitle</div>	<h2>
<div style="background: #ff0;">Highlight</div>	Highlight	p div

If "Disable Predefined Formats" is not checked below, the following predefined formats will be listed before any formats specified above.

Default (clear)			<default>
Paragraph			<p>
<strong>Heading 1</strong>	<h1>
<strong>Heading 2</strong>	<h2>
<strong>Heading 3</strong>	<h3>
<strong>Heading 4</strong>	<h4>
<strong>Heading 5</strong>	<h5>
<strong>Heading 6</strong>	<h6>
Address				<addr>
Code				<code>
Formatted			<pre>
<strike>Strikethrough</strike>	<strike>
Super<sup>script</sup>		<sup>
Sub<sub>script</sub>		<sub>
No Paragraph (Plain-Text)	<none>
Hide Defaults (Data Type) Checkbox   Do not display predefined Formats in the Format drop-down.
Toolbars (Data Type) cScript Text Box  

Comma seperated list of toolbar buttons and features to include. A pipe character (|) denotes a divider, and a newline (ENTER) denotes a new toolbar row. For example:

Format, FontFamily, FontSize, |, ForeColor, BackColor, |, RemoveFormat, CleanWord, Clean, CleanCustom
Bold, Italics, Underline, Strikethrough, Superscript, Subscript, |, AlignLeft, AlignCenter, AlignRight, AlignJustify, |, Bullet, IndentDecrease, IndentIncrease, |, Anchor, Link, Unlink
Cut, Copy, Paste, Delete, |, Insert, |, InsertHorizontalRule, InsertSymbol, InsertDiv, InsertAbsDiv, InsertTable, |, ToggleGuidelines, ViewObjectPath, ViewSource, TableToolbar
Methods
None

Method

A method is equivelent to a method of a class in object-oriented programming. That is, it defines a function to be called in the context of a content record of a specific content type. The function has a name, zero or more parameters (aka modifiers) and a script with the functions instructions.

A method can be exposed in user interfaces with a Content Action.

Implements
Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Definition (Layout Type) Tab   Fields that define the method's name and functionality.
Identifier (Data Type) Text Line Unique Name to uniquely identify and reference this method from COMAND Script and the API.
Parameters (Content Type) Content Type Field List List of method parameters defined as fields. Field validation and defaults can be used to make parameters required, optional, and if optional set the default value. Layout Type fields may be used to affect user interfaces, but will be ignored when the method is called as a method from COMAND Script or the API's ORM feature.
Script (Data Type) COMAND Script Text Box   Script to define the method's behavior.
Modifiers (Content Type) Method Modifier Ref, List Static, Private and other future modifiers.
  • Static determines if the method is performed outside of the context of a content record (checked), or in the context of a content record (not checked). If Expose UI is checked, a static method will not require the selection of a content record to trigger the method in user interfaces. A non-static method will.
  • Private determines method encapsulation. In other words, can the method only be called from other methods in the same content type (checked). Private and UI can not both be specified.
Labels & Help (Layout Type) Tab   Information about the method for users and interfaces.
Description (Data Type) Text Box (Short)   Breif description of method, potentailly displayed in user interfaces. For example, in a tooltip.
Help (Data Type) Rich Text Box   Detailed explanation of method and how it can be used.
Methods
None

Method Modifier

Properties applied to methods to determine how they are accessed and function.

Implements
Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Title (Data Type) Text Line   Name to identify this method modifier.
Methods
None

Content Log

The content log supports audit trail and locking features of version control. It maintains author, time and optional notes associated with each content modification.

The Content Type, Content ID and Version ID fields could be simplified to Object and Version fields, which are references to the active object and the version. This will be possible when versions are stored as proper objects with an accessible "version" flag. Queries would ignore objects with the version flag by default.
Implements
Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Content Type (ContentType) (Content Type) Content Type Ref The content type of the locked or modified content record.
Content ID (ContentID) (Data Type) Number   ID of the active version of the locked or modified content record.
Version ID (VersionID) (Data Type) Number   ID of the content record that represents the revision of the active content reocrd as it existed at the time of modification. If no revision data is available, the value will be 0. If the Version ID is equal to the Content ID, it represents the active version of the content record.
User (Content Type) User Ref The user responsible for the lock or modification.
Start Time (StartTime) (Data Type) Timestamp   Time the lock was made or modification started.
End Time (EndTime) (Data Type) Timestamp   Time the lock was released or modification ended. If no timestamp is specified, User has a lock since Start Time, which has not been released.
Notes (Data Type) Rich Text Box   Optional notes about the revision.
Methods
None

User

The following content types describe COMAND users, roles and authorizations. COMAND users can connect to a repository and access authorized repository content and features based on one or more assigned user roles. Each user role can specify fine-grain authorizations.

Click diagram elements to jump to additional details.

SVG Not Supported

User

Content type for COMAND system user information. A user can be authorized to connect and access a system based on one or more user roles. If multiple user roles are associated with a user, they will be merged to provide the highest level of access from each role to determine the utimate authorizations.

Implements
  • Nothing
Extends
Fields
Title (Identifier) Type Properties Description
Account (Layout Type) Tab   Information about the user account.
Username (Data Type) Text Line   Case-insensitive name to uniquely identify a user. It must start with a letter and may contain letters, numbers, periods, underscores and the '@' symbol.
Password (Data Type) Password   Field used to input a new password. The password is not actually stored in this field.
Encryption Type (EncryptionType) (Data Type) Text Line Choices

Type of encryption that will be used to secure the password in the database upon next login or password update. Changing this setting will not update the database immediately if the password is already encrypted and not re-enetered above (therefore it is unknown until next login or password update).

  • No Encryption (plaintext) - Password will not be encrypted, and is therefore visible as plaintext in the repository (not recommended).
  • Old Encryption (v2) - Password is encrypted using MD5 with an initial two letter salt. This was the type of encryption used by webCOMAND version 2 (not recommended).
  • Basic Encryption (crypt) - Password is encrypted as a one-way hash using an operating system dependent encryption algorithm and random two character salt (recommended/default). Passwords can be validated with crypt (Perl or PHP).
Email (Data Type) Text Line   The user's email address, which will be visible to other system users and is used when the system should email the user.
First Name (FirstName) (Data Type) Text Line   The user's first name, which is visible to other system users and included in email TO field.
Last Name (LastName) (Data Type) Text Line   The user's last name, which is visible to other system users and included in email TO field.
User Roles (UserRoles) (Content Type) User Role Ref, List Select user roles to authorize this user to access specific features and content. Authorizations from multiple user roles may be combined by holding down the CTRL key on the keyboard while left-clicking more than one user role.
Remember Login (RememberLogin) (Data Type) Checkbox   If the user does not logout, they will remain logged in across web browser sessions, even if the browser is closed or computer rebooted. A web browser cookie is used to maintain the session across browser sessions. This option is not recommended, but available to user's who understand the risks.
Disabled (Data Type) Checkbox   If checked, a user will not be able to login. However, the user may still receive emails based on their user roles, and scripts can access content and perform actions on their behalf.
Preferences (Layout Type) Tab   Information about the user's preferences.
Form Width (FormWidth) (Data Type) Number   Width of form fields, when not displayed at full-width. The value is roughly the number of visible characters of text, but may vary based on the font and characters.
Form Height (FormHeight) (Data Type) Number   Height of form fields, when not displayed at full-height. The value is roughly the number of visible lines of text.
Text Wrap (TextWrap) (Data Type) Checkbox   If checked, text will automatically wrap at the right edge of plain text box form fields. Otherwise, text will continue past the right edge and a horizontal scroll bar will display.
Rich Text Editor (RichTextEditor) (Data Type) Checkbox   If checked, the rich text editor will be displayed for rich text fields. Otherwise, a plain text box will be diplayed revealing HTML code for rich text formatting.
Developer (Data Type) Checkbox   If checked, additional information about content type and field IDs will be displayed, which can be useful to web and application developers.
Theme (Data Type) Text Line   Preferred webCOMAND theme to use in the web interface.
Stats (Layout Type) Tab   Statistics and other information maintained about the user.
Valid Password (ValidPassword) (Data Type) Checkbox   If checked, the password has been verified to meet password complexity requirements, as defined for the system.
Encrypted Password (EncryptedPassword) (Data Type) Text Line   Encrypted version of the password.
Encrypted Password Type (EncryptedPasswordType) (Data Type) Text Line   Mechenism used to encrypt the password currently stored in the Encrypted Password field. Note that this may be different than the Encryption Type, which will be used to encypt the password next time it is entered. This field will be set at that time.
Last Access (LastAccess) (Data Type) Timestamp   Date and time the user last accessed the system, either from the web interface, web services or through the API.
Methods
Summary() [cScript]

Displays the username.

Validate() [cScript]

Detects and encypts a new password entered into the Password field, using the specified encryption type.

For more methods, see API / Developer Reference / User Class Methods.

Restrictions

Only users with full-authorization are able to change the core content types.

The core content types should not be changed under normal circumstances because they form the foundation of the repository schema and are critical to COMAND features and functionality.

Changes to these content types risk breaking fundamental dependencies and assumptions critical to software and other content types.

In version 3, all core content types extend Object, and therefore do not have version control features. In version 4, all core content types will extend Content, except content types used to implement version control features, such as Session and Content Log.

While not recommended, it is important to keep in mind that the core content types can be changed, and it is not unreasonable for an isolated systems to add fields or updated meta-data. Whenever possible though, they should not be changed, especially in repositories connected to a greater network.