
org.webpieces.plugins.backend.BackendController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-backend Show documentation
Show all versions of plugin-backend Show documentation
backend pluggable plugin that all backend plugins can plugin into or not
package org.webpieces.plugins.backend;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.webpieces.plugins.backend.login.BackendLoginRouteId;
import org.webpieces.plugins.backend.menu.MenuCreator;
import org.webpieces.router.api.controller.actions.Actions;
import org.webpieces.router.api.controller.actions.Redirect;
import org.webpieces.router.api.controller.actions.Render;
@Singleton
public class BackendController {
private MenuCreator menuCreator;
@Inject
public BackendController(MenuCreator menuCreator) {
this.menuCreator = menuCreator;
}
public Redirect redirectToLogin() {
return Actions.redirect(BackendLoginRouteId.BACKEND_LOGIN);
}
public Render home() {
return Actions.renderThis("menu", menuCreator.getMenu());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy