private void handleTreeActions(UserRequest ureq, String cmd) {
// release edit lock if available
removeAsListenerAndDispose(bgEditCntrllr);
bgEditCntrllr = null;
CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
// dispose current tool controller if available except for IM which should be available even while changing collabtool
if (collabToolCtr instanceof InstantMessagingGroupChatController) {
//
} else {
removeAsListenerAndDispose(collabToolCtr);
}
// init new controller according to user click
if (ACTIVITY_MENUSELECT_OVERVIEW.equals(cmd)) {
// root node clicked display overview
mainPanel.setContent(main);
} else if (ACTIVITY_MENUSELECT_FORUM.equals(cmd)) {
addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFORUM, OlatResourceableType.forum));
SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFORUM);
WindowControl bwControl = getWindowControl();
// calculate the new businesscontext for the forum clicked
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFORUM);
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);
collabToolCtr = collabTools.createForumController(ureq, bwControl, isAdmin, ureq.getUserSession().getRoles().isGuestOnly(), sc);
listenTo(collabToolCtr);
mainPanel.setContent(collabToolCtr.getInitialComponent());
} else if (ACTIVITY_MENUSELECT_CHAT.equals(cmd)) {
collabToolCtr = collabTools.createChatController(ureq, getWindowControl(), this.businessGroup.getName());
mainPanel.setContent(collabToolCtr.getInitialComponent());
} else if (ACTIVITY_MENUSELECT_CALENDAR.equals(cmd)) {
addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLCAL, OlatResourceableType.calendar));
WindowControl bwControl = getWindowControl();
// calculate the new businesscontext for the forum clicked
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLCAL);
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);
collabToolCtr = collabTools.createCalendarController(ureq, bwControl, this.businessGroup, isAdmin);
listenTo(collabToolCtr);
mainPanel.setContent(collabToolCtr.getInitialComponent());
} else if (ACTIVITY_MENUSELECT_INFORMATION.equals(cmd)) {
collabToolCtr = collabTools.createNewsController(ureq, getWindowControl());
listenTo(collabToolCtr);
mainPanel.setContent(collabToolCtr.getInitialComponent());
} else if (ACTIVITY_MENUSELECT_FOLDER.equals(cmd)) {
addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFOLDER, OlatResourceableType.sharedFolder));
SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFOLDER);
WindowControl bwControl = getWindowControl();
// calculate the new businesscontext for the forum clicked
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFOLDER);
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);
collabToolCtr = collabTools.createFolderController(ureq, bwControl, sc);
listenTo(collabToolCtr);
mainPanel.setContent(collabToolCtr.getInitialComponent());
} else if (ACTIVITY_MENUSELECT_MEMBERSLIST.equals(cmd)) {
doShowMembers(ureq);
} else if (ACTIVITY_MENUSELECT_CONTACTFORM.equals(cmd)) {
doContactForm(ureq);
} else if (ACTIVITY_MENUSELECT_ADMINISTRATION.equals(cmd)) {
doAdministration(ureq);
} else if (ACTIVITY_MENUSELECT_SHOW_RESOURCES.equals(cmd)) {
doShowResources(ureq);
} else if (ACTIVITY_MENUSELECT_WIKI.equals(cmd)) {
addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLWIKI, OlatResourceableType.wiki));
WindowControl bwControl = getWindowControl();
// calculate the new businesscontext for the wiki clicked
ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLWIKI);
bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapWikiOres(ce.getOLATResourceable()));
collabToolCtr = collabTools.createWikiController(ureq, bwControl);
listenTo(collabToolCtr);
mainPanel.setContent(collabToolCtr.getInitialComponent());
}
}