<?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: existing node as a new version for another node in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231240#M184370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for your reply. I've used something like that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy = nodeA.checkout();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.content.write(nodeB.content);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.checkin();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but i want to do something like that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy = nodeA.checkout();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.content.write(nodeB.content);&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;workingCopy.properties = nodeB.properties;&lt;BR /&gt;workingCopy.save();&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.checkin();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so i make nodeA to have 'all properties' or 'all properties of a specific aspect' of nodeB. How can i do that?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 May 2010 21:47:01 GMT</pubDate>
    <dc:creator>gokceng</dc:creator>
    <dc:date>2010-05-25T21:47:01Z</dc:date>
    <item>
      <title>existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231238#M184368</link>
      <description>I have two nodes: nodeA and nodeB, I want nodeB to have a new version which is nodeA, I mean how can I make nodeA nodeB's new version?</description>
      <pubDate>Sat, 22 May 2010 17:17:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231238#M184368</guid>
      <dc:creator>gokceng</dc:creator>
      <dc:date>2010-05-22T17:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231239#M184369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First, check out the wiki:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook#Create_Document.2C_Make_it_Versionable.2C_Modify_It" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook#Create_Document.2C_Make_it_Versionable.2C_Modify_It&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, you may need to copy the contents of the newer node into the older file. You will have to use the writer() function to do the copy, since just using the cm:content attribute only works on strictly text files.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 May 2010 16:00:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231239#M184369</guid>
      <dc:creator>invictus9</dc:creator>
      <dc:date>2010-05-25T16:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231240#M184370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for your reply. I've used something like that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy = nodeA.checkout();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.content.write(nodeB.content);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.checkin();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but i want to do something like that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy = nodeA.checkout();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.content.write(nodeB.content);&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;workingCopy.properties = nodeB.properties;&lt;BR /&gt;workingCopy.save();&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;workingCopy.checkin();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so i make nodeA to have 'all properties' or 'all properties of a specific aspect' of nodeB. How can i do that?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 May 2010 21:47:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231240#M184370</guid>
      <dc:creator>gokceng</dc:creator>
      <dc:date>2010-05-25T21:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231241#M184371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The "properties" property is a map, so you can iterate over all of the keys in the source map and set them in the destination map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;for ( k in keys(nodeB.properties) ) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; workingCopy.properties[k] = nodeB.properties[k];&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 may need to filter some items to prevent error messages (I think) as some properties may not be settable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 16:04:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231241#M184371</guid>
      <dc:creator>invictus9</dc:creator>
      <dc:date>2010-05-26T16:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231242#M184372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't see why copying the cm:content property should only work for text files? As a matter of fact, i'm frequently doing this to make copies of nodes without duplicating the actual content, and Alfresco's CopyService is doing similar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The cm:content property is only a pointer into the actual content store, so having two nodes with same cm:content property is similar to having two or more hardlinked files on Unix. (Well, this analogy is a bit lame: if one the nodes' content is updated, it gets its cm:content property pointing to a fresh location, so the nodes have different content then). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An alternative approach might be to use app:filelink objects, however, your mileage may vary&amp;nbsp; :roll: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gyro&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 16:29:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231242#M184372</guid>
      <dc:creator>gyro_gearless</dc:creator>
      <dc:date>2010-05-26T16:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231243#M184373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I don't see why copying the cm:content property should only work for text files?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't see why, either. However, the documentation is pretty clear that cm:content is for text, which is why I recommend using the 'writer' approach. In a Unix world, everything is bytes, but everyone forgets that this was a major breakthrough in computer input and output. Previous computer systems had specialized input and output systems for different kinds of data, and different kinds of media. When you understand that "text" is a different interpretation of "bytes", a lot of your I/O system gets simpler. However, at some point, multi-byte characters became the norm, and you could end up with anomalies that meant that "text" (as in a series of textual characters) did not mean the same as "bytes".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, when the documentation puts limits on the way material can be interpreted, I tend to trust that they know what might go wrong. The mechanism is there to do the copying, and (I hope) the mechanism does not depend on it being text.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 15:56:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231243#M184373</guid>
      <dc:creator>invictus9</dc:creator>
      <dc:date>2010-05-27T15:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231244#M184374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;cm:content is binary data.&amp;nbsp;&amp;nbsp;&amp;nbsp; You can store, for example, an image in a content property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending upon which interface you use it may make sense to return the data as a String of characters.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; However the JavaScript interfaces you are looking at are a little challenged since JavaScript can't deal with streaming, however it can handle strings.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And its also worth noting that as well as the binary content cm:content also contains the mime type and the character set so its possible to reliably pull out Japanese text or application specific data files.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 16:15:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231244#M184374</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2010-05-27T16:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: existing node as a new version for another node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231245#M184375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The "properties" property is a map, so you can iterate over all of the keys in the source map and set them in the destination map.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;for ( k in keys(nodeB.properties) ) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; workingCopy.properties[k] = nodeB.properties[k];&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;You may need to filter some items to prevent error messages (I think) as some properties may not be settable.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks invictus9 it helped me..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Jul 2010 12:18:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/existing-node-as-a-new-version-for-another-node/m-p/231245#M184375</guid>
      <dc:creator>gokceng</dc:creator>
      <dc:date>2010-07-25T12:18:46Z</dc:date>
    </item>
  </channel>
</rss>

