use of org.ext.uberfire.social.activities.model.SocialUser 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.SocialUser 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.SocialUser in project kie-wb-common by kiegroup.
the class UserHomePageSidePresenter method createLoggedUserActionLink.
private void createLoggedUserActionLink(final SocialUser socialUser, final Button followUnfollow) {
followUnfollow.setText(Constants.INSTANCE.Edit());
followUnfollow.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
editUserForm.show(socialUser, new ParameterizedCommand<SocialUser>() {
@Override
public void execute(SocialUser socialUser) {
socialUserService.call().update(socialUser);
refreshPage(socialUser.getUserName());
userEditedEvent.fire(new UserEditedEvent(socialUser.getUserName()));
}
});
}
});
}
use of org.ext.uberfire.social.activities.model.SocialUser in project kie-wb-common by kiegroup.
the class UserHomePageSidePresenter method refreshCacheAndGeneratesSelectEvent.
void refreshCacheAndGeneratesSelectEvent(final String userName) {
socialUserRepositoryAPI.call(new RemoteCallback<SocialUser>() {
public void callback(final SocialUser user) {
users.put(user.getUserName(), user);
selectedEvent.fire(new UserHomepageSelectedEvent(userName));
}
}).findSocialUser(userName);
}
Aggregations