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.db.DatabaseFacade;
26
27
28
29
30
31
32 public class SyncStatusPageController extends BSAccountPageController {
33
34
35 protected final Log logger = LogFactory.getLog(getClass());
36
37 private PicManFacade pmf;
38 private DatabaseFacade dbf;
39
40
41
42
43 public void setPicMan(PicManFacade pmf) {
44 this.pmf = pmf;
45 this.dbf = pmf.getDB();
46 }
47
48
49
50 public PicManFacade getPicMan() { return(pmf); }
51
52 public void setDatabase(DatabaseFacade dbf) { this.dbf = dbf; }
53
54
55
56 public DatabaseFacade getDatabase() { return(dbf); }
57
58
59
60
61
62 public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
63 throws ServletException, IOException {
64
65 BSAccountUserWebSession userWebSession = this.bsAccountMan.getUserWebSession(request);
66 Map<String, Object> myModel = new HashMap<String, Object>();
67 myModel.put("userWebSession", userWebSession);
68 myModel.put("picMan", pmf);
69 myModel.put("database", dbf);
70 myModel.put("refreshDelay", 2);
71
72 return new ModelAndView("SyncStatus", "model", myModel);
73 }
74 }