Document Modelling

The CND

You can configure which properties your document should have in the CND.

You can configure which properties your document should have in the CND and by adding mixins. You can learn more about this procedure here. The properties you add in the CND can have the following types:

Property Types
Property TypePurpose
booleanA property with only two possible values - true or false.
dateA property for date and time values.
doubleA property for floating-point numbers.
longA property for integers.
referenceA property for documents and childnodes.
stringA property for all sorts of text.

Adding the keyword multiple after the property declaration enables you to store multiple values into a single property. A complete property declaration should look like this: -'namespace:propertyName' (type) multiple. Of course, you can omit the keyword multiple. Multiple only works for properties of the types date and string.

The declaration of childnodes is a little bit different, since they don't have a specific type, but a supertype instead. A complete childnode declaration should look somewhat like this: +'namespace:childnodeName' (supertype). If the childnode is no specific subtype, you have to declare nt:base as supertype (roughly corresponding to the fact that all Java classes are subtypes of java.lang.Object).

Mutual Configuration Options for Properties

There are a few options in a property configuration that all properties have in common. These are:

  • Label, Label (Plural): The label which appears in the document editor.
  • Description: A short description text which will be displayed as an input field's tooltip.
  • Read only: Some input fields should be edited only by the server, scripts or the like, but not by a regular user. You can configure these properties as read-only. Default is no.
  • Required: Some input fields should not be empty when saving a document. Configure these as required. Default is no.
  • Editable by: Some fields should be edited only by a limited set of users. You can constrain the editability to a set of roles. Defaul is All Roles.
  • Required Document Permissions: Some fields should only be edited by users with a specific document permission. You can configure that here. Default is none.

Last modified on 10/16/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon