Model management

This feature is not recommended in production: use it only during the design phase.

Creating and editing a model is available to Pristy administrators (members of the GROUP_PRISTY_ADMINISTRATORS group) or super administrators. However, deploying a model to the repository and activating/deactivating it are reserved for super administrators - see the dedicated section below.

Model management lets you build a custom Alfresco content model - types, aspects, properties, associations and constraints - without writing XML by hand, then deploy it to the repository.

Accessing model management

To access model management, click the Model Management entry in the “Administration” section of the side menu. The page is titled “Data Model Management”.

Creating or selecting a model

There are three ways to start working on a model:

  • New Model: opens a creation dialog with the Model Name, Prefix, Namespace, Description and Author fields. The name, prefix and namespace are mandatory and validated on creation:
    • the name must start with a letter and contain only letters, digits, hyphens and underscores;
    • the prefix must start with a lowercase letter and contain only lowercase letters and digits;
    • the namespace must be a valid http:// or https:// URI.
  • Import XML: uploads an existing .xml file (restricted to that format only) and rebuilds the model in the editor from its content (metadata, constraints, types, aspects, properties, associations).
  • Select a model: the selector at the top right of the screen lists the models already saved (see “Saving the model being edited” below) and loads the chosen model into the editor.

Importing an XML file or selecting another model fully replaces the content of the current editor, without warning if changes have not been saved beforehand.

Editing the model metadata

Once a model is loaded in the editor, a first block lets you edit its metadata: Model Name, Prefix, Namespace, Description, Author, Version.

Managing types and aspects

The rest of the screen is organized into four tabs: Types, Aspects, Constraints and XML Preview.

Types and aspects

The Types and Aspects tabs respectively list the types and the aspects of the model being edited, with for each one: Name, Title, Parent, the number of Properties and the number of Associations, as well as Edit and Delete actions (with confirmation).

The Add Type (or Add Aspect) button opens an editing dialog with:

  • Name, Title, Description
  • Parent Type: an editable drop-down list offering the usual parents (cm:content, cm:folder, cm:person, cm:authority, sys:base), but also accepting free input of another type
  • Mandatory Aspects (only for a type, not for an aspect): multiple selection among the aspects already defined in the model

Properties of a type or an aspect

In the editing dialog of a type or an aspect, the Properties section lets you add, edit or delete a property with the following fields:

  • Name, Title, Description
  • Data Type: d:text, d:mltext, d:content, d:int, d:long, d:float, d:double, d:date, d:datetime, d:boolean, d:noderef, d:category, d:path, d:qname or d:locale
  • Mandatory and Multi-valued (checkboxes)
  • Default Value
  • Indexed: if checked, three additional options appear - Atomic Index, Stored Index, Tokenised Index
  • Constraint: selection of a constraint among those defined in the Constraints tab (optional)

Associations of a type or an aspect

The Associations section lets you add, edit or delete an association with:

  • Name, Title, Description
  • Child Association (checkbox): determines whether the association is generated as a child-association (composition) or as a plain association
  • Source: role, mandatory, multiple
  • Target: target class (mandatory), role, mandatory, multiple

Defining constraints

The Constraints tab lists the model’s constraints (Name, Type), with Edit and Delete actions. The Add Constraint button opens a dialog with:

  • Name (mandatory)
  • Type: LIST, REGEX, LENGTH or MINMAX
  • Allowed Values: a list of values entered one by one

Whatever the chosen type, the editor generates the constraint in the XML as an allowedValues parameter listing the entered values. This setting natively suits the LIST type; for the REGEX, LENGTH or MINMAX types, [To verify] it may be necessary to adjust the exported XML to match the parameter format expected by Alfresco (expression, minLength/maxLength, minValue/maxValue, etc.).

Previewing the generated XML

The XML Preview tab displays, in a read-only CodeMirror editor with line numbers, the XML generated from the model being edited. This preview updates automatically on every change; it cannot be edited directly from this tab.

Importing and exporting the XML

  • Import XML (button in the main toolbar, see above): loads an existing .xml file into the editor.
  • Export to XML: downloads the currently generated XML as a <model-name>.xml file, without going through the Alfresco repository - handy to back up or share a model before deploying it.

Saving the model being edited

The Save button saves the model being edited in the Pristy application configuration (in JSON format). This save is independent of the Alfresco repository: it lets you resume editing later through the model selector, but does not deploy the model to the repository.

Saving an edited model and deploying it to the repository are two distinct actions - see the next section.

Deploying the model to the repository (super administrators)

Once a model is active, Alfresco checks every redeployment and rejects any non-incremental change, whether or not the model is already used by content. Test your models on a non-critical environment before any production deployment.

On an active model, Alfresco accepts:

  • adding types, aspects, properties, associations and constraints,
  • changing titles, descriptions and default values,
  • turning a mandatory property into an optional one, or a protected property into an editable one,
  • changing the values of an existing constraint.

It rejects:

  • removing a type, an aspect or an association,
  • removing a property used by at least one node, or a constraint referenced by a property,
  • changing the parent type, the data type of a property, whether it is multi-valued or how it is indexed,
  • turning an optional property into a mandatory one,
  • adding a mandatory aspect to a type or an aspect.

Deactivating a model is rejected while one of its types or aspects is used by a node, including a node in the trashcan, or by a workflow definition.

If the logged-in user is not a super administrator, an information message reminds them that deploying and activating/deactivating models require administrator rights, and the corresponding buttons do not appear.

Deploying or redeploying

The Deploy Model button (or Redeploy Model if an already deployed model has the same prefix and the same name) opens a confirmation dialog that recalls the location where the XML file is stored (/app:company_home/app:dictionary/app:models/), with an Activate the model immediately after deployment option.

Checking immediate activation makes Alfresco validate the model, then reload its model dictionary. An invalid model, or a rejected change (see above), makes the activation fail. Make sure the model is correct before activating it.

If a model with the same prefix and the same name is already deployed, the deployment updates the XML file and its existing properties instead of creating a duplicate.

Activating or deactivating an already deployed model

Once the model is deployed, two buttons appear depending on its activation state:

  • Activate Model, if it is currently deactivated
  • Deactivate Model, if it is currently active - a confirmation is requested, with a warning about the possible impact on existing content that uses this model

Last Update - November 5, 2026
Call To Action 📣

Try Pristy

You can try the Pristy demo by signing up using the link below.

Demander une démo