Change the version manually of a Document in Alfresco using OpenCmis

浪尽此生 提交于 2020-01-14 10:25:28

问题


I want to know how can we change the Document Version Manually in Alfresco using OpenCmis? As of now when i update the document, every time alfresco change the version itself but I want to change version from user input like 1.0,2.0, 2.1 etc.

For Eg. document.txt 1.0, document.txt 1.1

Instead of document.txt 1.1 i want to place version 2.3


回答1:


There's no way to accomplish your goal under CMIS. The spec mandates all versioning properties on a cmis:document to be read only, and the only way to affect them in some ways is through the Versioning API, which only allow you to specify whether you're creating a minor or a major version, and an optional checkin comment.

You will need to write some more sophisticated server side extension to Alfresco if you want to do that, or extend your content model to provide a custom property to hold the information you currently want to store into the version label.




回答2:


You can do it through code example 1 example 2

or

You can do it through db update example

explore more options if above doesnt meet your requierement.



来源:https://stackoverflow.com/questions/15085254/change-the-version-manually-of-a-document-in-alfresco-using-opencmis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!