View Javadoc
1   /*
2    * $Id$
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  
23  package org.apache.struts.webapp.validator;
24  
25  import java.io.Serializable;
26  import jakarta.servlet.http.HttpServletRequest;
27  import org.apache.struts.action.ActionMapping;
28  import org.apache.struts.validator.ValidatorForm;
29  
30  
31  /**
32   * Form bean for the user registration page.
33   *
34  */
35  public final class RegistrationForm extends ValidatorForm implements Serializable {
36      private static final long serialVersionUID = 3679135634630477325L;
37  
38      private String action = null;
39  
40      private String sFirstName = null;
41      private String sLastName = null;
42      private String sAddr = null;
43      private CityStateZip csz = new CityStateZip();
44      private String sPhone = null;
45      private String sEmail = null;
46  
47  
48      public String getAction() {
49    return action;
50      }
51  
52      public void setAction(String action) {
53          this.action = action;
54      }
55  
56      public String getFirstName() {
57         return sFirstName;
58      }
59  
60      public void setFirstName(String sFirstName) {
61          this.sFirstName = sFirstName;
62      }
63  
64      public String getLastName() {
65         return sLastName;
66      }
67  
68      public void setLastName(String sLastName) {
69          this.sLastName = sLastName;
70      }
71  
72      public String getAddr() {
73         return sAddr;
74      }
75  
76      public void setAddr(String sAddr) {
77          this.sAddr = sAddr;
78      }
79  
80      public CityStateZip getCityStateZip() {
81         return csz;
82      }
83  
84      public void setCityStateZip(CityStateZip csz) {
85          this.csz = csz;
86      }
87  
88      public String getPhone() {
89         return sPhone;
90      }
91  
92      public void setPhone(String sPhone) {
93          this.sPhone = sPhone;
94      }
95  
96      public String getEmail() {
97         return sEmail;
98      }
99  
100     public void setEmail(String sEmail) {
101         this.sEmail = sEmail;
102     }
103 
104     /**
105      * Reset all properties to their default values.
106      *
107      * @param mapping The mapping used to select this instance
108      * @param request The servlet request we are processing
109      */
110     public void reset(ActionMapping mapping, HttpServletRequest request) {
111        action = null;
112        sFirstName = null;
113        sLastName = null;
114        sAddr = null;
115        csz = new CityStateZip();
116        sPhone = null;
117        sEmail = null;
118     }
119 
120 }