<?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 to override Java class? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87395#M26347</link>
    <description>&lt;P&gt;Previous sollution does not seem to be working anymore...&lt;/P&gt;&lt;P&gt;However, when I create a&lt;/P&gt;&lt;PRE&gt;src/main/resources/alfresco/extension/subsystems/ActivitiesFeed/default/default/custom-activities-feed-context.xml&lt;/PRE&gt;&lt;P&gt;file, it works (is it a deprecated method?). There I can override only some beans, I do not have to override them all.&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/74255"&gt;@resplin&lt;/A&gt;&amp;nbsp;mentioned also 7years ago something about &lt;STRONG&gt;custom-activities-context.xml&amp;nbsp;&lt;/STRONG&gt;file but it does not have acess to the subsystem's beans.&lt;/P&gt;&lt;P&gt;I find it really sad that it is documented nowhere.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 09:55:16 GMT</pubDate>
    <dc:creator>upforsin</dc:creator>
    <dc:date>2021-10-26T09:55:16Z</dc:date>
    <item>
      <title>How to override ActivitiesFeed subsystem Java class?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87390#M26342</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to change a bit the &lt;EM&gt;FeedNotifier&lt;/EM&gt;. To achieve it I have to add a few lines of code to &lt;EM&gt;&lt;STRONG&gt;FeedTaskProcessor.java&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How Can I override this file?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm using dockerized Alfresco 6.1.2 and I tried to create a "&lt;EM&gt;FeedTaskProcessor&lt;/EM&gt;" class in&amp;nbsp; "&lt;EM&gt;org.alfresco.repo.activities.feed&lt;/EM&gt;" package in the "&lt;EM&gt;src/main/java"&lt;/EM&gt; path in the &lt;EM&gt;my-project-platform&lt;/EM&gt; project. But it does not work.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Dec 2019 23:40:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87390#M26342</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2019-12-07T23:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to override Java class?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87391#M26343</link>
      <description>&lt;P&gt;There should be a spring bean which declares this class in the jar artifact. You should declare this bean in your project, and subsitute their class implementation with your own modified class.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 08:50:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87391#M26343</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2019-12-08T08:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to override Java class?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87392#M26344</link>
      <description>&lt;P&gt;Thank you. There is indeed a file called &lt;A href="https://github.com/Alfresco/alfresco-repository/blob/master/src/main/resources/alfresco/subsystems/ActivitiesFeed/default/activities-feed-context.xml" target="_self" rel="nofollow noopener noreferrer"&gt;&lt;EM&gt;&lt;STRONG&gt;activities-feed-context.xml&lt;/STRONG&gt;&lt;/EM&gt;&lt;/A&gt; which includes this bean of my interest. But where should I put modified version of this file?&lt;/P&gt;&lt;P&gt;Originally it is in the "&lt;EM&gt;alfresco-repository/src/main/resources/alfresco/subsystems/ActivitiesFeed/default/&lt;/EM&gt;" path, should I put it in the "&lt;EM&gt;my-project-platform/src/main/resources/alfresco/subsystems/ActivitiesFeed/default/&lt;/EM&gt;" folder or maybe should I use the "&lt;STRONG&gt;extension&lt;/STRONG&gt;" directory and put it in the "&lt;EM&gt;my-project-platform/src/main/resources/extension/alfresco/subsystems/ActivitiesFeed/default/&lt;/EM&gt;" or maybe with other Spring beans in the "&lt;EM&gt;my-project-platform/src/main/resources/alfresco/module/my-project-platform/context&lt;/EM&gt;" ?&lt;/P&gt;&lt;P&gt;Sorry for that trivial question but I'm really lost with those paths&lt;/P&gt;&lt;P&gt;EDIT. I tried to put it in the "&lt;EM&gt;my-project-platform/src/main/resources/alfresco/extension/subsystems/ActivitiesFeed/default/activities-feed-context.xml&lt;/EM&gt;" but it does not work...&lt;/P&gt;&lt;P&gt;I created my own &lt;EM&gt;LocalFeedTaskProcessor&lt;/EM&gt;, &lt;EM&gt;LocalFeedGenerator&lt;/EM&gt; and &lt;EM&gt;FeedGenerator&lt;/EM&gt; classes and I replaced their paths in the bean's &lt;EM&gt;class&lt;/EM&gt; attribute inside the &lt;A href="https://github.com/Alfresco/alfresco-repository/blob/master/src/main/resources/alfresco/subsystems/ActivitiesFeed/default/activities-feed-context.xml" target="_self" rel="nofollow noopener noreferrer"&gt;&lt;EM&gt;&lt;STRONG&gt;activities-feed-context.xml&lt;/STRONG&gt;&lt;/EM&gt;&lt;/A&gt;. Why it does not work?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 10:27:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87392#M26344</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2019-12-08T10:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to override Java class?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87393#M26345</link>
      <description>&lt;P&gt;In first place I thought to override &lt;STRONG&gt;only&lt;/STRONG&gt; the affected beans, no the entire context file, in your project's bootstrap-context.xml file.&lt;/P&gt;&lt;P&gt;But being a subsystem's bean, you have to override the route to the original context file (that is, &lt;EM&gt;my-project-platform/src/main/resources/alfresco/subsystems/ActivitiesFeed/default/&lt;/EM&gt;), as extensions directory does not work, although I think it should be the place to override existing subsystem context files. I just checked a project where we override ooo subsystem context files, and we did not use extensions directory.&lt;/P&gt;&lt;P&gt;I don't know exactly which is the best practice for overriding subsystem's beans, the big ones of this forum could help you more than me at this, and I would be interested in understanding that too.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 11:34:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87393#M26345</guid>
      <dc:creator>narkuss</dc:creator>
      <dc:date>2019-12-08T11:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to override Java class?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87394#M26346</link>
      <description>&lt;P&gt;Thank you, it's working now &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/77972"&gt;@narkuss&lt;/A&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I don't know exactly which is the best practice for overriding subsystem's beans, the big ones of this forum could help you more than me at this, and I would be interested in understanding that too.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I would also really appreciate a short guide on this subject &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://connect.hyland.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Dec 2019 15:29:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87394#M26346</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2019-12-08T15:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to override Java class?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87395#M26347</link>
      <description>&lt;P&gt;Previous sollution does not seem to be working anymore...&lt;/P&gt;&lt;P&gt;However, when I create a&lt;/P&gt;&lt;PRE&gt;src/main/resources/alfresco/extension/subsystems/ActivitiesFeed/default/default/custom-activities-feed-context.xml&lt;/PRE&gt;&lt;P&gt;file, it works (is it a deprecated method?). There I can override only some beans, I do not have to override them all.&lt;/P&gt;&lt;P&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/74255"&gt;@resplin&lt;/A&gt;&amp;nbsp;mentioned also 7years ago something about &lt;STRONG&gt;custom-activities-context.xml&amp;nbsp;&lt;/STRONG&gt;file but it does not have acess to the subsystem's beans.&lt;/P&gt;&lt;P&gt;I find it really sad that it is documented nowhere.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 09:55:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-override-activitiesfeed-subsystem-java-class/m-p/87395#M26347</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2021-10-26T09:55:16Z</dc:date>
    </item>
  </channel>
</rss>

