if (event.getCommand().startsWith(RepositoryAddController.ACTION_ADD_PREFIX)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), event.getCommand());
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_CREATECOURSE)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_COURSE);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_CREATETEST)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_TEST);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_CREATESURVEY)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_SURVEY);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_CREATESHAREDFOLDER)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_SHAREDFOLDER);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_WIKI)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_WIKI);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_PODCAST)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_PODCAST);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_BLOG)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_BLOG);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_NEW_GLOSSARY)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_GLOSSARY);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_DELETE_RESOURCE)) {
removeAsListenerAndDispose(deleteTabPaneCtr);
deleteTabPaneCtr = new TabbedPaneController(urequest, getWindowControl());
listenTo(deleteTabPaneCtr);
mainPanel.setContent(deleteTabPaneCtr.getInitialComponent());
} else if (event.getCommand().equals(ACTION_NEW_CREATECP)) {
removeAsListenerAndDispose(addController);
addController = new RepositoryAddController(urequest, getWindowControl(), RepositoryAddController.ACTION_NEW_CP);
listenTo(addController);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), translate("close"), addController.getInitialComponent());
listenTo(cmc);
cmc.activate();
return;
} else if (event.getCommand().equals(ACTION_ADD_OWNERS)) {
removeAsListenerAndDispose(wc);
wc = new WizardAddOwnersController(urequest, getWindowControl());
wc.addControllerListener(this);
cmc = new CloseableModalController(getWindowControl(), translate("close"), wc.getInitialComponent());
cmc.activate();
return;
}
}