use of org.ext.uberfire.social.activities.model.SocialPaged in project kie-wb-common by kiegroup.
the class SocialHomePageSidePresenter method onOpen.
@OnOpen
public void onOpen() {
final SocialPaged socialPaged = new SocialPaged(5);
socialUserRepositoryAPI.call(new RemoteCallback<SocialUser>() {
public void callback(SocialUser socialUser) {
SimpleSocialTimelineWidgetModel model = new SimpleSocialTimelineWidgetModel(socialUser, new UserTimeLineFileChangesPredicate(), placeManager, socialPaged).withOnlyMorePagination(new Next() {
{
setText(Constants.INSTANCE.PaginationMore());
}
}).withIcons(iconLocator.getResourceTypes()).withLinkCommand(generateLinkCommand());
view.setupWidget(model);
}
}).findSocialUser(loggedUser.getIdentifier());
}
use of org.ext.uberfire.social.activities.model.SocialPaged in project kie-wb-common by kiegroup.
the class UserHomePageMainPresenter method setupUser.
private void setupUser(final String username) {
final SocialPaged socialPaged = new SocialPaged(5);
socialUserRepositoryAPI.call(new RemoteCallback<SocialUser>() {
@Override
public void callback(SocialUser socialUser) {
if (isThisUserStillCurrentActiveUser(socialUser)) {
generateConnectionsList(socialUser);
setupMainWidget(socialUser, socialPaged);
}
}
}).findSocialUser(username);
}
use of org.ext.uberfire.social.activities.model.SocialPaged 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;
}
Aggregations