<?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: How can add mandatory aspect on cm:content type on runtime in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-can-add-mandatory-aspect-on-cm-content-type-on-runtime/m-p/76339#M24149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create policy/behavior&amp;nbsp;of&amp;nbsp;&lt;SPAN style="color: #58595b; background-color: #ffffff;"&gt;OnCreateNodePolicy&lt;/SPAN&gt;&lt;SPAN style="color: #58595b;"&gt;&amp;nbsp; and add&amp;nbsp; aspect on created node.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://docs.alfresco.com/6.0/references/dev-extension-points-behaviors.html" title="http://docs.alfresco.com/6.0/references/dev-extension-points-behaviors.html" rel="nofollow noopener noreferrer"&gt;Behaviors/Policies | Alfresco Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;Contcentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2019 15:21:59 GMT</pubDate>
    <dc:creator>sp2</dc:creator>
    <dc:date>2019-01-23T15:21:59Z</dc:date>
    <item>
      <title>How can add mandatory aspect on cm:content type on runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-can-add-mandatory-aspect-on-cm-content-type-on-runtime/m-p/76338#M24148</link>
      <description>Hi i need to add "mandatory aspect" on the default alfresco type "cm:content" on runtime without touching the xml model configurations.So the solution i'm using now is the classic create a custom type with parent "cm:content" like in the following code:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;types&amp;gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;type name="up:Uplo</description>
      <pubDate>Tue, 22 Jan 2019 10:04:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-can-add-mandatory-aspect-on-cm-content-type-on-runtime/m-p/76338#M24148</guid>
      <dc:creator>AlfrescoZZZ</dc:creator>
      <dc:date>2019-01-22T10:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can add mandatory aspect on cm:content type on runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-can-add-mandatory-aspect-on-cm-content-type-on-runtime/m-p/76339#M24149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create policy/behavior&amp;nbsp;of&amp;nbsp;&lt;SPAN style="color: #58595b; background-color: #ffffff;"&gt;OnCreateNodePolicy&lt;/SPAN&gt;&lt;SPAN style="color: #58595b;"&gt;&amp;nbsp; and add&amp;nbsp; aspect on created node.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://docs.alfresco.com/6.0/references/dev-extension-points-behaviors.html" title="http://docs.alfresco.com/6.0/references/dev-extension-points-behaviors.html" rel="nofollow noopener noreferrer"&gt;Behaviors/Policies | Alfresco Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;Contcentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 15:21:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-can-add-mandatory-aspect-on-cm-content-type-on-runtime/m-p/76339#M24149</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2019-01-23T15:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can add mandatory aspect on cm:content type on runtime</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-can-add-mandatory-aspect-on-cm-content-type-on-runtime/m-p/76340#M24150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As &lt;B&gt;Sanjay Bandhniya&lt;/B&gt;‌ said, the most consistent way is to create a binding&amp;nbsp;between your new aspect&amp;nbsp;and your&amp;nbsp;type (or another aspect) during the creation of a new node against the repo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, there is an alternative way that strongly depends on how you are building the space tree structure for your contents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also configure a rule on a space&amp;nbsp;that includes&amp;nbsp;the "Add Aspect" action for any new content dropped in the space. You can also select the domain of contents in the space that should be involved, for example you can consider only contents with specific types, property values or that have any other aspects. This will help you on implementing your decoration policy for any type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only when these conditions are validated then the aspect will be added at runtime as a decoration for the node just arrived in the space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the following page from the documentation for creating a new rule:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://docs.alfresco.com/5.1/tasks/library-folder-rules-define-create.html" title="http://docs.alfresco.com/5.1/tasks/library-folder-rules-define-create.html" rel="nofollow noopener noreferrer"&gt;Creating a rule | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest to try this method because it is very quick and you don't need to implement in Java your own behaviors.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 16:46:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-can-add-mandatory-aspect-on-cm-content-type-on-runtime/m-p/76340#M24150</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2019-01-23T16:46:21Z</dc:date>
    </item>
  </channel>
</rss>

