Coverage Report - com.buckosoft.PicMan.web.SyncSetupPageController
 
Classes in this File Line Coverage Branch Coverage Complexity
SyncSetupPageController
0%
0/17
N/A
1
 
 1  
 /******************************************************************************
 2  
  * SyncSetupPageController.java - The Spring controller to display the Sync Setup page
 3  
  * 
 4  
  * PicMan - The BuckoSoft Picture Manager in Java
 5  
  * Copyright(c) 2014 - 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.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  
  * The Spring controller to display the Sync Setup page. <br>
 29  
  * 
 30  
  * @author Dick Balaska
 31  
  * @since 2014/06/07
 32  
  * @see <a href="http://cvs.buckosoft.com/Projects/PicMan/PicMan/src/main/java/com/buckosoft/PicMan/web/SyncSetupPageController.java">SyncSetupPageController.java</a>
 33  
  */
 34  0
 public class SyncSetupPageController extends BSAccountPageController {
 35  
 
 36  
 //        private final static boolean DEBUG = false;
 37  0
         protected final Log logger = LogFactory.getLog(getClass());
 38  
         
 39  
         private PicManFacade        pmf;
 40  
         private DatabaseFacade        dbf;
 41  0
         private        boolean                        compressJS = false;
 42  
         
 43  
         /** Set the reference to the PicMan API
 44  
          * @param pmf The PicManFacade
 45  
          */
 46  
         public void setPicMan(PicManFacade pmf) { 
 47  0
                 this.pmf = pmf;
 48  0
                 this.dbf = pmf.getDB();
 49  0
         }
 50  
         /** bean getter so Spring AOP can determine the type
 51  
          * @return The PicManFacade
 52  
          */
 53  0
         public PicManFacade getPicMan() { return(pmf); }
 54  
 
 55  0
         public void setDatabase(DatabaseFacade dbf) { this.dbf = dbf; }
 56  
         /** bean getter so Spring AOP can determine the type
 57  
          * @return The DatabaseFacade
 58  
          */
 59  0
         public DatabaseFacade getDatabase() { return(dbf); }
 60  
 
 61  
         /**
 62  
          * @return the compressJS
 63  
          */
 64  
         public boolean isCompressJS() {
 65  0
                 return compressJS;
 66  
         }
 67  
 
 68  
         /**
 69  
          * @param compressJS the compressJS to set
 70  
          */
 71  
         public void setCompressJS(boolean compressJS) {
 72  0
                 this.compressJS = compressJS;
 73  0
         }
 74  
 
 75  
         /** Build the model that spring outputs to the browser
 76  
          * @param request The http request
 77  
          * @param response The http response
 78  
          */
 79  
         public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
 80  
                         throws ServletException, IOException {
 81  
 
 82  0
                    BSAccountUserWebSession userWebSession = this.bsAccountMan.getUserWebSession(request);
 83  0
             Map<String, Object> myModel = new HashMap<String, Object>();
 84  0
                 myModel.put("userWebSession", userWebSession);
 85  0
                 myModel.put("compressJS", compressJS);
 86  
 //                myModel.put("picMan", pmf);
 87  0
         return new ModelAndView("SyncSetupPage", "model", myModel);
 88  
         }
 89  
         
 90  
 }