Coverage report

  %line %branch
org.demosys.web.iteration.action.UpdateIterationAction
0% 
0% 

 1  
 /*
 2  
  * Demosys.
 3  
  *
 4  
  * Terms of license - http://opensource.org/licenses/apachepl.php
 5  
  */
 6  
 package org.demosys.web.iteration.action;
 7  
 import javax.servlet.http.Cookie;
 8  
 import javax.servlet.http.HttpServletRequest;
 9  
 import javax.servlet.http.HttpServletResponse;
 10  
 import org.apache.struts.action.Action;
 11  
 import org.apache.struts.action.ActionForm;
 12  
 import org.apache.struts.action.ActionForward;
 13  
 import org.apache.struts.action.ActionMapping;
 14  
 import org.demosys.web.ServiceLocator;
 15  
 import org.demosys.web.iteration.CreateIterationException;
 16  
 import org.demosys.web.iteration.IterationForm;
 17  
 /**
 18  
  */
 19  0
 public class UpdateIterationAction extends Action {
 20  
     public ActionForward execute(ActionMapping mapping, ActionForm objForm,
 21  
         HttpServletRequest req, HttpServletResponse res) {
 22  0
         IterationForm form = (IterationForm)objForm;
 23  
 
 24  0
         String result = null;
 25  
 
 26  
         try {
 27  0
             ServiceLocator.getServiceLocator().getIterationService().updateIteration(form
 28  
                     .toIterationView());
 29  
 
 30  
             /*   Cookie c = new Cookie("userCookie", "1234");
 31  
                c.setMaxAge(365*24*60*60);
 32  
 
 33  
                res.addCookie(c);
 34  
                             */
 35  0
             result = "success";
 36  0
         }
 37  
         catch (CreateIterationException e) {
 38  0
             e.printStackTrace();
 39  0
             result = "failure";
 40  0
         }
 41  
 
 42  0
         return mapping.findForward(result);
 43  
     }
 44  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.