Search in sources :

Example 1 with PagedSocialQuery

use of org.ext.uberfire.social.activities.model.PagedSocialQuery in project kie-wb-common by kiegroup.

the class SocialTimelineRulesQuery method getNEventsFromEachType.

@Override
public List<SocialActivitiesEvent> getNEventsFromEachType(int numberOfEvents, String... typeNames) {
    List<SocialActivitiesEvent> events = new ArrayList<>();
    for (String type : typeNames) {
        PagedSocialQuery query = socialTypeTimelinePagedRepositoryAPI.getEventTimeline(type, new SocialPaged(numberOfEvents), new HashMap());
        events.addAll(query.socialEvents());
    }
    return events;
}
Also used : SocialPaged(org.ext.uberfire.social.activities.model.SocialPaged) HashMap(java.util.HashMap) SocialActivitiesEvent(org.ext.uberfire.social.activities.model.SocialActivitiesEvent) ArrayList(java.util.ArrayList) PagedSocialQuery(org.ext.uberfire.social.activities.model.PagedSocialQuery)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 PagedSocialQuery (org.ext.uberfire.social.activities.model.PagedSocialQuery)1 SocialActivitiesEvent (org.ext.uberfire.social.activities.model.SocialActivitiesEvent)1 SocialPaged (org.ext.uberfire.social.activities.model.SocialPaged)1