KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > demo > icare > web > ReservationsListController


1 package org.objectweb.petals.demo.icare.web;
2
3 import javax.servlet.ServletException JavaDoc;
4 import javax.servlet.http.HttpServletRequest JavaDoc;
5 import javax.servlet.http.HttpServletResponse JavaDoc;
6
7 import org.objectweb.petals.demo.icare.service.CarService;
8 import org.springframework.web.servlet.ModelAndView;
9 import org.springframework.web.servlet.mvc.AbstractController;
10
11 /**
12  * @author Cristian Spiescu
13  * @author Imad Zarzouri
14  * @author Omar Senhaji Rhazi
15  * @author Anass Ouazzani Chahdi
16  *
17  * @since 21.01.2007
18  */

19 public class ReservationsListController extends AbstractController{
20     private CarService carService;
21     
22     public CarService getCarService() {
23         return carService;
24     }
25
26     public void setCarService(CarService carService) {
27         this.carService = carService;
28     }
29
30     /**
31      * Shows a list with all the cars in the database
32      *
33      * @param request
34      * @param response
35      * @return
36      * @throws ServletException
37      */

38     @Override JavaDoc
39     protected ModelAndView handleRequestInternal(HttpServletRequest JavaDoc arg0,
40             HttpServletResponse JavaDoc arg1) throws Exception JavaDoc {
41         return new ModelAndView("reservationsList", "reservations",
42                 getCarService().getAllReservations());
43     }
44
45 }
46
Popular Tags