Configuration to access a DMS
CMDBuild supports integration with Document Management Systems (DMS) via the CMIS protocol, enabling the following base features:
- Attach any kind of file to any data card
- Assign a category to each attached file
- Display and browse uploaded files
Category and metadata management relies on a DMS exposed through standard APIs.
Configuration of categories management
This section describes how to configure a DMS to manage attachment classification on CMDBuild cards.
The following example refers to Alfresco 25.3.0. The names used are provided as examples and are not binding.
To define custom categories, create the two files below and place them in:
${ALFRESCO_HOME}/tomcat/shared/classes/alfresco/extension
1. cmdbuild-model-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Registration of new models -->
<bean id="example.dictionaryBootstrap"
parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/cmdbuild-model.xml</value>
</list>
</property>
</bean>
</beans>
2. cmdbuild-model.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="cmdbuild:module"
xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Custom Model for CMDBuild</description>
<author>CMDBuild Team</author>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<namespaces>
<namespace uri="org.cmdbuild.dms.alfresco" prefix="cmdbuild"/>
</namespaces>
<aspects>
<aspect name="cmdbuild:classifiable">
<title>Classification</title>
<properties>
<property name="cmdbuild:classification">
<type>d:text</type>
</property>
</properties>
</aspect>
</aspects>
</model>
Configuration of the DMS in CMDBuild
DMS settings can be managed via REST commands. Use editconfig to open a GUI showing all available configurations (when CMDBuild is running locally), or use setconfig / setconfigs to apply settings directly from the command line. Example:
cmdbuild.sh restws setconfig org.cmdbuild.dms.enabled true
General configuration
| Config | Type | Description |
|---|---|---|
org.cmdbuild.dms.enabled | Boolean | Enables or disables the DMS service |
org.cmdbuild.dms.service.type | String | DMS service type: alfresco (external DMS), postgres (embedded DMS using the CMDBuild PostgreSQL database), or sharepoint_online |
org.cmdbuild.dms.category.lookup | String | Sets the base lookup DMS category |
org.cmdbuild.dms.regularAttachments.maxFileSize | Int | Maximum allowed file size, in MB |
org.cmdbuild.dms.incomingEmailAttachments.allowedFileExtensions | List<String> | Allowed file extensions (lowercase) for incoming email attachments; rejected attachments are ignored with a warning, without affecting email processing |
org.cmdbuild.dms.autolink.path | String | Autolink base path (overrides the DMS provider base path for links) |
org.cmdbuild.dms.autolink.script | String | Autolink helper script |
Alfresco configuration
| Config | Type | Description |
|---|---|---|
org.cmdbuild.dms.service.alfresco.user | String | Service username |
org.cmdbuild.dms.service.alfresco.password | String | Service password |
org.cmdbuild.dms.service.alfresco.path | String | Service path |
org.cmdbuild.dms.service.alfresco.apiBaseUrl | String | Service URL |
SharePoint configuration
| Config | Type | Description |
|---|---|---|
org.cmdbuild.dms.service.sharepoint.user | String | Service username |
org.cmdbuild.dms.service.sharepoint.password | String | Service password |
org.cmdbuild.dms.service.sharepoint.url | String | Service URL |
org.cmdbuild.dms.service.sharepoint.path | String | Service path |
org.cmdbuild.dms.service.sharepoint.graphApi.url | String | Graph API service URL |
org.cmdbuild.dms.service.sharepoint.auth.serviceUrl | String | Authentication service URL |
org.cmdbuild.dms.service.sharepoint.auth.clientId | String | Authentication client ID |
org.cmdbuild.dms.service.sharepoint.auth.clientSecret | String | Authentication client secret |
org.cmdbuild.dms.service.sharepoint.auth.protocol | String | Authentication protocol |
org.cmdbuild.dms.service.sharepoint.auth.resourceId | String | Authentication resource ID |
org.cmdbuild.dms.service.sharepoint.auth.tenantId | String | Authentication tenant ID |
org.cmdbuild.dms.service.sharepoint.model.authorColumn | String | Author mapping column |
org.cmdbuild.dms.service.sharepoint.model.categoryColumn | String | Category mapping column |
org.cmdbuild.dms.service.sharepoint.model.descriptionColumn | String | Description mapping column |