KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > webapp > validator > RegistrationForm


1 /*
2  * $Id: RegistrationForm.java 54929 2004-10-16 16:38:42Z germuska $
3  *
4  * Copyright 2000-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19
20 package org.apache.struts.webapp.validator;
21
22 import java.io.Serializable JavaDoc;
23 import javax.servlet.http.HttpServletRequest JavaDoc;
24 import org.apache.struts.action.ActionMapping;
25 import org.apache.struts.validator.ValidatorForm;
26
27
28 /**
29  * Form bean for the user registration page.
30  *
31 */

32 public final class RegistrationForm extends ValidatorForm implements Serializable JavaDoc {
33     private String JavaDoc action = null;
34        
35     private String JavaDoc sFirstName = null;
36     private String JavaDoc sLastName = null;
37     private String JavaDoc sAddr = null;
38     private CityStateZip csz = new CityStateZip();
39     private String JavaDoc sPhone = null;
40     private String JavaDoc sEmail = null;
41
42
43     public String JavaDoc getAction() {
44     return action;
45     }
46
47     public void setAction(String JavaDoc action) {
48         this.action = action;
49     }
50
51     public String JavaDoc getFirstName() {
52        return sFirstName;
53     }
54     
55     public void setFirstName(String JavaDoc sFirstName) {
56         this.sFirstName = sFirstName;
57     }
58     
59     public String JavaDoc getLastName() {
60        return sLastName;
61     }
62     
63     public void setLastName(String JavaDoc sLastName) {
64         this.sLastName = sLastName;
65     }
66
67     public String JavaDoc getAddr() {
68        return sAddr;
69     }
70     
71     public void setAddr(String JavaDoc sAddr) {
72         this.sAddr = sAddr;
73     }
74
75     public CityStateZip getCityStateZip() {
76        return csz;
77     }
78     
79     public void setCityStateZip(CityStateZip csz) {
80         this.csz = csz;
81     }
82
83     public String JavaDoc getPhone() {
84        return sPhone;
85     }
86     
87     public void setPhone(String JavaDoc sPhone) {
88         this.sPhone = sPhone;
89     }
90
91     public String JavaDoc getEmail() {
92        return sEmail;
93     }
94     
95     public void setEmail(String JavaDoc sEmail) {
96         this.sEmail = sEmail;
97     }
98         
99     /**
100      * Reset all properties to their default values.
101      *
102      * @param mapping The mapping used to select this instance
103      * @param request The servlet request we are processing
104      */

105     public void reset(ActionMapping mapping, HttpServletRequest JavaDoc request) {
106        action = null;
107        sFirstName = null;
108        sLastName = null;
109        sAddr = null;
110        csz = new CityStateZip();
111        sPhone = null;
112        sEmail = null;
113     }
114
115 }
116
Popular Tags