use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class UserSessionController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
public void event(UserRequest ureq, Controller source, Event event) {
if (source == tableCtr) {
if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
TableEvent te = (TableEvent) event;
int selRow = te.getRowId();
// session info (we only have authenticated sessions here
UserSessionView usessw = (UserSessionView) tableCtr.getTableDataModel().getObject(selRow);
if ("sess.chat".equals(te.getActionId())) {
Buddy buddy = imService.getBuddyById(usessw.getIdentityKey());
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, buddy);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
} else if ("sess.details".equals(te.getActionId())) {
UserSession usess = usessw.getUserSession();
UserSessionDetailsController detailsCtrl = new UserSessionDetailsController(ureq, getWindowControl(), usess);
listenTo(detailsCtrl);
String username = usess.getIdentity() == null ? "-" : UserManager.getInstance().getUserDisplayName(usess.getIdentity());
stackController.pushController(username, detailsCtrl);
}
}
}
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class MembersAvatarDisplayRunController method doOpenChat.
private void doOpenChat(Member member, UserRequest ureq) {
Buddy buddy = imService.getBuddyById(member.getKey());
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, buddy);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method launchChat.
private void launchChat(UserRequest ureq) {
boolean vip = reSecurity.isCourseCoach() || reSecurity.isGroupCoach() || reSecurity.isEntryAdmin();
ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
OpenInstantMessageEvent event = new OpenInstantMessageEvent(ureq, course, course.getCourseTitle(), vip);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(event, InstantMessagingService.TOWER_EVENT_ORES);
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class HomePageDisplayController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
*/
public void event(UserRequest ureq, Component source, Event event) {
if (imLink == source) {
Buddy buddy = (Buddy) imLink.getUserObject();
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, buddy);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
}
}
use of org.olat.instantMessaging.OpenInstantMessageEvent in project OpenOLAT by OpenOLAT.
the class AbstractMemberListController method doIm.
/**
* Open private chat
* @param ureq
* @param member
*/
protected void doIm(UserRequest ureq, MemberView member) {
Buddy buddy = imService.getBuddyById(member.getIdentityKey());
OpenInstantMessageEvent e = new OpenInstantMessageEvent(ureq, buddy);
ureq.getUserSession().getSingleUserEventCenter().fireEventToListenersOf(e, InstantMessagingService.TOWER_EVENT_ORES);
}
Aggregations