cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCMIS: Update content stream without versioning?

pco
Champ in-the-making
Champ in-the-making
Hi, folks,

using OpenCMIS (0.12.0) I'd like to replace the content of an pre-existing document with new content. The reason for this is that we do not want to waste a lot of disk space in this particular use case.

I was planning to use the Document.setContentStream method for this. Unfortunately it turns out that alfresco creates a new version and retains the original content every time I use this method.
I had expected, that this happens only when I use then checkOut / checkIn approach. Otherwise checkin / checkout and setContentStream do effectively the same (nearly).

I am quite sure that Alfresco's auto-versioning has to do with his. The thing is, that generally I like auto-versioning (in Share for example) - it's just not what I want for CMIS.

Any pointers?

Regards,
Pascal
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

to disable the auto-versioning feature of Alfresco you need to make sure the cm:autoVersion and cm:autoVersionOnUpdateProps flags are set to false (individually for each object you update this way). This unfortunately means you have to add some special handling in the CMIS client if you do not want to change the behavior for Share as well - then you could make a minor modification to contentModel.xml and set the default values of those properties to false.
Also, setting the properties to false for the objects from the CMIS client means that those objects will behave differently in Share as well - there is no differentiation.

Regards
Axel