Edit the contentModel.xml file to enable versioning for all content in the repository.
- Download the contentModel.xml file.
- Create a $TOMCAT_HOME/shared/classes/alfresco/extension/models directory.
-
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>
- Copy the edited contentModel.xml file to the $TOMCAT_HOME/shared/classes/alfresco/extension/models directory.
-
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>
- Save the file.
- Restart the SkyVault server.
Uploaded content will then have the cm:versionable aspect.