<?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: API differences Javascript vs JAVA in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295128#M248258</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 managed to find a solution to my problem. As suspected it was lack of understanding of the API. I had placed my arguments in the wrong order as expected by the method, and one QName ("ContentModel.TYPE_CONTENT") was wrong. In the end I had to change the method to look like this: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;This is the new order:&amp;lt;/strong&amp;gt; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;nodeService.createNode(parentDest, ContentModel.ASSOC_CONTAINS, ContentModel.TYPE_LINK, QName.createQName(LINK_URI), linkParams)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;The one with an error was:&amp;lt;/strong&amp;gt; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;nodeService.createNode(parentDest, ContentModel.ASSOC_CONTAINS, QName.createQName(LINK_URI), ContentModel.TYPE_CONTENT, linkParams)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I am able to achieve what I had set out to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2015 13:09:00 GMT</pubDate>
    <dc:creator>darkredd</dc:creator>
    <dc:date>2015-08-05T13:09:00Z</dc:date>
    <item>
      <title>API differences Javascript vs JAVA</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295125#M248255</link>
      <description>Hello everyone,A silly question perhaps, however here goes: I am trying to leverage an already existing custom action which creates document links.I have a slight lack of understanding of API differences. In Javascript I am able to use the custom action's logic to create link with a script (Action R</description>
      <pubDate>Wed, 05 Aug 2015 09:33:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295125#M248255</guid>
      <dc:creator>darkredd</dc:creator>
      <dc:date>2015-08-05T09:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: API differences Javascript vs JAVA</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295126#M248256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;IIRC I don't think you can have properties on an association.&amp;nbsp;&amp;nbsp;&amp;nbsp; Well except the name and type which are special cases.&amp;nbsp;&amp;nbsp; linkParams are actually properties for the new node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect your LINK_URI is not correct.&amp;nbsp;&amp;nbsp; There is a convention to follow that is enforced by the file folder service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 10:09:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295126#M248256</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2015-08-05T10:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: API differences Javascript vs JAVA</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295127#M248257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi mrogers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your response. However my "LINK_URI" is correct because it's a copy and paste of the uri which I use in javascript. On the original post &amp;lt;strong&amp;gt;{custom.uri}&amp;lt;/strong&amp;gt; is a replacement of the actual uri which in fact is assigned to LINK_URI. Based on your response I would think I am then uri the NodeService.create() method in a wrong, specifically when it come the association part. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What would you suggest I look at to achieve this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 10:54:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295127#M248257</guid>
      <dc:creator>darkredd</dc:creator>
      <dc:date>2015-08-05T10:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: API differences Javascript vs JAVA</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295128#M248258</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 managed to find a solution to my problem. As suspected it was lack of understanding of the API. I had placed my arguments in the wrong order as expected by the method, and one QName ("ContentModel.TYPE_CONTENT") was wrong. In the end I had to change the method to look like this: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;This is the new order:&amp;lt;/strong&amp;gt; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;nodeService.createNode(parentDest, ContentModel.ASSOC_CONTAINS, ContentModel.TYPE_LINK, QName.createQName(LINK_URI), linkParams)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;The one with an error was:&amp;lt;/strong&amp;gt; &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;nodeService.createNode(parentDest, ContentModel.ASSOC_CONTAINS, QName.createQName(LINK_URI), ContentModel.TYPE_CONTENT, linkParams)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I am able to achieve what I had set out to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 13:09:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/api-differences-javascript-vs-java/m-p/295128#M248258</guid>
      <dc:creator>darkredd</dc:creator>
      <dc:date>2015-08-05T13:09:00Z</dc:date>
    </item>
  </channel>
</rss>

