如何使用 CMIS 更新文档属性

编程入门 行业动态 更新时间:2024-10-20 05:31:16
本文介绍了如何使用 CMIS 更新文档属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个外部 Web 应用程序,通过它我使用 CMIS 连接到 alfresco 存储库.

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.

提前致谢...

推荐答案

试试这个对我来说很好用

try this worked fine for me

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 更新文档属性

本文发布于:2023-11-28 10:05:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641958.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   属性   文档   CMIS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!