如何使用CMIS更新文档属性 [英] How to Update Document properties using CMIS

查看:102
本文介绍了如何使用CMIS更新文档属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个外部Web应用程序,通过它我可以使用CMIS连接到露天仓库。

I have one external web application through that i connected to alfresco repository using CMIS.

我已经能够将文档上载到存储库或下载n视图文件。

I am already able to upload document in to repository or able to download n view document.

现在,我的要求是,我必须更新特定的文档属性。

Now my requirement is, I have to Update Specific Documents Properties.

因此,任何人都可以提供示例代码或使用CMIS更新文档属性的步骤。

So can any one please provide sample code or steps to update document properties Using CMIS.

在此先感谢...

推荐答案

尝试一下对我来说很好

Session session = getSession(serverUrl, username, password);
Document targetFile = (Document) session.getObject(path);
Map<String, Object> properties = new HashMap<>();
properties.put(PropertyIds.NAME, name);
targetFile.updateProperties(properties);

在我的示例中,您只需替换 name 随心所欲

In my example you only have to replace name with whatever you want

希望为您提供帮助

这篇关于如何使用CMIS更新文档属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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