2

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

我已经能够将文档上传到存储库或能够下载 n 查看文档。

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

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

提前致谢...

4

1 回答 1

4

试试这对我来说很好

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为您想要的任何内容

希望对你有所帮助

于 2016-09-07T07:09:17.423 回答