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.business.PicManFacade;
25 import com.buckosoft.PicMan.domain.User;
26
27
28
29
30
31
32
33
34
35
36 public class SlideShowPageController extends BSAccountPageController {
37 private static final boolean DEBUG = false;
38 protected final Log logger = LogFactory.getLog(getClass());
39
40 private PicManFacade pmf;
41
42
43
44
45 public void setPicMan(PicManFacade pmf) { this.pmf = pmf; }
46
47
48
49
50
51
52 public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
53 throws ServletException, IOException {
54
55 BSAccountUserWebSession userWebSession = this.bsAccountMan.getUserWebSession(request);
56 User user = null;
57 if (userWebSession != null)
58 user = (User)userWebSession.getUser();
59 if (DEBUG)
60 logger.info("formBackingObject session " + userWebSession);
61
62 String now = (new java.util.Date()).toString();
63
64 Map<String, Object> myModel = new HashMap<String, Object>();
65 myModel.put("userWebSession", userWebSession);
66 myModel.put("usr", user);
67 myModel.put("user", null);
68 myModel.put("now", now);
69 myModel.put("sets", pmf.getDB().getSets());
70
71 return new ModelAndView("SlideShowPage", "model", myModel);
72 }
73 }