use of org.olat.core.gui.control.navigation.SiteDefinitions in project OpenOLAT by OpenOLAT.
the class AuthBFWCParts method getSiteInstances.
/**
* @see org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts#getSiteInstances(org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)
*/
@Override
public List<SiteInstance> getSiteInstances(UserRequest ureq, WindowControl wControl) {
SiteDefinitions sitedefs = CoreSpringFactory.getImpl(SiteDefinitions.class);
List<SiteInstance> sites = new ArrayList<SiteInstance>();
for (SiteDefinition sitedef : sitedefs.getSiteDefList()) {
SiteInstance site = sitedef.createSite(ureq, wControl);
if (site != null) {
// site == null means that site is not visible to the current user
sites.add(site);
}
}
return sites;
}
use of org.olat.core.gui.control.navigation.SiteDefinitions in project OpenOLAT by OpenOLAT.
the class CatalogContextEntryControllerCreator method isCatalogSiteVisible.
private boolean isCatalogSiteVisible(UserRequest ureq) {
if (repositoryModule.isCatalogEnabled() && repositoryModule.isCatalogSiteEnabled()) {
try {
CatalogSiteDef siteDef = CoreSpringFactory.getImpl(CatalogSiteDef.class);
SiteDefinitions siteDefinitions = CoreSpringFactory.getImpl(SiteDefinitions.class);
SiteConfiguration config = siteDefinitions.getConfigurationSite(siteDef);
if (config != null && StringHelper.containsNonWhitespace(config.getSecurityCallbackBeanId())) {
String secCallbackBeanId = config.getSecurityCallbackBeanId();
Object siteSecCallback = CoreSpringFactory.getBean(secCallbackBeanId);
if (siteSecCallback instanceof SiteSecurityCallback && !((SiteSecurityCallback) siteSecCallback).isAllowedToLaunchSite(ureq)) {
return false;
}
}
} catch (Exception e) {
log.error("Cannot find if the user is allowed to launch the catalog.", e);
}
return true;
} else {
return false;
}
}
use of org.olat.core.gui.control.navigation.SiteDefinitions in project openolat by klemens.
the class CourseSiteDef method getCourseSiteconfiguration.
protected CourseSiteConfiguration getCourseSiteconfiguration() {
SiteDefinitions siteModule = CoreSpringFactory.getImpl(SiteDefinitions.class);
CourseSiteConfiguration config = siteModule.getConfigurationCourseSite1();
return config;
}
use of org.olat.core.gui.control.navigation.SiteDefinitions in project openolat by klemens.
the class CourseSiteDef2 method getCourseSiteconfiguration.
@Override
protected CourseSiteConfiguration getCourseSiteconfiguration() {
SiteDefinitions siteModule = CoreSpringFactory.getImpl(SiteDefinitions.class);
CourseSiteConfiguration config = siteModule.getConfigurationCourseSite2();
return config;
}
use of org.olat.core.gui.control.navigation.SiteDefinitions in project openolat by klemens.
the class CourseSiteDef3 method getCourseSiteconfiguration.
@Override
protected CourseSiteConfiguration getCourseSiteconfiguration() {
SiteDefinitions siteModule = CoreSpringFactory.getImpl(SiteDefinitions.class);
CourseSiteConfiguration config = siteModule.getConfigurationCourseSite3();
return config;
}
Aggregations