View Javadoc

1   /*
2    * $Id: RegistrationForm.java 421488 2006-07-13 03:43:08Z wsmoak $
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;
23  import javax.servlet.http.HttpServletRequest;
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 {
33      private String action = null;
34  
35      private String sFirstName = null;
36      private String sLastName = null;
37      private String sAddr = null;
38      private CityStateZip csz = new CityStateZip();
39      private String sPhone = null;
40      private String sEmail = null;
41  
42  
43      public String getAction() {
44    return action;
45      }
46  
47      public void setAction(String action) {
48          this.action = action;
49      }
50  
51      public String getFirstName() {
52         return sFirstName;
53      }
54  
55      public void setFirstName(String sFirstName) {
56          this.sFirstName = sFirstName;
57      }
58  
59      public String getLastName() {
60         return sLastName;
61      }
62  
63      public void setLastName(String sLastName) {
64          this.sLastName = sLastName;
65      }
66  
67      public String getAddr() {
68         return sAddr;
69      }
70  
71      public void setAddr(String 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 getPhone() {
84         return sPhone;
85      }
86  
87      public void setPhone(String sPhone) {
88          this.sPhone = sPhone;
89      }
90  
91      public String getEmail() {
92         return sEmail;
93      }
94  
95      public void setEmail(String 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 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 }