05-27-2020 03:12 AM
Hello everyone!
I'm using org.apache.chemistry.opencmis.client.api.Document to create a new version of a document.
Here is my code
doc.refresh(); ObjectId idOfCheckedOutDocument = doc.checkOut(); Document privateWorkingCopy = (Document) getCmisSession().getObject(idOfCheckedOutDocument, op); ObjectId objectId = privateWorkingCopy.checkIn(isMajor, null, contentStream, rev); doc = (Document) session.getObject(objectId);
The new version has been correctly created but the cm:modifier and cm:creator of the old version has been changed with the same user that create the newer, that being admin. This happens when the checkIn method is invoked, at the same time both the new version appears and the previous modifier is changed. Since if I understand correctly I can't change the properties of an old version, and despite being the previous it's still an old version, this has been quite a problem but I can't seem to solve it.
Is there any way to maintain the original cm:modifier when creating a new version? Or is there a better way to create a new version other than the one I've used? Thank you all!
Explore our Alfresco products with the links below. Use labels to filter content by product module.