/** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at the * <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a> * <p> * Unless required by applicable law or agreed to in writing,<br> * software distributed under the License is distributed on an "AS IS" BASIS, <br> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br> * See the License for the specific language governing permissions and <br> * limitations under the License. * <p> * Initial code contributed and copyrighted by<br> * frentix GmbH, http://www.frentix.com * <p> */ package org.olat.home; import org.olat.core.gui.UserRequest; import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.generic.layout.MainLayoutController; import org.olat.core.gui.control.navigation.AbstractSiteInstance; import org.olat.core.gui.control.navigation.NavElement; import org.olat.core.gui.control.navigation.SiteConfiguration; import org.olat.core.gui.control.navigation.SiteDefinition; import org.olat.core.id.OLATResourceable; import org.olat.core.id.context.BusinessControlFactory; import org.olat.core.id.context.StateSite; import org.olat.core.logging.activity.ThreadLocalUserActivityLogger; import org.olat.core.util.resource.OresHelper; import org.olat.util.logging.activity.LoggingResourceable; /** * <h3>Description:</h3> Instantiates the genericmainctrl for a minimal home * site. Initial Date: 10.05.2010 <br> * * @author Roman Haag, roman.haag@frentix.com, www.frentix.com */ public class HomeSite extends AbstractSiteInstance { public HomeSite( SiteDefinition siteDef) { super(siteDef); } @Override protected MainLayoutController createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) { OLATResourceable ores = OresHelper.createOLATResourceableInstance(HomeSite.class, ureq.getIdentity().getKey()); ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores)); WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true); return new HomeMainController(ureq, bwControl); } /** * @see org.olat.core.gui.control.navigation.SiteInstance#getNavElement() */ @Override public NavElement getNavElement() { return null; } /** * @see org.olat.core.gui.control.navigation.SiteInstance#isKeepState() */ @Override public boolean isKeepState() { return true; } }