Search in sources :

Example 1 with BaseFullWebappControllerParts

use of org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts in project OpenOLAT by OpenOLAT.

the class BaseFullWebappMinimalLayoutControllerCreator method getFullWebappParts.

/**
 * @see org.olat.core.commons.fullWebApp.popup.BaseFullWebappPopupLayout#getFullWebappParts()
 */
@Override
public BaseFullWebappControllerParts getFullWebappParts() {
    return new BaseFullWebappControllerParts() {

        @Override
        public List<SiteInstance> getSiteInstances(UserRequest ureq, WindowControl control) {
            // no static sites
            return null;
        }

        @Override
        public Controller getContentController(UserRequest ureq, WindowControl wControl) {
            // the content for the Pop-up Window
            return contentControllerCreator.createController(ureq, wControl);
        }

        @Override
        public LockableController createTopNavController(UserRequest ureq, WindowControl wControl) {
            LockableController topnavCtr = null;
            // ----------- topnav, optional (e.g. for imprint, logout) ------------------
            if (CoreSpringFactory.containsBean("fullWebApp.MinimalTopNavControllerCreator")) {
                ControllerCreator topnavControllerCreator = (ControllerCreator) CoreSpringFactory.getBean("fullWebApp.MinimalTopNavControllerCreator");
                topnavCtr = (LockableController) topnavControllerCreator.createController(ureq, wControl);
            }
            return topnavCtr;
        }

        @Override
        public Controller createHeaderController(UserRequest ureq, WindowControl control) {
            Controller headerCtr = null;
            // ----------- header, optional (e.g. for logo, advertising ) ------------------
            if (CoreSpringFactory.containsBean("fullWebApp.MinimalHeaderControllerCreator")) {
                ControllerCreator headerControllerCreator = (ControllerCreator) CoreSpringFactory.getBean("fullWebApp.MinimalHeaderControllerCreator");
                headerCtr = headerControllerCreator.createController(ureq, control);
            }
            return headerCtr;
        }

        @Override
        public LockableController createFooterController(UserRequest ureq, WindowControl control) {
            Controller footerCtr = null;
            // ----------- footer, optional (e.g. for copyright, powerd by) ------------------
            if (CoreSpringFactory.containsBean("fullWebApp.MinimalFooterControllerCreator")) {
                ControllerCreator footerCreator = (ControllerCreator) CoreSpringFactory.getBean("fullWebApp.MinimalFooterControllerCreator");
                footerCtr = footerCreator.createController(ureq, control);
            }
            return (LockableController) footerCtr;
        }
    };
}
Also used : SiteInstance(org.olat.core.gui.control.navigation.SiteInstance) LockableController(org.olat.core.commons.fullWebApp.LockableController) BaseFullWebappControllerParts(org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts) WindowControl(org.olat.core.gui.control.WindowControl) LockableController(org.olat.core.commons.fullWebApp.LockableController) Controller(org.olat.core.gui.control.Controller) UserRequest(org.olat.core.gui.UserRequest) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator)

Example 2 with BaseFullWebappControllerParts

use of org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts in project OpenOLAT by OpenOLAT.

the class AuthHelper method createAuthHome.

/**
 * Create a base chief controller for the current authenticated user request
 * and initialize the first screen after login.
 *
 * @param ureq The authenticated user request.
 * @return The chief controller
 */
public static ChiefController createAuthHome(UserRequest ureq) {
    if (!ureq.getUserSession().isAuthenticated())
        throw new AssertException("not authenticated!");
    BaseFullWebappControllerParts authSitesAndNav = new AuthBFWCParts();
    ChiefController cc = new BaseFullWebappController(ureq, authSitesAndNav);
    Windows.getWindows(ureq.getUserSession()).setChiefController(cc);
    return cc;
}
Also used : BaseFullWebappController(org.olat.core.commons.fullWebApp.BaseFullWebappController) AssertException(org.olat.core.logging.AssertException) AuthBFWCParts(org.olat.login.AuthBFWCParts) BaseFullWebappControllerParts(org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts) ChiefController(org.olat.core.gui.control.ChiefController)

Example 3 with BaseFullWebappControllerParts

use of org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts in project OpenOLAT by OpenOLAT.

the class AuthHelper method createGuestHome.

/**
 * Create a base chief controller for the current anonymous user request
 * and initialize the first screen after login. Note, the user request
 * must be authenticated, but as an anonymous user and not a known user.
 *
 * @param ureq The authenticated user request.
 * @return The chief controller
 */
private static ChiefController createGuestHome(UserRequest ureq) {
    if (!ureq.getUserSession().isAuthenticated())
        throw new AssertException("not authenticated!");
    BaseFullWebappControllerParts guestSitesAndNav = new GuestBFWCParts();
    ChiefController cc = new BaseFullWebappController(ureq, guestSitesAndNav);
    Windows.getWindows(ureq.getUserSession()).setChiefController(cc);
    return cc;
}
Also used : BaseFullWebappController(org.olat.core.commons.fullWebApp.BaseFullWebappController) AssertException(org.olat.core.logging.AssertException) BaseFullWebappControllerParts(org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts) GuestBFWCParts(org.olat.login.GuestBFWCParts) ChiefController(org.olat.core.gui.control.ChiefController)

Example 4 with BaseFullWebappControllerParts

use of org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts in project openolat by klemens.

the class AuthHelper method createGuestHome.

/**
 * Create a base chief controller for the current anonymous user request
 * and initialize the first screen after login. Note, the user request
 * must be authenticated, but as an anonymous user and not a known user.
 *
 * @param ureq The authenticated user request.
 * @return The chief controller
 */
private static ChiefController createGuestHome(UserRequest ureq) {
    if (!ureq.getUserSession().isAuthenticated())
        throw new AssertException("not authenticated!");
    BaseFullWebappControllerParts guestSitesAndNav = new GuestBFWCParts();
    ChiefController cc = new BaseFullWebappController(ureq, guestSitesAndNav);
    Windows.getWindows(ureq.getUserSession()).setChiefController(cc);
    return cc;
}
Also used : BaseFullWebappController(org.olat.core.commons.fullWebApp.BaseFullWebappController) AssertException(org.olat.core.logging.AssertException) BaseFullWebappControllerParts(org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts) GuestBFWCParts(org.olat.login.GuestBFWCParts) ChiefController(org.olat.core.gui.control.ChiefController)

Example 5 with BaseFullWebappControllerParts

use of org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts in project openolat by klemens.

the class AuthHelper method createAuthHome.

/**
 * Create a base chief controller for the current authenticated user request
 * and initialize the first screen after login.
 *
 * @param ureq The authenticated user request.
 * @return The chief controller
 */
public static ChiefController createAuthHome(UserRequest ureq) {
    if (!ureq.getUserSession().isAuthenticated())
        throw new AssertException("not authenticated!");
    BaseFullWebappControllerParts authSitesAndNav = new AuthBFWCParts();
    ChiefController cc = new BaseFullWebappController(ureq, authSitesAndNav);
    Windows.getWindows(ureq.getUserSession()).setChiefController(cc);
    return cc;
}
Also used : BaseFullWebappController(org.olat.core.commons.fullWebApp.BaseFullWebappController) AssertException(org.olat.core.logging.AssertException) AuthBFWCParts(org.olat.login.AuthBFWCParts) BaseFullWebappControllerParts(org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts) ChiefController(org.olat.core.gui.control.ChiefController)

Aggregations

BaseFullWebappControllerParts (org.olat.core.commons.fullWebApp.BaseFullWebappControllerParts)6 BaseFullWebappController (org.olat.core.commons.fullWebApp.BaseFullWebappController)4 ChiefController (org.olat.core.gui.control.ChiefController)4 AssertException (org.olat.core.logging.AssertException)4 LockableController (org.olat.core.commons.fullWebApp.LockableController)2 UserRequest (org.olat.core.gui.UserRequest)2 Controller (org.olat.core.gui.control.Controller)2 WindowControl (org.olat.core.gui.control.WindowControl)2 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)2 SiteInstance (org.olat.core.gui.control.navigation.SiteInstance)2 AuthBFWCParts (org.olat.login.AuthBFWCParts)2 GuestBFWCParts (org.olat.login.GuestBFWCParts)2