Search in sources :

Example 1 with ForbiddenCourseSiteController

use of org.olat.course.site.ui.ForbiddenCourseSiteController in project OpenOLAT by OpenOLAT.

the class AbstractSiteInstance method getAlternativeController.

protected MainLayoutController getAlternativeController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
    String altControllerId = config.getAlternativeControllerBeanId();
    MainLayoutController c;
    if (StringHelper.containsNonWhitespace(altControllerId)) {
        AutoCreator creator = (AutoCreator) CoreSpringFactory.getBean(altControllerId);
        Controller ac = creator.createController(ureq, wControl);
        if (ac instanceof MainLayoutController) {
            c = (MainLayoutController) ac;
        } else {
            c = new LayoutMain3ColsController(ureq, wControl, ac);
        }
    } else {
        Controller ctrl = new ForbiddenCourseSiteController(ureq, wControl);
        c = new LayoutMain3ColsController(ureq, wControl, ctrl);
    }
    return c;
}
Also used : AutoCreator(org.olat.core.gui.control.creator.AutoCreator) ForbiddenCourseSiteController(org.olat.course.site.ui.ForbiddenCourseSiteController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) MainLayoutController(org.olat.core.gui.control.generic.layout.MainLayoutController) ForbiddenCourseSiteController(org.olat.course.site.ui.ForbiddenCourseSiteController) Controller(org.olat.core.gui.control.Controller) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) MainLayoutController(org.olat.core.gui.control.generic.layout.MainLayoutController)

Example 2 with ForbiddenCourseSiteController

use of org.olat.course.site.ui.ForbiddenCourseSiteController in project openolat by klemens.

the class AbstractSiteInstance method getAlternativeController.

protected MainLayoutController getAlternativeController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
    String altControllerId = config.getAlternativeControllerBeanId();
    MainLayoutController c;
    if (StringHelper.containsNonWhitespace(altControllerId)) {
        AutoCreator creator = (AutoCreator) CoreSpringFactory.getBean(altControllerId);
        Controller ac = creator.createController(ureq, wControl);
        if (ac instanceof MainLayoutController) {
            c = (MainLayoutController) ac;
        } else {
            c = new LayoutMain3ColsController(ureq, wControl, ac);
        }
    } else {
        Controller ctrl = new ForbiddenCourseSiteController(ureq, wControl);
        c = new LayoutMain3ColsController(ureq, wControl, ctrl);
    }
    return c;
}
Also used : AutoCreator(org.olat.core.gui.control.creator.AutoCreator) ForbiddenCourseSiteController(org.olat.course.site.ui.ForbiddenCourseSiteController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) MainLayoutController(org.olat.core.gui.control.generic.layout.MainLayoutController) ForbiddenCourseSiteController(org.olat.course.site.ui.ForbiddenCourseSiteController) Controller(org.olat.core.gui.control.Controller) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) MainLayoutController(org.olat.core.gui.control.generic.layout.MainLayoutController)

Aggregations

LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)2 Controller (org.olat.core.gui.control.Controller)2 AutoCreator (org.olat.core.gui.control.creator.AutoCreator)2 MainLayoutController (org.olat.core.gui.control.generic.layout.MainLayoutController)2 ForbiddenCourseSiteController (org.olat.course.site.ui.ForbiddenCourseSiteController)2