<?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 Return the content of an associated node when reading another in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294122#M247252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello fellow developers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently developing a Alfresco extension to mimick Linux/Unix syslinks in Alfresco. I've developed a Share action that creates nodes of the type &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;app:filelink&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; and sets all properties correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when reading the node via CIFS (JLAN), it opens as a text file. Which is the right format for a link, but not the intended behaviour of a symlink.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I'm trying to create a custom content type that subclasses &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;app:filelink&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; but reads the destination node's (&lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;d:destination&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;) content instead of that of the node. How can I do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I worked myself through the custom content types tutorial and know of the Policy/Behaviour model. I can resolve the destination node in Java. But I do not know how to point the "content reader" at the destination node's content instead of the link's text representation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there perhaps a way to "wrap" the read call? Or should I change the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;cm:content&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; property on the fly…?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And pointers or hints are welcome!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks alot in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;— Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2014 13:36:30 GMT</pubDate>
    <dc:creator>technaton</dc:creator>
    <dc:date>2014-05-02T13:36:30Z</dc:date>
    <item>
      <title>Return the content of an associated node when reading another</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294122#M247252</link>
      <description>Hello fellow developers,I'm currently developing a Alfresco extension to mimick Linux/Unix syslinks in Alfresco. I've developed a Share action that creates nodes of the type app:filelink‍ and sets all properties correctly.However, when reading the node via CIFS (JLAN), it opens as a text file. Which</description>
      <pubDate>Fri, 02 May 2014 13:36:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294122#M247252</guid>
      <dc:creator>technaton</dc:creator>
      <dc:date>2014-05-02T13:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Return the content of an associated node when reading another</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294123#M247253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In alfresco 'd default implementation ,A link must extends&amp;nbsp; 'cm:link' type("app:filelink"&amp;nbsp; for file ,"app:folderlink" for folder). "cm:link" type has single NodeRef value property ContentModel.PROP_LINK_DESTINATION which is used to save the node that should be linked to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you try to open a file on SMB/CIFS the file system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.alfresco will first try to fetch&amp;nbsp; the node at the specified path, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.and then check whether this node has "cm:destination" property,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.if this node has "cm:destination" property, then it is a link node ,A file Whose content is the url link of the target node will return to you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4.if this node dose not have "cm:destination" property, then it is a common node ,A temp file with a copy of the content of node will return to you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you want to return the&amp;nbsp; content of target node instead of url link of the target node,In my opoinon you should&amp;nbsp; customize a new filesystem driver class(for example extends org.alfresco.filesys.repo.ContentDiskDriver2),and override openFile method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In you openFile method implementation ,check node type,if it's your custom&amp;nbsp; link type, return the content of link target node instead of url link .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2014 02:42:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294123#M247253</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-05-03T02:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Return the content of an associated node when reading another</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294124#M247254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;kaynezhang,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;cite&amp;gt;if this node has "cm:destination" property, then it is a link node ,A file Whose content is the url link of the target node will return to you&amp;lt;/cite&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that this does not happen. I always get an InternetLink text file in return, like this one:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;[InternetShortcut]&lt;BR /&gt;URL=file://172.16.100.90/Alfresco/Sites/ifo/documentLibrary/Testsperren.xlsx&lt;SPAN class="line-numbers-rows"&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;BR /&gt;&lt;SPAN&gt;There seems to be some kind of dynamic handling here, because the IP address is replaced with the DNS hostname on some hosts. I guess I'll dig in the source code. Overwriting the ContentDiskDriver2's openFile meothd does not sound like anything that is easily maintainable. &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;— Eric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 11:09:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294124#M247254</guid>
      <dc:creator>technaton</dc:creator>
      <dc:date>2014-05-15T11:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Return the content of an associated node when reading another</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294125#M247255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have traced the source code before,In my opinion to implement your requirement,you should replace or extend ContentDiskDriver2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe I'm wrong and others have any other good solutions&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 16:44:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/return-the-content-of-an-associated-node-when-reading-another/m-p/294125#M247255</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-05-15T16:44:44Z</dc:date>
    </item>
  </channel>
</rss>

