Class CafesController

java.lang.Object
balu.pizza.webapp.controllers.CafesController

@Controller @RequestMapping("/cafe") public class CafesController extends Object
Cafe Controller
  • Constructor Details

    • CafesController

      @Autowired public CafesController(PizzaService pizzaService, CafeService cafeService, UserUtil userUtil)
      Parameters:
      pizzaService - Pizza service
      cafeService - Cafe service
      userUtil - Set users utils
  • Method Details

    • indexPage

      @GetMapping public String indexPage(org.springframework.ui.Model model)
      Main page cafe section

      admin panel

      Parameters:
      model -
      Returns:
      Generates a page for the route /cafe
    • pizzaAvailability

      @GetMapping("/pizza/{pizzaId}") public String pizzaAvailability(@PathVariable("pizzaId") int pizzaId, org.springframework.ui.Model model)
      The page displays the presence of pizza in the cafe menu

      admin panel

      Parameters:
      pizzaId -
      model -
      Returns:
      Generates a page for the route /cafe/pizza/id
    • showCafe

      @GetMapping("/{id}") public String showCafe(@PathVariable("id") int cafeId, org.springframework.ui.Model model)
      Page displaying information about the cafe and its menu

      admin panel

      Parameters:
      cafeId - cafe identifier
      model -
      Returns:
      Generates a page for the route /cafe/id