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
33
34 public class SyncSetupPageController extends BSAccountPageController {
35
36
37 protected final Log logger = LogFactory.getLog(getClass());
38
39 private PicManFacade pmf;
40 private DatabaseFacade dbf;
41 private boolean compressJS = false;
42
43
44
45
46 public void setPicMan(PicManFacade pmf) {
47 this.pmf = pmf;
48 this.dbf = pmf.getDB();
49 }
50
51
52
53 public PicManFacade getPicMan() { return(pmf); }
54
55 public void setDatabase(DatabaseFacade dbf) { this.dbf = dbf; }
56
57
58
59 public DatabaseFacade getDatabase() { return(dbf); }
60
61
62
63
64 public boolean isCompressJS() {
65 return compressJS;
66 }
67
68
69
70
71 public void setCompressJS(boolean compressJS) {
72 this.compressJS = compressJS;
73 }
74
75
76
77
78
79 public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
80 throws ServletException, IOException {
81
82 BSAccountUserWebSession userWebSession = this.bsAccountMan.getUserWebSession(request);
83 Map<String, Object> myModel = new HashMap<String, Object>();
84 myModel.put("userWebSession", userWebSession);
85 myModel.put("compressJS", compressJS);
86
87 return new ModelAndView("SyncSetupPage", "model", myModel);
88 }
89
90 }