使用OpenCmis在Alfresco中手动更改文档的版本 [英] Change the version manually of a Document in Alfresco using OpenCmis

查看:72
本文介绍了使用OpenCmis在Alfresco中手动更改文档的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用OpenCmis在Alfresco中手动更改文档版本?截至目前,当我更新文档时,每次户外更改版本本身,但我都想从用户输入(例如1.0、2.0、2.1等)更改版本。

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.

例如。 document.txt 1.0,
document.txt 1.1

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

我想放置2.3版而不是document.txt 1.1

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

推荐答案

在CMIS下无法实现您的目标。 规范强制 cmis:document 上的所有版本控制属性为只读,并且是在某些方面影响它们的唯一方法是通过Versioning API进行的,该API仅允许您指定是创建次要版本还是主要版本,以及可选的签入注释。

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.

您将需要编写如果需要,可以对Alfresco进行一些更复杂的服务器端扩展,或者扩展内容模型以提供一个自定义属性,以将当前要存储的信息保存到版本标签中。

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.

这篇关于使用OpenCmis在Alfresco中手动更改文档的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆