Examples of ChiefController


Examples of org.olat.core.gui.control.ChiefController

    // do logging
    ThreadLocalUserActivityLogger.log(OlatLoggingAction.OLAT_LOGIN, AuthHelper.class, LoggingResourceable.wrap(identity));
   
    // brasato:: fix it
    // successfull login, reregister window
    ChiefController occ;
    if(ureq.getUserSession().getRoles().isGuestOnly()){
      occ = createGuestHome(ureq);
    }else{
      occ = createAuthHome(ureq);
    }
 
    Window currentWindow = occ.getWindow();
    currentWindow.setUriPrefix(WebappHelper.getServletContextPath() + DispatcherAction.PATH_AUTHENTICATED);
    Windows.getWindows(ureq).registerWindow(currentWindow);
 
    // redirect to AuthenticatedDispatcher
    // IMPORTANT: windowID has changed due to re-registering current window -> do not use ureq.getWindowID() to build new URLBuilder.
View Full Code Here

Examples of org.olat.core.gui.control.ChiefController

        BaseFullWebappControllerParts guestSitesAndNav = new GuestBFWCParts();
        return new BaseFullWebappController(lureq, lwControl, guestSitesAndNav );
      }
    });

    ChiefController cc = bbc.createChiefController(ureq);
    Windows.getWindows(ureq.getUserSession()).setAttribute("AUTHCHIEFCONTROLLER", cc);
    Tracing.logDebug("set session-attribute 'AUTHCHIEFCONTROLLER'", AuthHelper.class);
    return cc;
  }
View Full Code Here

Examples of org.olat.core.gui.control.ChiefController

        BaseFullWebappControllerParts authSitesAndNav = new AuthBFWCParts();
        return new BaseFullWebappController(lureq, lwControl, authSitesAndNav );
      }
    });

    ChiefController cc = bbc.createChiefController(ureq);
    Windows.getWindows(ureq.getUserSession()).setAttribute("AUTHCHIEFCONTROLLER", cc);
    Tracing.logDebug("set session-attribute 'AUTHCHIEFCONTROLLER'", AuthHelper.class);
    return cc;
  }
View Full Code Here

Examples of org.olat.core.gui.control.ChiefController

      }     
      showMessage(ureq,"org.opensaml.SAMLException: " + e.getMessage(), e, userMsg, ((ShibbolethException)e).getContactPersonEmail());
      return;         
    } else {
      try {       
        ChiefController msgcc = MsgFactory.createMessageChiefController(ureq,
          new OLATRuntimeException("Error processing Shibboleth request: " + e.getMessage(), e), false);
        msgcc.getWindow().dispatchRequest(ureq, true);
      } catch (Throwable t) {
        Tracing.logError("We're fucked up....",t, ShibbolethDispatcher.class);
      }
    }
  }
View Full Code Here

Examples of org.olat.core.gui.control.ChiefController

   * @param cause
   * @param userMessage gets shown to the user
   * @param supportEmail if any available, else null
   */
  private void showMessage(UserRequest ureq, String exceptionLogMessage, Throwable cause, String userMessage, String supportEmail) {
    ChiefController msgcc = MessageWindowController.createMessageChiefController(ureq,  new OLATRuntimeException(exceptionLogMessage, cause), userMessage, supportEmail);
    msgcc.getWindow().dispatchRequest(ureq, true);
  }
View Full Code Here

Examples of org.olat.core.gui.control.ChiefController

        subPathccc = dmzServicesByPath.get(sub);
       
        UserSession usess = ureq.getUserSession();
        Windows ws = Windows.getWindows(usess);
        synchronized (ws) { //o_clusterOK by:fj per user session
          ChiefController occ;
          if(subPathccc != null){
            occ = subPathccc.createChiefController(ureq);
            Window window = occ.getWindow();
            window.setUriPrefix(uriPrefix);
            ws.registerWindow(window);
           
            window.dispatchRequest(ureq, true);
            return;
          }         
        }
      }//else a /olat/dmz/ request
      /*
       * create content as it is defined in config.xml in he dmzbean
       */

      /*
       * solve this with a predispatcher action
       */
     
//      // convenience method to jump immediatly to AAI (Shibboleth) home
//      // organisation for login without selecting home organisation manually
//      if (ShibbolethModule.isEnableShibbolethLogins()) {
//        String preSelIdp = request.getParameter("preselection");
//        String redirect = request.getParameter("redirect");
//        if (preSelIdp != null && redirect != null && redirect.equalsIgnoreCase("true")) {
//          preSelIdp = preSelIdp.toLowerCase();
//          Collection sites = IdPSite.getIdPSites(ShibbolethModule.getMetadata());
//          for (Iterator iter = sites.iterator(); iter.hasNext();) {
//            IdPSite site = (IdPSite) iter.next();
//            if (site.getName().toLowerCase().indexOf(preSelIdp) > -1) {
//              response.sendRedirect(AssertionConsumerService.buildRequest(request.getLocale(), site));
//              break;
//            }
//          }
//        }
//      }

      UserSession usess = ureq.getUserSession();
      Windows ws = Windows.getWindows(usess);
      synchronized (ws) { //o_clusterOK by:fj per user session

        Window window;
        boolean windowHere = ws.isExisting(ureq.getWindowID());
        boolean validDispatchUri = ureq.isValidDispatchURI();
        if (validDispatchUri && !windowHere) {
          // probably valid framework link from previous user && new Session(no window):
          // when a previous user logged off, and 30min later (when the httpsession is invalidated), the next user clicks e.g. on
          // the log-in link in the -same- browser window ->
          // -> there is no window -> create a new one
          window = null;
          usess.signOffAndClear();
          usess.setLocale(LocaleNegotiator.getPreferedLocale(ureq));
          // request new windows since it is a new usersession, the old one was purged
          ws = Windows.getWindows(usess);
        } else {
          if (validDispatchUri) {
            window = ws.getWindow(ureq);
          } else {
            // e.g. /dmz/ -> start screen, clear previous session data
            window = null;
            usess.signOffAndClear();
            usess.setLocale(LocaleNegotiator.getPreferedLocale(ureq));
            // request new windows since it is a new usersession, the old one was purged
            ws = Windows.getWindows(usess);
          }
        }
       
        if (window == null) {
          // no window found, -> start a new WorkFlow/Controller and obtain the window
          // main controller which also implements the windowcontroller for pagestatus and modal dialogs
          ChiefController occ = chiefControllerCreator.createChiefController(ureq);
         
//        REVIEW:12-2007:CodeCleanup       
          // browser did not send a cookie && url has a window id with it (= we
          // are clicking a framework link or submitting a framework form)
          //if (sessionId == null && ureq.getWindowID() != null) {
            //Translator trans = new PackageTranslator("org.olat", ureq.getLocale()); // locale
            //occ.getWindowControl().setWarning(trans.translate("wayf.cookies"));
          //}

          window = occ.getWindow();
          window.setUriPrefix(uriPrefix);
          ws.registerWindow(window);
         
          window.dispatchRequest(ureq, true);
       
        } else {
          window.dispatchRequest(ureq);
        }
      }
    } catch (Throwable th) {
      try {
        ChiefController msgcc = MsgFactory.createMessageChiefController(ureq, th);
        // the controller's window must be failsafe also
        msgcc.getWindow().dispatchRequest(ureq, true);
        // do not dispatch (render only), since this is a new Window created as
        // a result of another window's click.
      } catch (Throwable t) {
        Tracing.logError("An exception occured while handling the exception...",t, SessionDispatcher.class);
        GUIInterna.setLoadPerformanceMode(null);
View Full Code Here

Examples of org.olat.core.gui.control.ChiefController

        DispatcherAction.redirectToDefaultDispatcher(response);
     

    } catch (Throwable th) {
      try {
        ChiefController msgcc = MsgFactory.createMessageChiefController(ureq, th);
        // the controller's window must be failsafe also
        msgcc.getWindow().dispatchRequest(ureq, true);
        // do not dispatch (render only), since this is a new Window created as
        // a result of another window's click.
      } catch (Throwable t) {
        log.error("Sorry, can't handle this remote login request....", t);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.