View Javadoc
1   /******************************************************************************
2    * JobLogReportPageController.java - The Spring controller for the JobLog report
3    * 
4    * PicMan - The BuckoSoft Picture Manager in Java
5    * Copyright(c) 2007 - Dick Balaska
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.springframework.web.servlet.ModelAndView;
19  
20  import com.buckosoft.BSAccount.web.BSAccountPageController;
21  import com.buckosoft.BSAccount.web.BSAccountUserWebSession;
22  import com.buckosoft.PicMan.business.PicManFacade;
23  
24  public class JobLogReportPageController extends BSAccountPageController {
25  	private PicManFacade	pmf;
26  	
27  	public void setPicMan(PicManFacade pmf) { this.pmf = pmf; }
28  	public PicManFacade getPicMan() { return(pmf); }
29  
30  	public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
31  				throws ServletException, IOException {
32  
33  		BSAccountUserWebSession userWebSession = this.bsAccountMan.getUserWebSession(request);
34  		
35  		String now = (new java.util.Date()).toString();
36  
37  		Map<String, Object> myModel = new HashMap<String, Object>();
38  		myModel.put("userWebSession", userWebSession);
39  		myModel.put("now", now);
40  		myModel.put("picMan", getPicMan());
41  		myModel.put("chains", pmf.getDB().getChains());
42  
43  		return new ModelAndView("JobLogReport", "model", myModel);
44  	}
45  	
46  }