Overview
Venzia Datalinks integrates with Alfresco Content Services through custom content model aspects. Each datalink requires a corresponding aspect in your Alfresco content model to store the reference to the external entity.Content Model Structure
The Venzia Datalinks content model is defined in XML format following Alfresco’s content model schema:Model Elements
Model Declaration
Unique identifier for the content model. Convention is
prefix:modelname.Example: "dlnk:venzia"Human-readable description of the model’s purpose.Example:
"Custom Model of Alfresco DataLink"Organization or individual who created the model.Example:
"Venzia"Version number of the content model.Example:
"1.0"Imports
Required Alfresco base models must be imported:These imports provide access to Alfresco’s standard data types (
d:text, d:int, etc.) and content model structures (cm:content, cm:folder, etc.).Namespace Declaration
Unique URI that identifies your custom namespace. Should be a URL-like format.Example:
"http://venzia.es/model/datalink/1.0"Short prefix used in aspect and property names throughout the system.Example:
"dlnk"Aspect Definition
Each datalink requires a dedicated aspect in the content model. Aspects define properties that can be applied to documents.Aspect Structure
Aspect Properties
Fully qualified name of the aspect using the namespace prefix.Format:
prefix:localNameExample: "dlnk:employee", "dlnk:departm"Human-readable title displayed in the Alfresco UI.Example:
"Employee", "Departm"Property Definition
Each aspect contains one property that stores the linked entity’s primary key value.Property Elements
Fully qualified property name. Must match the
aspectPropertyName in your datalink JSON configuration.Example: "dlnk:employee", "dlnk:departm"Alfresco data type for the property. For datalinks, use
d:text to store the primary key value.Options:d:text- Text string (recommended for datalinks)d:int- Integer numberd:long- Long numberd:boolean- Boolean valued:date- Date/time value
"d:text"Index Configuration
Theindex element configures how Alfresco indexes the property for search:
Enable indexing for search functionality.Recommended:
trueIndex the entire value as a single unit. For primary keys, this should be
true.Recommended: trueStore the value in the search index. For properties stored in the database, this can be
false.Recommended: falseBreak the value into tokens for full-text search. For primary keys, this should be
false.Recommended: falseDeployment
AMP Module Structure
Content model XML files are deployed as part of an Alfresco Module Package (AMP):Module Properties
Ensure yourmodule.properties includes:
Model Deployment Location
Place your content model XML file at:
alfresco/module/{module-id}/model/datalink-model.xmlAlfresco automatically loads models from this location on startup.Linking Aspects to Datalinks
The connection between content model aspects and datalink JSON configurations is established through naming:Creating Custom Aspects
To create a new datalink aspect:Step-by-Step: Creating a Customer Datalink
Step-by-Step: Creating a Customer Datalink
1. Add aspect to content model XML:2. Create corresponding datalink JSON file:3. Deploy and restart Alfresco
Best Practices
Consistent Naming
Use the same name for aspect and property (e.g.,
dlnk:employee for both)Text Data Type
Always use
d:text for datalink properties to store primary keysDisable Tokenization
Set
tokenised: false to ensure exact matching of linked IDsVersion Control
Increment model version when making changes to deployed aspects
Advanced Configuration
Multiple Properties per Aspect
While datalinks typically use a single property, you can add additional properties to store metadata:Only the property specified in
aspectPropertyName is managed by Venzia Datalinks. Additional properties can be used for custom business logic or reporting.Mandatory vs Optional Aspects
You can make aspect properties mandatory:Troubleshooting
Aspect not available in Alfresco Share
Aspect not available in Alfresco Share
Property value not saved
Property value not saved
Possible causes:
- Property name mismatch between aspect and datalink JSON
- Property type incompatible with data being stored
aspectPropertyName in JSON matches property name in XML.Search not returning linked documents
Search not returning linked documents
Possible causes:
- Index configuration incorrect (
tokenised: trueoratomic: false) - Solr index not updated
Next Steps
Datalink JSON Schema
Learn how to configure datalink JSON files
REST Connector Setup
Configure REST API authentication and integration
