Override SocialActivitiesQueryHelper

Jamie Sammons, modified 3 Years ago. New Member Posts: 4 Join Date: 5/17/22 Recent Posts
I am trying to override SocialActivitiesQueryHelper service from com.liferay.social.activities.web.internal.util package.

A new module is created and the service ranking is set so that my new service overrides the default one.
@Component(
    immediate = true,
    property = {
        "service.ranking:Integer=100"
    },
    service = SocialActivitiesQueryHelper.class)

public class MyCustomQueryHelper extends SocialActivitiesQueryHelper {

     @Override 

    public List<SocialActivitySet> getSocialActivitySets(args){

    // Do my changes here

    }

I then deploy my new module. Somehow, the getSocialActivitySets() from MyCustomQueryHelper service is not being triggered/called.

Is this the correct approach? I would be grateful, if anyone can point out what I am doing wrong. Or I am open to suggestions, if there is a better way. Thanks a lot in advance.