Coverage report

  %line %branch
org.demosys.web.project.action.NewProjectForm
0% 
0% 

 1  
 /*
 2  
  * Demosys.
 3  
  *
 4  
  * Terms of license - http://opensource.org/licenses/apachepl.php
 5  
  */
 6  
 package org.demosys.web.project.action;
 7  
 import org.apache.struts.action.ActionError;
 8  
 import org.apache.struts.action.ActionErrors;
 9  
 import org.apache.struts.action.ActionForm;
 10  
 import org.apache.struts.action.ActionMapping;
 11  
 import org.demosys.web.project.ProjectView;
 12  
 /**
 13  
  * Formulaire pour la creation d'un projet.
 14  
  *
 15  
  * @author ABOUELF
 16  
  *
 17  
  * @deprecated 11 avril 2003
 18  
  */
 19  0
 public class NewProjectForm extends ActionForm {
 20  
     private String name;
 21  
     private String description;
 22  
 
 23  
     public void reset(ActionMapping actionMapping,
 24  
         javax.servlet.http.HttpServletRequest httpServletRequest) {
 25  0
         setName(null);
 26  0
         setDescription(null);
 27  0
     }
 28  
 
 29  
 
 30  
     public ActionErrors validate(ActionMapping actionMapping,
 31  
         javax.servlet.http.HttpServletRequest httpServletRequest) {
 32  0
         ActionErrors errors = new ActionErrors();
 33  
 
 34  0
         if (this.getName().length() < 2) {
 35  0
             errors.add("title", new ActionError("project.new.error.title"));
 36  
         }
 37  
 
 38  0
         return errors;
 39  
     }
 40  
 
 41  
 
 42  
     public String getName() {
 43  0
         return name;
 44  
     }
 45  
 
 46  
 
 47  
     public void setName(String name) {
 48  0
         this.name = name;
 49  0
     }
 50  
 
 51  
 
 52  
     public String getDescription() {
 53  0
         return description;
 54  
     }
 55  
 
 56  
 
 57  
     public void setDescription(String description) {
 58  0
         this.description = description;
 59  0
     }
 60  
 
 61  
 
 62  
     public ProjectView toProjectView() {
 63  0
         ProjectView project = new ProjectView();
 64  0
         project.setName(getName());
 65  0
         project.setDescription(getDescription());
 66  
 
 67  0
         return project;
 68  
     }
 69  
 }

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