KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > cms > inquiry > struts > InquiryForm


1 package com.dotmarketing.cms.inquiry.struts;
2
3
4 import javax.servlet.http.HttpServletRequest JavaDoc;
5
6 import org.apache.struts.Globals;
7 import org.apache.struts.action.ActionErrors;
8 import org.apache.struts.action.ActionMapping;
9 import org.apache.struts.action.ActionMessage;
10 import org.apache.struts.action.ActionMessages;
11 import org.apache.struts.validator.ValidatorForm;
12
13 import com.dotmarketing.util.UtilMethods;
14
15
16
17 public class InquiryForm extends ValidatorForm {
18
19     /**
20      *
21      */

22     private static final long serialVersionUID = 1L;
23     String JavaDoc userName;
24     String JavaDoc password;
25     String JavaDoc dispatch;
26     boolean rememberMe;
27     String JavaDoc password2;
28     String JavaDoc firstName;
29     String JavaDoc lastName;
30     String JavaDoc middleName;
31     String JavaDoc address1;
32     String JavaDoc address2;
33     String JavaDoc address3;
34     String JavaDoc city;
35     String JavaDoc country;
36     String JavaDoc state;
37     String JavaDoc phone;
38     String JavaDoc[] contactMethods;
39     String JavaDoc[] interests;
40     String JavaDoc zip;
41     boolean alumni;
42     String JavaDoc degree;
43     String JavaDoc comments;
44     /* Dot additions */
45     String JavaDoc organization;
46     String JavaDoc email;
47     String JavaDoc title;
48     String JavaDoc message;
49     
50     String JavaDoc ssn;
51     String JavaDoc status;
52     String JavaDoc categories;
53     String JavaDoc cid;
54     String JavaDoc[] departments;
55     boolean optOut;
56     
57     /**
58      * @return Returns the address1.
59      */

60     public String JavaDoc getAddress1() {
61         return this.address1;
62     }
63     /**
64      * @param address1 The address1 to set.
65      */

66     public void setAddress1(String JavaDoc address1) {
67         this.address1 = address1;
68     }
69     /**
70      * @return Returns the address2.
71      */

72     public String JavaDoc getAddress2() {
73         return this.address2;
74     }
75     /**
76      * @param address2 The address2 to set.
77      */

78     public void setAddress2(String JavaDoc address2) {
79         this.address2 = address2;
80     }
81     /**
82      * @return Returns the address3.
83      */

84     public String JavaDoc getAddress3() {
85         return this.address3;
86     }
87     /**
88      * @param address3 The address3 to set.
89      */

90     public void setAddress3(String JavaDoc address3) {
91         this.address3 = address3;
92     }
93     /**
94      * @return Returns the alumni.
95      */

96     public boolean isAlumni() {
97         return this.alumni;
98     }
99     /**
100      * @param alumni The alumni to set.
101      */

102     public void setAlumni(boolean alumni) {
103         this.alumni = alumni;
104     }
105     /**
106      * @return Returns the city.
107      */

108     public String JavaDoc getCity() {
109         return this.city;
110     }
111     /**
112      * @param city The city to set.
113      */

114     public void setCity(String JavaDoc city) {
115         this.city = city;
116     }
117     /**
118      * @return Returns the comments.
119      */

120     public String JavaDoc getComments() {
121         return this.comments;
122     }
123     /**
124      * @param comments The comments to set.
125      */

126     public void setComments(String JavaDoc comments) {
127         this.comments = comments;
128     }
129     /**
130      * @return Returns the contactMethods.
131      */

132     public String JavaDoc[] getContactMethods() {
133         return this.contactMethods;
134     }
135     /**
136      * @param contactMethods The contactMethods to set.
137      */

138     public void setContactMethods(String JavaDoc[] contactMethods) {
139         this.contactMethods = contactMethods;
140     }
141     /**
142      * @return Returns the degree.
143      */

144     public String JavaDoc getDegree() {
145         return this.degree;
146     }
147     /**
148      * @param degree The degree to set.
149      */

150     public void setDegree(String JavaDoc degree) {
151         this.degree = degree;
152     }
153
154     /**
155      * @return Returns the firstName.
156      */

157     public String JavaDoc getFirstName() {
158         return this.firstName;
159     }
160     /**
161      * @param firstName The firstName to set.
162      */

163     public void setFirstName(String JavaDoc firstName) {
164         this.firstName = firstName;
165     }
166     /**
167      * @return Returns the howHeard.
168      */

169     public String JavaDoc getHowHeard() {
170         return this.howHeard;
171     }
172     /**
173      * @param howHeard The howHeard to set.
174      */

175     public void setHowHeard(String JavaDoc howHeard) {
176         this.howHeard = howHeard;
177     }
178
179         /**
180      * @return Returns the categories.
181      */

182     public String JavaDoc getCategories() {
183         return this.categories;
184     }
185     /**
186      * @param categories The categories to set.
187      */

188     public void setCategories(String JavaDoc categories) {
189         this.categories = categories;
190     }
191 /**
192      * @return Returns the interests.
193      */

194     public String JavaDoc[] getInterests() {
195         return this.interests;
196     }
197     /**
198      * @param interests The interests to set.
199      */

200     public void setInterests(String JavaDoc[] interests) {
201         this.interests = interests;
202     }
203     /**
204      * @return Returns the lastName.
205      */

206     public String JavaDoc getLastName() {
207         return this.lastName;
208     }
209     /**
210      * @param lastName The lastName to set.
211      */

212     public void setLastName(String JavaDoc lastName) {
213         this.lastName = lastName;
214     }
215     /**
216      * @return Returns the middleName.
217      */

218     public String JavaDoc getMiddleName() {
219         return this.middleName;
220     }
221     /**
222      * @param middleName The middleName to set.
223      */

224     public void setMiddleName(String JavaDoc middleName) {
225         this.middleName = middleName;
226     }
227     /**
228      * @return Returns the password2.
229      */

230     public String JavaDoc getPassword2() {
231         return this.password2;
232     }
233     /**
234      * @param password2 The password2 to set.
235      */

236     public void setPassword2(String JavaDoc password2) {
237         this.password2 = password2;
238     }
239     /**
240      * @return Returns the phone.
241      */

242     public String JavaDoc getPhone() {
243         return this.phone;
244     }
245     /**
246      * @param phone The phone to set.
247      */

248     public void setPhone(String JavaDoc phone) {
249         this.phone = phone;
250     }
251     /**
252      * @return Returns the state.
253      */

254     public String JavaDoc getState() {
255         return this.state;
256     }
257     /**
258      * @param state The state to set.
259      */

260     public void setState(String JavaDoc state) {
261         this.state = state;
262     }
263     /**
264      * @return Returns the zip.
265      */

266     public String JavaDoc getZip() {
267         return this.zip;
268     }
269     /**
270      * @param zip The zip to set.
271      */

272     public void setZip(String JavaDoc zip) {
273         this.zip = zip;
274     }
275     String JavaDoc howHeard;
276     
277
278     /** default constructor */
279     public InquiryForm() {
280     }
281
282     public ActionErrors validate(ActionMapping mapping, HttpServletRequest JavaDoc request) {
283         ActionErrors errors = new ActionErrors();
284         if (!UtilMethods.isSet(email))
285         {
286             errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","eMail"));
287         }
288         if (!UtilMethods.isSet(firstName))
289         {
290             errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","First Name"));
291         }
292         if (!UtilMethods.isSet(lastName))
293         {
294             errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","Last Name"));
295         }
296         if (!UtilMethods.isSet(organization))
297         {
298             errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.contentlet.required","Organization"));
299         }
300         return errors;
301
302     }
303
304     
305
306     /**
307      * @return Returns the rememberMe.
308      */

309     public boolean isRememberMe() {
310         return this.rememberMe;
311     }
312     /**
313      * @param rememberMe The rememberMe to set.
314      */

315     public void setRememberMe(boolean rememberMe) {
316         this.rememberMe = rememberMe;
317     }
318     /**
319      * @return Returns the dispatch.
320      */

321     public String JavaDoc getDispatch() {
322         return this.dispatch;
323     }
324     /**
325      * @param dispatch The dispatch to set.
326      */

327     public void setDispatch(String JavaDoc dispatch) {
328         this.dispatch = dispatch;
329     }
330     /**
331      * @return Returns the password.
332      */

333     public String JavaDoc getPassword() {
334         return this.password;
335     }
336     /**
337      * @param password The password to set.
338      */

339     public void setPassword(String JavaDoc password) {
340         this.password = password;
341     }
342
343     /**
344      * @return Returns the country.
345      */

346     public String JavaDoc getCountry() {
347         return this.country;
348     }
349     /**
350      * @param country The country to set.
351      */

352     public void setCountry(String JavaDoc country) {
353         this.country = country;
354     }
355     /**
356      * @return Returns the cid.
357      */

358     public String JavaDoc getCid() {
359         return this.cid;
360     }
361     /**
362      * @param cid The cid to set.
363      */

364     public void setCid(String JavaDoc cid) {
365         this.cid = cid;
366     }
367     /**
368      * @return Returns the ssn.
369      */

370     public String JavaDoc getSsn() {
371         return this.ssn;
372     }
373     /**
374      * @param ssn The ssn to set.
375      */

376     public void setSsn(String JavaDoc ssn) {
377         this.ssn = ssn;
378     }
379     /**
380      * @return Returns the status.
381      */

382     public String JavaDoc getStatus() {
383         return this.status;
384     }
385     /**
386      * @param status The status to set.
387      */

388     public void setStatus(String JavaDoc status) {
389         this.status = status;
390     }
391     /**
392      * @return Returns the userName.
393      */

394     public String JavaDoc getUserName() {
395         return this.userName;
396     }
397     /**
398      * @param userName The userName to set.
399      */

400     public void setUserName(String JavaDoc userName) {
401         this.userName = userName;
402     }
403     public String JavaDoc[] getDepartments() {
404         return this.departments;
405     }
406     public void setDepartments(String JavaDoc[] departments) {
407         this.departments = departments;
408     }
409
410     public boolean isOptOut() {
411         return this.optOut;
412     }
413     public void setOptOut(boolean optOut) {
414         this.optOut = optOut;
415     }
416     public String JavaDoc getEmail() {
417         return email;
418     }
419     public void setEmail(String JavaDoc email) {
420         this.email = email;
421     }
422     public String JavaDoc getMessage() {
423         return message;
424     }
425     public void setMessage(String JavaDoc message) {
426         this.message = message;
427     }
428     public String JavaDoc getOrganization() {
429         return organization;
430     }
431     public void setOrganization(String JavaDoc organization) {
432         this.organization = organization;
433     }
434     public String JavaDoc getTitle() {
435         return title;
436     }
437     public void setTitle(String JavaDoc title) {
438         this.title = title;
439     }
440 }
441
Popular Tags