<?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: Checking node existence on behaviour execution: nodeService.exists(nodeRef) vs status.isDeleted() in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302793#M255923</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Or do you think guys I should create a separate forum thread for this? The question itself is hopefully clear.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Aug 2015 07:46:24 GMT</pubDate>
    <dc:creator>p_bodnar</dc:creator>
    <dc:date>2015-08-22T07:46:24Z</dc:date>
    <item>
      <title>Checking node existence on behaviour execution: nodeService.exists(nodeRef) vs status.isDeleted()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302790#M255920</link>
      <description>Hi all, I've tried to search for this topic in the forum with no luck, so forgive me if it has already been asked and please point me to the post/s where I can find any information that could help me. I was having this doubt: when creating a Behaviour bound to onUpdateNodePolicy is it safer to check</description>
      <pubDate>Thu, 25 Jul 2013 12:49:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302790#M255920</guid>
      <dc:creator>eureka</dc:creator>
      <dc:date>2013-07-25T12:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Checking node existence on behaviour execution: nodeService.exists(nodeRef) vs status.isDeleted()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302791#M255921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You shouldn't need to worry about being called via onUpdateNode for a deleted node. Unless there's something wierd going on like the node being deleted by other policies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect you want the exists call withing a policy callback.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The isStatus call allows you to distinguish between a node that has never existed and one that has been deleted.&amp;nbsp; Its main use is for async tracking.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 15:20:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302791#M255921</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2013-07-25T15:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Checking node existence on behaviour execution: nodeService.exists(nodeRef) vs status.isDeleted()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302792#M255922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to ask why one would need to use exists() and isDeleted() &amp;lt;strong&amp;gt;together&amp;lt;/strong&amp;gt; in one condition like in the case of &amp;lt;a href="&lt;/SPAN&gt;&lt;A href="https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V5.0.d/root/modules/wcmquickstart/wcmquickstartmodule/source/java/org/alfresco/module/org_alfresco_module_wcmquickstart/util/SiteHelper.java" rel="nofollow noopener noreferrer"&gt;https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V5.0.d/root/modules/wcmquickstart/wcmquickstartmodule/source/java/org/alfresco/module/org_alfresco_module_wcmquickstart/util/SiteHelper.java&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;SiteHelper.java&amp;lt;/a&amp;gt; which contains this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// ALF-18325 fix, check that site is not null, exists, is not deleted and is not being deleted&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (siteInfo != null &amp;amp;&amp;amp; nodeService.exists(shareSiteId) &amp;amp;&amp;amp; !nodeService.getNodeStatus(shareSiteId).isDeleted()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;&amp;amp; !nodeService.hasAspect(shareSiteId, ContentModel.ASPECT_PENDING_DELETE))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From the various implementations of the NodeService methods, one can see that exists() in fact includes the logic from getNodeStatus().isDeleted() and in the case of AVMNodeService the getNodeStatus() even calls exists() to find out the deleted status! So as you can see, using these two functions &amp;lt;strong&amp;gt;together&amp;lt;/strong&amp;gt; seems pretty useless. Am I right, or did I overlook something?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 14:59:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302792#M255922</guid>
      <dc:creator>p_bodnar</dc:creator>
      <dc:date>2015-07-15T14:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Checking node existence on behaviour execution: nodeService.exists(nodeRef) vs status.isDeleted()</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302793#M255923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Or do you think guys I should create a separate forum thread for this? The question itself is hopefully clear.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2015 07:46:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/checking-node-existence-on-behaviour-execution-nodeservice/m-p/302793#M255923</guid>
      <dc:creator>p_bodnar</dc:creator>
      <dc:date>2015-08-22T07:46:24Z</dc:date>
    </item>
  </channel>
</rss>

