Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/sbugs/forms/CreateDefectForm.java


1   /*
2    * This program is free software; you can redistribute it and/or
3    * modify it under the terms of the GNU General Public License
4    * as published by the Free Software Foundation;  version 2 only.
5     *
6    * This program is distributed in the hope that it will be useful,
7    * but WITHOUT ANY WARRANTY; without even the implied warranty of
8    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9    * GNU General Public License for more details.
10   *
11   * You should have received a copy of the GNU General Public License
12   * along with this program; if not, write to the Free Software
13   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
14   */
15  package org.sbugs.forms;
16  
17  import org.apache.struts.action.ActionForm;
18  
19  public class CreateDefectForm extends ActionForm
20  {
21    private String headline;
22    private String addlEmailAddr;
23    private String description;
24    private int priorityId;
25    private int severityId;
26    private String ownerId;
27    
28    public CreateDefectForm()
29    {
30    }
31    
32    public void setHeadline( String headlineParam )
33    {
34      headline = headlineParam;
35    }
36    
37    public String getHeadline()
38    {
39      return headline;
40    }
41    
42    /**
43    Expects a list of comma seperated email addresses
44    */
45    public void setAddlEmailAddr( String emails )
46    {
47      addlEmailAddr = emails;
48    }
49    
50    public String getAddlEmailAddr()
51    {
52      return addlEmailAddr;
53    }
54    
55    public void setDescription( String desc )
56    {
57      description = desc;
58    }
59    
60    public String getDescription()
61    {
62      return description;
63    }
64    
65    public void setPriorityId( int id )
66    {
67      priorityId = id;
68    }
69    
70    public int getPriorityId()
71    {
72      return priorityId;
73    }
74    
75    public void setSeverityId( int id )
76    {
77      severityId = id;
78    }
79    
80    public int getSeverityId()
81    {
82      return severityId;
83    }
84    
85    public String getOwnerId()
86    {
87      return ownerId;
88    }
89    
90    public void setOwnerId( String id )
91    {
92      ownerId = id;
93    }
94    
95    public boolean readyToCreate()
96    {
97      return ( (getDescription() != null)
98            && (!getDescription().equals( "" ))
99            && (getHeadline() != null)
100           && (!getHeadline().equals( "" )) );
101   }
102 }