Search in sources :

Example 16 with ChiefController

use of org.olat.core.gui.control.ChiefController in project OpenOLAT by OpenOLAT.

the class UserInterestsElement method doEdit.

private void doEdit(UserRequest ureq) {
    ChiefController chief = Windows.getWindows(ureq).getChiefController();
    WindowControl wControl = chief.getWindowControl();
    if (wControl != null) {
        List<UserInterestsCategory> availableUserInterests = UserInterestsPropertyHandler.loadAvailableUserInterests();
        userInterestsController = new UserInterestsController(ureq, wControl, getSelectedInterestsIDs(), availableUserInterests);
        userInterestsController.addControllerListener(this);
        String title = getTranslator().translate("userinterests.title");
        modalController = new CloseableModalController(wControl, "close", userInterestsController.getInitialComponent(), true, title);
        modalController.activate();
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ChiefController(org.olat.core.gui.control.ChiefController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 17 with ChiefController

use of org.olat.core.gui.control.ChiefController in project OpenOLAT by OpenOLAT.

the class OAuthDispatcher method error.

private void error(UserRequest ureq, String message) {
    StringBuilder sb = new StringBuilder();
    sb.append("<h4><i class='o_icon o_icon-fw o_icon_error'> </i>");
    sb.append(translate(ureq, "error.title"));
    sb.append("</h4><p>");
    sb.append(message);
    sb.append("</p>");
    ChiefController msgcc = new MessageWindowController(ureq, sb.toString());
    msgcc.getWindow().dispatchRequest(ureq, true);
}
Also used : ChiefController(org.olat.core.gui.control.ChiefController) MessageWindowController(org.olat.core.commons.fullWebApp.MessageWindowController)

Example 18 with ChiefController

use of org.olat.core.gui.control.ChiefController in project OpenOLAT by OpenOLAT.

the class DMZContentControllerCreator method createController.

@Override
public Controller createController(UserRequest ureq, WindowControl lwControl) {
    DmzBFWCParts dmzSitesAndNav = new DmzBFWCParts();
    AutoCreator contentControllerCreator = new AutoCreator();
    contentControllerCreator.setClassName(LoginAuthprovidersController.class.getName());
    dmzSitesAndNav.setContentControllerCreator(contentControllerCreator);
    ChiefController cc = new BaseFullWebappController(ureq, dmzSitesAndNav);
    cc.addBodyCssClass("o_dmz");
    Windows.getWindows(ureq.getUserSession()).setChiefController(cc);
    return cc;
}
Also used : AutoCreator(org.olat.core.gui.control.creator.AutoCreator) BaseFullWebappController(org.olat.core.commons.fullWebApp.BaseFullWebappController) ChiefController(org.olat.core.gui.control.ChiefController)

Example 19 with ChiefController

use of org.olat.core.gui.control.ChiefController in project openolat by klemens.

the class UserInterestsElement method doEdit.

private void doEdit(UserRequest ureq) {
    ChiefController chief = Windows.getWindows(ureq).getChiefController();
    WindowControl wControl = chief.getWindowControl();
    if (wControl != null) {
        List<UserInterestsCategory> availableUserInterests = UserInterestsPropertyHandler.loadAvailableUserInterests();
        userInterestsController = new UserInterestsController(ureq, wControl, getSelectedInterestsIDs(), availableUserInterests);
        userInterestsController.addControllerListener(this);
        String title = getTranslator().translate("userinterests.title");
        modalController = new CloseableModalController(wControl, "close", userInterestsController.getInitialComponent(), true, title);
        modalController.activate();
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ChiefController(org.olat.core.gui.control.ChiefController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 20 with ChiefController

use of org.olat.core.gui.control.ChiefController in project openolat by klemens.

the class ShibbolethDispatcher method authorization.

private boolean authorization(HttpServletRequest req, HttpServletResponse resp, ShibbolethAttributes shibbolethAttibutes) {
    boolean authorized = false;
    if (shibbolethModule.isAccessControlByAttributes()) {
        if (StringHelper.containsNonWhitespace(shibbolethModule.getAttribute1()) && StringHelper.containsNonWhitespace(shibbolethModule.getAttribute1Values())) {
            authorized |= authorization(shibbolethModule.getAttribute1(), shibbolethModule.getAttribute1Values(), shibbolethAttibutes);
        }
        if (StringHelper.containsNonWhitespace(shibbolethModule.getAttribute2()) && StringHelper.containsNonWhitespace(shibbolethModule.getAttribute2Values())) {
            authorized |= authorization(shibbolethModule.getAttribute2(), shibbolethModule.getAttribute2Values(), shibbolethAttibutes);
        }
    } else {
        authorized = true;
    }
    if (!authorized) {
        UserRequest ureq = new UserRequestImpl(ShibbolethDispatcher.PATH_SHIBBOLETH, req, resp);
        String userMsg = translator.translate("error.shibboleth.not.authorized");
        ChiefController msgcc = MessageWindowController.createMessageChiefController(ureq, null, userMsg, null);
        msgcc.getWindow().dispatchRequest(ureq, true);
    }
    return authorized;
}
Also used : ChiefController(org.olat.core.gui.control.ChiefController) UserRequest(org.olat.core.gui.UserRequest) UserRequestImpl(org.olat.core.gui.UserRequestImpl)

Aggregations

ChiefController (org.olat.core.gui.control.ChiefController)58 UserRequest (org.olat.core.gui.UserRequest)10 UserRequestImpl (org.olat.core.gui.UserRequestImpl)10 IOException (java.io.IOException)8 Window (org.olat.core.gui.components.Window)8 InvalidRequestParameterException (org.olat.core.gui.components.form.flexible.impl.InvalidRequestParameterException)8 WindowControl (org.olat.core.gui.control.WindowControl)8 OLATRuntimeException (org.olat.core.logging.OLATRuntimeException)8 ArrayList (java.util.ArrayList)6 BaseFullWebappController (org.olat.core.commons.fullWebApp.BaseFullWebappController)6 StringOutput (org.olat.core.gui.render.StringOutput)6 URLBuilder (org.olat.core.gui.render.URLBuilder)6 AssertException (org.olat.core.logging.AssertException)6 UserSession (org.olat.core.util.UserSession)6 HttpSession (javax.servlet.http.HttpSession)4 BaseFullWebappControllerParts (org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts)4 Windows (org.olat.core.gui.Windows)4 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)4 RedirectMediaResource (org.olat.core.gui.media.RedirectMediaResource)4 ContextEntry (org.olat.core.id.context.ContextEntry)4