View Javadoc

1   /*
2    * $Id: RegistrationForm.java 471754 2006-11-06 14:55:09Z husted $
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 javax.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 String action = null;
37  
38      private String sFirstName = null;
39      private String sLastName = null;
40      private String sAddr = null;
41      private CityStateZip csz = new CityStateZip();
42      private String sPhone = null;
43      private String sEmail = null;
44  
45  
46      public String getAction() {
47    return action;
48      }
49  
50      public void setAction(String action) {
51          this.action = action;
52      }
53  
54      public String getFirstName() {
55         return sFirstName;
56      }
57  
58      public void setFirstName(String sFirstName) {
59          this.sFirstName = sFirstName;
60      }
61  
62      public String getLastName() {
63         return sLastName;
64      }
65  
66      public void setLastName(String sLastName) {
67          this.sLastName = sLastName;
68      }
69  
70      public String getAddr() {
71         return sAddr;
72      }
73  
74      public void setAddr(String sAddr) {
75          this.sAddr = sAddr;
76      }
77  
78      public CityStateZip getCityStateZip() {
79         return csz;
80      }
81  
82      public void setCityStateZip(CityStateZip csz) {
83          this.csz = csz;
84      }
85  
86      public String getPhone() {
87         return sPhone;
88      }
89  
90      public void setPhone(String sPhone) {
91          this.sPhone = sPhone;
92      }
93  
94      public String getEmail() {
95         return sEmail;
96      }
97  
98      public void setEmail(String sEmail) {
99          this.sEmail = sEmail;
100     }
101 
102     /**
103      * Reset all properties to their default values.
104      *
105      * @param mapping The mapping used to select this instance
106      * @param request The servlet request we are processing
107      */
108     public void reset(ActionMapping mapping, HttpServletRequest request) {
109        action = null;
110        sFirstName = null;
111        sLastName = null;
112        sAddr = null;
113        csz = new CityStateZip();
114        sPhone = null;
115        sEmail = null;
116     }
117 
118 }