Manually change a document in Alfresco using OpenCmis

I want to know how we can change a document version manually in Alfresco using OpenCmis? At the moment, when I update the document, every time alfresco changes the version, but I want to change the version from user input, for example, 1.0.2.0, 2.1, etc.

For instance. document.txt 1.0, document.txt 1.1

Instead of document.txt 1.1 I want to host version 2.3

+4
source share
2 answers

In CMIS there is no way to fulfill your goal. spec indicates that all version control properties on cmis:document are read-only, and the only way to influence them in some way is through the version API, which allows you to specify whether you will create a small or major version and an optional comment for verification.

You will need to write an even more complex server-side extension for Alfresco if you want to do this, or expand your content model to provide a custom property for storing the information that you now want to save in the version label.

+2
source

You can do this through code example 1 example 2

or

You can do it via db update example

Explore more options if the above does not meet your requirement.

+1
source

All Articles