<?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 How to create a link between external object and documents in Alfresco? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-link-between-external-object-and-documents-in/m-p/280108#M233238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to everybody!&lt;/P&gt;&lt;P&gt;I'm a newcomer in alfresco. I use CMIS to work with Alfresco repository in my java application.&lt;/P&gt;&lt;P&gt;Have anybody encountered with the issue when you need to create a link or reference between some external object and corresponding documents in alfresco repository?&lt;/P&gt;&lt;P&gt;For instance, an external object could be a record in database, which describes, for example, some product. And in alfresco we have commercial documents which should be linked with this product.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2016 07:36:18 GMT</pubDate>
    <dc:creator>tis</dc:creator>
    <dc:date>2016-10-25T07:36:18Z</dc:date>
    <item>
      <title>How to create a link between external object and documents in Alfresco?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-link-between-external-object-and-documents-in/m-p/280108#M233238</link>
      <description>Hello to everybody!I'm a newcomer in alfresco. I use CMIS to work with Alfresco repository in my java application.Have anybody encountered with the issue when you need to create a link or reference between some external object and corresponding documents in alfresco repository?For instance, an exter</description>
      <pubDate>Tue, 25 Oct 2016 07:36:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-link-between-external-object-and-documents-in/m-p/280108#M233238</guid>
      <dc:creator>tis</dc:creator>
      <dc:date>2016-10-25T07:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a link between external object and documents in Alfresco?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-link-between-external-object-and-documents-in/m-p/280109#M233239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For each product you can create a dedicated space in Alfresco where you drop contents related to the product.&lt;/P&gt;&lt;P&gt;Then you can bind in your external database the node reference of the product space in Alfresco.&lt;/P&gt;&lt;P&gt;The node reference (NodeRef) is the unique identifier for each content (node) in Alfresco and for any content you can see its own noderef in the URL when you try to see the details of a node. A NodeRef consists of three sections:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store Protocol + Store Identifier (or name) + UUID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of node reference could be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;workspace://SpacesStore/&lt;CODE&gt;e8137d5d-cf50-41c4-844a-ec98a44ee73a&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way you can execute CMIS SQL query for the product by NodeRef as the following:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="_jivemacro_uid_1477563635329838 jive_macro_code jive_text_macro" data-hasrefreshed="true" data-renderedposition="284_8_1332_49" jivemacro_uid="_1477563635329838" modifiedtitle="true"&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;FROM cmis:document&lt;/P&gt;&lt;P&gt;WHERE cmis:objectid = '&lt;SPAN style="font-family: monospace;"&gt;e8137d5d-cf50-41c4-844a-ec98a44ee73a&lt;/SPAN&gt;'&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way is to get the space using the Session object of the OpenCMIS library:&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14775639137636926" data-hasrefreshed="true" data-renderedposition="383_8_1332_16" jivemacro_uid="_14775639137636926" modifiedtitle="true"&gt;&lt;P&gt;Folder folder = session.getObject(uuid);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can get all the children of the result node:&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14775640598174891 jive_text_macro" data-hasrefreshed="true" data-renderedposition="449_8_1332_64" jivemacro_uid="_14775640598174891"&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Hack, Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; background-color: #fcfdff;"&gt;Folder folder = session.getObject(uuid);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hljs-keyword" style="color: #333333; font-weight: bold; font-family: Hack, Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; background-color: #fcfdff;"&gt;for &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-family: Hack, Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; background-color: #fcfdff;"&gt;(CmisObject child: folder.getChildren()) &lt;/SPAN&gt;&lt;SPAN style="background-color: #fcfdff; color: #333333; font-family: Hack, Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #fcfdff; color: #333333; font-family: Hack, Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; System.out.println(child.getName());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #fcfdff; color: #333333; font-family: Hack, Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 10:28:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-create-a-link-between-external-object-and-documents-in/m-p/280109#M233239</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2016-10-27T10:28:12Z</dc:date>
    </item>
  </channel>
</rss>

