KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > contineo > forms > CheckinForm


1 /*
2  * CheckinForm.java
3  *
4  * Created on 31. Oktober 2003, 17:28
5  */

6
7 package org.contineo.forms;
8
9 import javax.servlet.http.HttpServletRequest JavaDoc;
10 import org.apache.struts.action.ActionMapping;
11 import org.apache.struts.upload.FormFile;
12 import org.apache.struts.validator.ValidatorForm;
13 /**
14  *
15  * @author Michael Scholz
16  */

17 public class CheckinForm extends ValidatorForm {
18     
19     private static final long serialVersionUID = 1L;
20
21     /**
22      * @uml.property name="docName"
23      */

24     private String JavaDoc docName;
25
26     /**
27      * @uml.property name="file"
28      * @uml.associationEnd
29      */

30     private FormFile file;
31
32     /**
33      * @uml.property name="versionDesc"
34      */

35     private String JavaDoc versionDesc;
36     /**
37      * @uml.property name="type"
38      */

39     private String JavaDoc type;
40     private Integer JavaDoc docid;
41     
42     /** Creates a new instance of CheckinForm */
43     public CheckinForm() {
44         docName = "";
45         file = null;
46         versionDesc = "";
47         type = "oldversion";
48         docid = new Integer JavaDoc(-1);
49     }
50
51     /**
52      *
53      * @uml.property name="docName"
54      */

55     public String JavaDoc getDocName() {
56         return docName;
57     }
58
59     /**
60      *
61      * @uml.property name="file"
62      */

63     public FormFile getFile() {
64         return file;
65     }
66
67     /**
68      *
69      * @uml.property name="versionDesc"
70      */

71     public String JavaDoc getVersionDesc() {
72         return versionDesc;
73     }
74
75     /**
76      *
77      * @uml.property name="type"
78      */

79     public String JavaDoc getType() {
80         return type;
81     }
82
83     
84     public boolean isRelease() {
85         if (type.equals("release"))
86             return true;
87         else
88             return false;
89     }
90     
91     public boolean isSubversion() {
92         if (type.equals("subversion"))
93             return true;
94         else
95             return false;
96     }
97     
98     public boolean isOldversion() {
99         if (type.equals("oldversion"))
100             return true;
101         else
102             return false;
103     }
104
105     /**
106      *
107      * @uml.property name="docId"
108      */

109     public Integer JavaDoc getDocid() {
110         return docid;
111     }
112
113     /**
114      *
115      * @uml.property name="docName"
116      */

117     public void setDocName(String JavaDoc name) {
118         docName = name;
119     }
120
121     /**
122      *
123      * @uml.property name="file"
124      */

125     public void setFile(FormFile ffile) {
126         file = ffile;
127     }
128
129     /**
130      *
131      * @uml.property name="versionDesc"
132      */

133     public void setVersionDesc(String JavaDoc vdesc) {
134         versionDesc = vdesc;
135     }
136
137     /**
138      *
139      * @uml.property name="type"
140      */

141     public void setType(String JavaDoc typ) {
142         type = typ;
143     }
144
145     /**
146      *
147      * @uml.property name="docId"
148      */

149     public void setDocid(Integer JavaDoc id) {
150         docid = id;
151     }
152
153     
154     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
155         docName = "";
156         file = null;
157         versionDesc = "";
158         type = "oldversion";
159         docid = new Integer JavaDoc(-1);
160     }
161 }
162
Popular Tags