use of org.olat.core.id.context.StateSite in project openolat by klemens.
the class UserAdminSite method createController.
@Override
protected MainLayoutController createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance(UserAdminSite.class, 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true);
return new UserAdminMainController(ureq, bwControl);
}
use of org.olat.core.id.context.StateSite in project OpenOLAT by OpenOLAT.
the class VideoSite method createController.
@Override
protected Controller createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance(VideoSite.class, 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true);
Controller videoSiteCtr = new VideoSiteController(ureq, bwControl);
return videoSiteCtr;
}
use of org.olat.core.id.context.StateSite in project OpenOLAT by OpenOLAT.
the class CatalogSite method createController.
@Override
protected Controller createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
// for existing controller which are part of the main olat -> use the controllerfactory
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Catalog", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true);
return new CatalogSiteMainController(ureq, bwControl);
}
use of org.olat.core.id.context.StateSite in project OpenOLAT by OpenOLAT.
the class MyCoursesSite method createController.
@Override
protected Controller createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance(MyCoursesSite.class, 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true);
return new OverviewRepositoryListController(ureq, bwControl);
}
use of org.olat.core.id.context.StateSite in project OpenOLAT by OpenOLAT.
the class BaseFullWebappController method back.
protected void back(UserRequest ureq, HistoryPoint cstate) {
List<ContextEntry> entries = cstate.getEntries();
if (entries.isEmpty())
return;
entries = new ArrayList<ContextEntry>(entries);
ContextEntry state = entries.remove(0);
// no red screen for this
if (state == null)
return;
OLATResourceable ores = state.getOLATResourceable();
if (ores != null && "HomeSite".equals(ores.getResourceableTypeName())) {
activateSite(userTools, ureq, entries, false);
} else {
DTab dt = getDTab(ores);
if (dt != null) {
doActivateDTab(dt);
if (dt.getController() instanceof Activateable2) {
((Activateable2) dt.getController()).activate(ureq, entries, null);
}
updateBusinessPath(ureq, dt);
} else {
StateEntry s = state.getTransientState();
if (s instanceof StateSite && ((StateSite) s).getSite() != null && sites != null) {
SiteInstance site = ((StateSite) s).getSite();
for (SiteInstance savedSite : sites) {
if (savedSite != null && site.getClass().equals(savedSite.getClass())) {
activateSite(savedSite, ureq, entries, false);
}
}
}
}
}
}
Aggregations