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);