<?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: CML Documentation? E.G. how to add Aspect to existing node? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cml-documentation-e-g-how-to-add-aspect-to-existing-node/m-p/48488#M27751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try modifying the code to …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; …&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the reference of the first result&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Reference reference = rows[0].getNode().getReference();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Setting a property&lt;BR /&gt;&amp;nbsp;&amp;nbsp; NamedValue[] specificationProps = new NamedValue[1];&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Is it possible to not set at all and still add aspect?&lt;BR /&gt;&amp;nbsp;&amp;nbsp; specificationProps[0] = Utils.createNamedValue(PROP_MYPROP,"DDD");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; CMLAddAspect addAspect = new CMLAddAspect(ASPECT_MYASPECT,&amp;nbsp;&amp;nbsp;&amp;nbsp; specificationProps, new Predicate(new Reference[]{reference}, null, null), "1"); &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; …&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;Basically the last parameter of the CMLAddAspect constructor is an id used internally to the CML statements, not a reference to an exisiting node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a note, the predicate could be build up to contain the list of all the References returned to from the query.&amp;nbsp; Then you'll only need to make one update call.&amp;nbsp; This means that the work will be done in a single transaction and with one payload sent and recieved from the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Roy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Feb 2007 13:21:58 GMT</pubDate>
    <dc:creator>rwetherall</dc:creator>
    <dc:date>2007-02-01T13:21:58Z</dc:date>
    <item>
      <title>CML Documentation? E.G. how to add Aspect to existing node?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cml-documentation-e-g-how-to-add-aspect-to-existing-node/m-p/48486#M27749</link>
      <description>Is there an update on availability of CML documentation?For example, I downloaded the 1.3 community SDK and tried to mod the Query1 to add an aspect to an *existing* node, but I can't get it to work (creating a node and adding an aspect in the same CML block with a "local id" of "1" works).Here is t</description>
      <pubDate>Wed, 17 Jan 2007 22:26:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cml-documentation-e-g-how-to-add-aspect-to-existing-node/m-p/48486#M27749</guid>
      <dc:creator>jasperk64</dc:creator>
      <dc:date>2007-01-17T22:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: CML Documentation? E.G. how to add Aspect to existing node?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cml-documentation-e-g-how-to-add-aspect-to-existing-node/m-p/48487#M27750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i am trying the code and i have the same code. Some solution? Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2007 08:35:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cml-documentation-e-g-how-to-add-aspect-to-existing-node/m-p/48487#M27750</guid>
      <dc:creator>nimind</dc:creator>
      <dc:date>2007-02-01T08:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: CML Documentation? E.G. how to add Aspect to existing node?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cml-documentation-e-g-how-to-add-aspect-to-existing-node/m-p/48488#M27751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try modifying the code to …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; …&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the reference of the first result&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Reference reference = rows[0].getNode().getReference();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Setting a property&lt;BR /&gt;&amp;nbsp;&amp;nbsp; NamedValue[] specificationProps = new NamedValue[1];&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Is it possible to not set at all and still add aspect?&lt;BR /&gt;&amp;nbsp;&amp;nbsp; specificationProps[0] = Utils.createNamedValue(PROP_MYPROP,"DDD");&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; CMLAddAspect addAspect = new CMLAddAspect(ASPECT_MYASPECT,&amp;nbsp;&amp;nbsp;&amp;nbsp; specificationProps, new Predicate(new Reference[]{reference}, null, null), "1"); &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; …&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;Basically the last parameter of the CMLAddAspect constructor is an id used internally to the CML statements, not a reference to an exisiting node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a note, the predicate could be build up to contain the list of all the References returned to from the query.&amp;nbsp; Then you'll only need to make one update call.&amp;nbsp; This means that the work will be done in a single transaction and with one payload sent and recieved from the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Roy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2007 13:21:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cml-documentation-e-g-how-to-add-aspect-to-existing-node/m-p/48488#M27751</guid>
      <dc:creator>rwetherall</dc:creator>
      <dc:date>2007-02-01T13:21:58Z</dc:date>
    </item>
  </channel>
</rss>

