1
2
3
4
5
6
7
8 package com.buckosoft.PicMan.web;
9
10 import java.io.IOException;
11 import java.util.HashMap;
12 import java.util.Map;
13
14 import javax.servlet.ServletException;
15 import javax.servlet.http.HttpServletRequest;
16 import javax.servlet.http.HttpServletResponse;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20 import org.springframework.web.servlet.ModelAndView;
21
22 import com.buckosoft.BSAccount.web.BSAccountPageController;
23 import com.buckosoft.BSAccount.web.BSAccountUserWebSession;
24 import com.buckosoft.PicMan.domain.User;
25
26
27
28
29
30 public class EngineReportPageController extends BSAccountPageController {
31
32 private final static boolean DEBUG = false;
33 protected final Log logger = LogFactory.getLog(getClass());
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
57 throws ServletException, IOException {
58
59 BSAccountUserWebSession userWebSession = this.bsAccountMan.getUserWebSession(request);
60 if (userWebSession != null) {
61 if (DEBUG)
62 logger.info("session-user = '" + userWebSession.getUser().getUsername() + "'");
63 }
64 User user = (User)userWebSession.getUser();
65 Map<String, Object> myModel = new HashMap<String, Object>();
66 myModel.put("userWebSession", userWebSession);
67 myModel.put("refreshDelay", "" + 10);
68 myModel.put("engineReportRows", user.getEngineReportRows());
69 myModel.put("engineReportColumns", user.getEngineReportColumns());
70 return new ModelAndView("EngineReportPage", "model", myModel);
71 }
72
73
74 }