<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Set content on node version? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292449#M245579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In out of the Box alfresco design:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.You can not set PROP_VERSION_LABEL property when you create a new version for a node,PROP_VERSION_LABEL property is&amp;nbsp; automatically&amp;nbsp; calculated by CalculateVersionLabelPolicy .If you want to change the default serial version label,you can customize a&amp;nbsp; CalculateVersionLabelPolicy for your custom type and use it to override the default one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.After a version is created ,you can't modify any properties(include PROP_VERSION_LABEL) unless you revert it ,and the content were not supposed to be updated at all.But it seems&amp;nbsp; alfresco overlooked this fact ,now you can get the reference to the node of the version and change it's content,it should be wrong to update it directly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if you want to use version lable policy of your own ,please customize CalculateVersionLabelPolicy &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if you really want to update a version node's property, you shoud implement a new NodeService class and use it as&amp;nbsp; the version store node service implementation&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Apr 2014 02:20:45 GMT</pubDate>
    <dc:creator>kaynezhang</dc:creator>
    <dc:date>2014-04-30T02:20:45Z</dc:date>
    <item>
      <title>Set content on node version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292443#M245573</link>
      <description>Hi all,is there a way to set the content on the node version using Java API. For example I create node version using VersionService.java and I want to set the version content, is it possible and if yes how to do that?Thanks…</description>
      <pubDate>Mon, 28 Apr 2014 14:27:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292443#M245573</guid>
      <dc:creator>nenad982</dc:creator>
      <dc:date>2014-04-28T14:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set content on node version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292444#M245574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have it backwards.&amp;nbsp; You create a version of the current content and properties not the other way around.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 16:24:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292444#M245574</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-04-28T16:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set content on node version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292445#M245575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can try following and see if it works for you or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Get the frozenStateNodeRef from the Version object you get after creating a new version using CreateVersion method and try setting up content property for this node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 16:28:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292445#M245575</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-04-28T16:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set content on node version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292446#M245576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi romschn,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this works thank you. I now noticed that I have problems to set version labels to right values? Is it possible to set the label somehow on version creation, or to update version label?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 07:44:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292446#M245576</guid>
      <dc:creator>nenad982</dc:creator>
      <dc:date>2014-04-29T07:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set content on node version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292447#M245577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;okay, can you try simply setting up the ContentModel.PROP_VERSION_LABEL using nodeservice.setProperty method with your right values and see if it works for you or not?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;this.nodeService.setProperty(nodeRef,ContentModel.PROP_VERSION_LABEL,"Label-1");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 13:03:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292447#M245577</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-04-29T13:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set content on node version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292448#M245578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That does not work,I already tried that. Also if you look at implementation of &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;VersionService#createVersion( NodeRef nodeRef,Map&amp;lt;String, Serializable&amp;gt; versionProperties);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;you will see that setting label is not possible on version creation also. I found this also:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://code.google.com/p/alfresco-bulk-filesystem-import/issues/detail?id=85" rel="nofollow noopener noreferrer"&gt;http://code.google.com/p/alfresco-bulk-filesystem-import/issues/detail?id=85&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it seams that it is not possible?!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 19:51:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292448#M245578</guid>
      <dc:creator>nenad982</dc:creator>
      <dc:date>2014-04-29T19:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set content on node version?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292449#M245579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In out of the Box alfresco design:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.You can not set PROP_VERSION_LABEL property when you create a new version for a node,PROP_VERSION_LABEL property is&amp;nbsp; automatically&amp;nbsp; calculated by CalculateVersionLabelPolicy .If you want to change the default serial version label,you can customize a&amp;nbsp; CalculateVersionLabelPolicy for your custom type and use it to override the default one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.After a version is created ,you can't modify any properties(include PROP_VERSION_LABEL) unless you revert it ,and the content were not supposed to be updated at all.But it seems&amp;nbsp; alfresco overlooked this fact ,now you can get the reference to the node of the version and change it's content,it should be wrong to update it directly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if you want to use version lable policy of your own ,please customize CalculateVersionLabelPolicy &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if you really want to update a version node's property, you shoud implement a new NodeService class and use it as&amp;nbsp; the version store node service implementation&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 02:20:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-content-on-node-version/m-p/292449#M245579</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-04-30T02:20:45Z</dc:date>
    </item>
  </channel>
</rss>

