| 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 | 0 | public class FilterReportPageController extends BSAccountPageController { |
| 28 | |
|
| 29 | |
private final static boolean DEBUG = false; |
| 30 | |
|
| 31 | |
|
| 32 | 0 | protected final Log logger = LogFactory.getLog(getClass()); |
| 33 | |
|
| 34 | |
private PicManFacade pmf; |
| 35 | |
private DatabaseFacade dbf; |
| 36 | |
|
| 37 | 0 | public void setPicMan(PicManFacade pmf) { this.pmf = pmf; } |
| 38 | 0 | public PicManFacade getPicMan() { return(pmf); } |
| 39 | |
|
| 40 | 0 | public void setDatabase(DatabaseFacade dbf) { this.dbf = dbf; } |
| 41 | 0 | public DatabaseFacade getDatabase() { return(dbf); } |
| 42 | |
|
| 43 | |
|
| 44 | |
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) |
| 45 | |
throws ServletException, IOException { |
| 46 | |
|
| 47 | 0 | BSAccountUserWebSession userWebSession = this.bsAccountMan.getUserWebSession(request); |
| 48 | |
if (DEBUG) |
| 49 | |
logger.info("returning hello view with session " + userWebSession); |
| 50 | |
|
| 51 | 0 | String now = (new java.util.Date()).toString(); |
| 52 | |
|
| 53 | 0 | Map<String, Object> myModel = new HashMap<String, Object>(); |
| 54 | 0 | myModel.put("userWebSession", userWebSession); |
| 55 | 0 | myModel.put("now", now); |
| 56 | 0 | myModel.put("picMan", getPicMan()); |
| 57 | 0 | myModel.put("database", dbf); |
| 58 | |
|
| 59 | 0 | return new ModelAndView("FilterReport", "model", myModel); |
| 60 | |
} |
| 61 | |
} |