How to Update Document properties using CMIS

2020-03-29 19:08发布

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

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.

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

Thanks in Advance...

1条回答
混吃等死
2楼-- · 2020-03-29 19:41

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);

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

Hope that helped you

查看更多
登录 后发表回答