如何使用 CMIS 更新文档属性
How to Update Document properties using CMIS
我有一个外部 Web 应用程序,通过它我使用 CMIS 连接到露天存储库。
我已经能够将文档上传到存储库或能够下载 n 查看文档。
现在我的要求是,我必须更新特定文档属性。
任何人都可以提供使用 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
替换为任何您想要的
希望对你有所帮助
我有一个外部 Web 应用程序,通过它我使用 CMIS 连接到露天存储库。
我已经能够将文档上传到存储库或能够下载 n 查看文档。
现在我的要求是,我必须更新特定文档属性。
任何人都可以提供使用 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
替换为任何您想要的
希望对你有所帮助