All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.webpieces.plugins.backend.BackendController Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
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