<?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 add a aspect to a folder to monitor content creation in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-a-aspect-to-a-folder-to-monitor-content-creation/m-p/252815#M205945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I want to create an aspect that can be applied to a given folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This aspect's purpose is to monitor the content creation inside the applied folder. Which means I tried to define some behavior in the aspect to fire my custom logic when content is created inside the folder. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But my test code found that the we can't get event when files are created in a aspect allied folder. When I create a file under the folder, only the "beforeUpdateNode" event is triggered, but other event doesn't get the call back. I assumed that the "onCreateChildAssociation" will be triggered…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We want to find a way to monitor the created file in a folder through add behavior through aspect, please help me if you know how to do this, thanks a lot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Nov 2012 07:17:47 GMT</pubDate>
    <dc:creator>silverhoof</dc:creator>
    <dc:date>2012-11-26T07:17:47Z</dc:date>
    <item>
      <title>How to add a aspect to a folder to monitor content creation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-a-aspect-to-a-folder-to-monitor-content-creation/m-p/252815#M205945</link>
      <description>I want to create an aspect that can be applied to a given folder.This aspect's purpose is to monitor the content creation inside the applied folder. Which means I tried to define some behavior in the aspect to fire my custom logic when content is created inside the folder. But my test code found tha</description>
      <pubDate>Mon, 26 Nov 2012 07:17:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-add-a-aspect-to-a-folder-to-monitor-content-creation/m-p/252815#M205945</guid>
      <dc:creator>silverhoof</dc:creator>
      <dc:date>2012-11-26T07:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a aspect to a folder to monitor content creation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-add-a-aspect-to-a-folder-to-monitor-content-creation/m-p/252816#M205946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You should be fine to use onCreateChildAssociation()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you register the behaviour with the policyComponent remember that you need to bind to the association and not the class i.e it should read:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;this.policyComponent.bindAssociationBehaviour(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateChildAssociation"), &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;YourModel.YOUR_ASPECT, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ContentModel.ASSOC_CONTAINS,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;new JavaBehaviour(this, "onCreateChildAssociation"));&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;NOT&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;this.policyComponent.bindClassBehaviour(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateChildAssociation"),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YourModel.YOUR_ASPECT,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new JavaBehaviour(this, "onCreateChildAssociation"));&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, something to think about when using onCreateChildAssociation is that if a file/folder is renamed, then this event it triggered. But these events can be filtered out if need be.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 17:27:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-add-a-aspect-to-a-folder-to-monitor-content-creation/m-p/252816#M205946</guid>
      <dc:creator>mikemars</dc:creator>
      <dc:date>2012-11-28T17:27:33Z</dc:date>
    </item>
  </channel>
</rss>

