cancel
Showing results for 
Search instead for 
Did you mean: 

Overwriting content vs version service

ruighr
Champ in-the-making
Champ in-the-making
Hi,

I have some content (PDF) that has the "versionable" aspect set.  I'm using some java with contentWriter.getWriter.putContent to replace the content without changing the version.  The Share preview panel and download action point to the new content just fine.  However it looks like the version service is keeping a reference to the original content–the version download link in both Explorer and Share point to the original content.

Is there any way to kick the version service so that it updates its reference to the new content?

Thanks,

Bob
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
How can you "change the content" without changing the version?    The act of committing your change will version the node.

More details please.

ruighr
Champ in-the-making
Champ in-the-making
I'm just using the example at this link:

http://wiki.alfresco.com/wiki/NodeRef_cookbook

under the heading "Writing a file's data to a node's content" which specifies:


       ContentWriter writer = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);
       writer.setLocale(CONTENT_LOCALE);
       File file = new File("c:/temp/images/BigCheese1.bmp");
       writer.setMimetype("image/bmp");
       writer.putContent(file);

My understanding is that it just replaces the content without changing versions, and this is what I'm seeing, since the version number isn't changing.