Making all Content Versionable - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

Edit the contentModel.xml file to enable versioning for all content in the repository.

  1. Download the contentModel.xml file.
  2. Create a $TOMCAT\_HOME/shared/classes/alfresco/extension/models directory.
  3. In the contentModel.xml file, search for <type name="cm:content">, and immediately after the closing </properties> tag, insert the following lines to make the content versionable:
     <mandatory-aspects>
         <aspect>cm:versionable</aspect>
     </mandatory-aspects>
    
  4. Copy the edited contentModel.xml file to the $TOMCAT\_HOME/shared/classes/alfresco/extension/models directory.
  5. Add a Spring context file to $TOMCAT_HOME/shared/classes/alfresco/extension with the following lines:
     <?xml version='1.0' encoding='UTF-8'?>
     <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
    
     <beans>
         <bean parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
             <property name="models">
                 <list>
                     <value>alfresco/extension/models/contentModel.xml</value>
                 </list>
             </property>
         </bean>
     </beans>
    					
  6. Save the file.
  7. Restart the Content Service server.
The uploaded content now has the cm:versionable aspect.